fix(web): restore sidebar access in zoomed empty state#2841
fix(web): restore sidebar access in zoomed empty state#2841Pearcekieser wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
Superseded by #2884, which uses the date-prefixed worktree/branch requested for this fix. |
Summary
Why
When the app is zoomed in enough to enter the mobile sidebar layout and no thread is selected, the sidebar becomes a closed sheet. The Electron no-active-thread header did not render
SidebarTrigger, leaving only "Pick a thread to continue" with no visible way to reopen the sidebar and select a thread.The existing width guard also rejected every drag when the sidebar width exceeded the wrapper width, so users could not shrink back out of a bad persisted/resized sidebar state.
Checks
bun fmtbun lint(passes with existing warnings)bun typecheckbun run test -- src/components/AppSidebarLayout.test.ts src/components/NoActiveThreadState.test.tsTest Notes
bun run testcurrently fails outside this change inscripts/mock-update-server.test.tswith a timeout inserves files from the configured root.bun run test --filter=@t3tools/webcurrently fails outside this change insrc/environments/runtime/service.addSavedEnvironment.test.tswith a timeout inrolls back persisted metadata when bearer token persistence fails.Note
Restore sidebar access in the 'No active thread' empty state when sidebar is collapsed
NoActiveThreadStatecomponent now conditionally rendersSidebarTriggeronly when needed: on desktop when the sidebar is collapsed, and on mobile when the sheet is closed. Previously the trigger was always shown on non-Electron and never shown on Electron.shouldShowNoActiveThreadSidebarTriggerhelper encapsulates this visibility logic, with tests added in NoActiveThreadState.test.ts.shouldAcceptThreadSidebarWidthin AppSidebarLayout.tsx is updated to allow all shrink operations unconditionally, while still enforcing the minimum main content width on expansion.Macroscope summarized caf8c4f.