Skip to content

fix(app): unmount hidden session panes#35628

Open
Hona wants to merge 1 commit into
anomalyco:devfrom
Hona:fix-review-blank
Open

fix(app): unmount hidden session panes#35628
Hona wants to merge 1 commit into
anomalyco:devfrom
Hona:fix-review-blank

Conversation

@Hona

@Hona Hona commented Jul 6, 2026

Copy link
Copy Markdown
Member

Summary

  • unmount closed session side panels instead of retaining zero-size pane instances
  • unmount inactive review, context, file-tree, and review-sidebar panes
  • update the stacked review/terminal regression to verify unmount and remount behavior

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

  • full monorepo typecheck via pre-push hook
  • app and session-ui package typechecks
  • review-tab-switch and review-terminal-stacked Playwright regressions
  • packaged Electron real-workspace reproduction, 2 consecutive passes
  • desktop production build

@Hona Hona requested a review from Brendonovich as a code owner July 6, 2026 22:57
Copilot AI review requested due to automatic review settings July 6, 2026 22:57
@Hona Hona added the beta label Jul 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants