fix(web): re-apply hidden=true on tab deactivation in activateTab() (closes #699)#737
Merged
pandas-studio merged 2 commits intomainfrom May 3, 2026
Merged
Conversation
…loses #699) `activateTab()` removed `.active` from all panels but never set `hidden = true` back. After the first activation, every visited panel ended the session with `hidden = false` and relied solely on the CSS `display: none` from the absent `.active` class to stay hidden. Modern browsers do exclude `display:none` from the a11y tree, but: - DOM state accumulates; Playwright snapshots dump every panel that was ever activated, leaking stale content into UX review captures (this bug was found by exactly that — see docs/reports/mm-web-prod-v0.1.34-playwright-review.md). - A future CSS-only refactor (e.g. switching `.active` to `visibility:hidden`) would silently regress a11y. Belt-and-braces is cheap. Pair `classList.remove('active')` with `p.hidden = true` in the deactivation forEach. Bump app.js cache-buster v97 → v98. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Per CLAUDE.md ("never write multi-paragraph docstrings or multi-line
comment blocks — one short line max"). Same WHY anchored to #699.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
pandas-studio
approved these changes
May 3, 2026
Collaborator
pandas-studio
left a comment
There was a problem hiding this comment.
Fix is correct and scope-appropriate — the change is purely DOM hygiene (both [hidden] { display: none !important } at style.css:6 and the base .tab-panel { display: none } at style.css:216 already hide inactive panels visually), so this is the snapshot-pollution / future-proofing fix #699 advertised, not a hidden visual bug.
Verified:
.tab-panelselector is scoped to exactly 7 top-level containers, no sub-component reuse.- Initial HTML ships with
hiddenon inactive panels (60/413/481/588), so the post-fix invariant matches the static markup. - Comment trimmed to two lines (just pushed) to comply with CLAUDE.md "one short line max" convention.
Approving.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
activateTab()removed.activefrom all panels but never sethidden = trueback. After the first activation every visited panel ended the session withhidden = false, relying only on the CSSdisplay:nonefrom the absent.activeclass to stay hidden.display:nonefrom the a11y tree, so this isn't a hard a11y bug — but Playwrightbrowser_snapshotwalks the DOM and dumps the leaked nodes (this is exactly how Tabhiddenattribute not re-applied on deactivation inactivateTab()#699 surfaced, in the v0.1.34 prod UX review). A future CSS-only refactor that dropsdisplay:nonewould also silently regress hiding.classList.remove('active')withp.hidden = truein the deactivation forEach. Belt-and-braces with the existing CSS rule.app.jscache-buster v97 → v98.Closes #699.
Test plan
.tab-panelshowshiddenattribute set, only the active panel hashidden = false.browser_snapshotafter the round-trip: only onetab-panelshould appear unhidden in the snapshot tree.