fix(app): stabilize session opening composer - #1180
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR centralizes session opening-state computation by moving logic from child components into the session page, creating a ChangesSession opening state and placeholder rendering
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Suggested priority: P2 (includes user-path files (packages/app/src/pages/session.tsx, packages/app/src/pages/session/session-composer-region.tsx, packages/app/src/pages/session/session-main-view.tsx)).
P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.
There was a problem hiding this comment.
Code Review
This pull request introduces a placeholder state for the session composer dock (SessionOpeningComposerPlaceholder) while a session is opening. It lifts the sessionOpening state computation up to the main session page and passes it down to both SessionPageComposerRegion and SessionMainView. Additionally, E2E tests are updated to assert the presence and height of this opening placeholder dock. The reviewer suggested using expect.poll when asserting the bounding box height of the opening placeholder dock in the E2E tests to prevent flakiness from mid-flight layout states or CSS transitions, along with using Infinity as a fallback to ensure intentional failures.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Summary
Fixes a session-opening flicker where the previous session composer stayed visible while a sidebar-selected target session was still waiting for its messages to hydrate.
No linked issue; this came from a user-reported local recording where the stale composer was visible during the 2s-3s opening window.
Why
The previous session-opening guard only hid the timeline area. The real session composer still rendered whenever an
activeSessionIDexisted, so route selection, opening UI, and stale input chrome could appear together during a delayed session switch.This change lifts the opening-state calculation to the page layer and reuses it for both the main view and composer region. While opening, the composer region renders a non-interactive placeholder dock that preserves the measured bottom space without exposing the real prompt.
Related Issue
None.
Human Review Status
Pending
Review Focus
Please focus on the session-opening state boundary: the placeholder should only render while the target route is not ready, should not expose
[data-component="prompt-input"], and should give way to the real composer once the target timeline loads.Risk Notes
Low to medium UI risk. This touches the session page composer mount boundary, but the focused E2E covers delayed sidebar navigation, stale timeline content, prompt absence during opening, placeholder height stability, and restoration of the real prompt after load.
Skipped conditional checklist items:
How To Verify
Screenshots or Recordings
Visible UI check completed from the Playwright trace produced by the focused delayed-sidebar E2E. In the opening frames, the target sidebar row is selected, previous-session text is absent, target text is still hidden until hydrated, and the real prompt is absent while the bottom space remains reserved by the opening placeholder.
Checklist
bug,enhancement,task,documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.app,ui,platform,harness,ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.P0,P1,P2,P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.Pending,Approved by @<reviewer>, orNot required: <reason>(default isPending; "not required" is restricted to bot-authored low-risk PRs).dev, and my PR title and commit messages use Conventional Commits in English.Summary by CodeRabbit
New Features
Tests