fix(app): unmount hidden session panes#35628
Open
Hona wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses stale offscreen virtualizer behavior in the session UI by unmounting hidden/closed side-panel panes (instead of leaving them mounted at zero size), reducing the chance of unexpected scroll resets after tab transitions or resizes.
Changes:
- Unmount the review file-tree sidebar when closed (instead of keeping an inert, zero-width pane mounted).
- Unmount inactive review/context/file-tree side-panel panes to avoid retaining hidden virtualizer instances.
- Update the stacked review/terminal Playwright regression to assert unmount/remount behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/session-ui/src/v2/components/session-review-v2.tsx | Unmounts the review V2 sidebar when not open to avoid hidden zero-size instances. |
| packages/app/src/pages/session/session-side-panel.tsx | Unmounts inactive side-panel panes (review and file tree) rather than hiding them via inert/aria/width only. |
| packages/app/src/pages/session.tsx | Gates SessionSidePanel rendering so it’s only mounted when the desktop side panel is actually open/visible. |
| packages/app/e2e/regression/review-terminal-stacked.spec.ts | Updates regression expectations to validate that closed panes are removed from the DOM. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Root cause
Commit 3a149ba retained hidden review virtualizers at zero size. After review transitions or window resizing, stale virtualizer activity could reset the message timeline scrollTop to 0 while its bottom range remained mounted offscreen.
Testing