Drive each panel back to the visibility recorded in states.
For a saved-true entry we call show() unconditionally — if the
panel is already shown, show() should be idempotent. For a
saved-false entry we only call hide() when the panel is currently
visible, which avoids writing visibility state on already-hidden
panels (some panels record telemetry on visibility transitions).
Drive each panel back to the visibility recorded in
states.For a saved-true entry we call
show()unconditionally — if the panel is already shown,show()should be idempotent. For a saved-false entry we only callhide()when the panel is currently visible, which avoids writing visibility state on already-hidden panels (some panels record telemetry on visibility transitions).