fix(layout): align right sidebar to top in non-workspace views#1356
Open
leynier wants to merge 2 commits intostablyai:mainfrom
Open
fix(layout): align right sidebar to top in non-workspace views#1356leynier wants to merge 2 commits intostablyai:mainfrom
leynier wants to merge 2 commits intostablyai:mainfrom
Conversation
Wrap the left + center columns in a flex-col that owns the conditional titlebar, and lift <RightSidebar /> to be a sibling of that wrapper. The titlebar now spans only the left+center area, so the right sidebar's own header anchors at the top of the window in landing/settings/tasks views — matching the workspace-view alignment. Also gate the titlebar's right-sidebar toggle on !rightSidebarOpen so it no longer double-renders alongside the close button inside the right sidebar's own header when the sidebar is open. Closes stablyai#1354
…op-alignment # Conflicts: # src/renderer/src/App.tsx
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
Fixes a layout bug where the right sidebar opened below the full-width titlebar in non-workspace views (landing, settings, tasks), instead of anchoring at the top of the window like it does in workspace view.
Root cause
src/renderer/src/App.tsxbuilt the shell as aflex-colwith the full-width.titlebarrendered above the inner flex-row that hosts<RightSidebar />. Because the titlebar spanned the entire window width, it sat over the right sidebar's column too, so the right sidebar's own 42px header rendered aty≈42pxinstead ofy=0.When
workspaceActivebecomestrue(a worktree is selected), the full-width titlebar is dropped and each column gets its own 42px top strip - that's why the bug only manifested in non-workspace views.What changed
flex-colthat owns the conditional titlebar, and lifted<RightSidebar />to be a sibling of that wrapper inside the existing flex-row. The titlebar now spans only the left+center area, so the right sidebar's own header anchors at the top of the window in landing/settings/tasks - matching the workspace-view alignment.!rightSidebarOpenso it no longer double-renders alongside the close button inside the right sidebar's own header when the sidebar is open. (Same pattern already used in workspace view at the floating-toggle branch.)Workspace view layout is unchanged (zero visual diff).
Resolve #1354
Screenshots - verification
Landing, right sidebar closed - full-width titlebar as before:
Landing, right sidebar open - right sidebar anchors at the top, titlebar shrinks to the left+center area, no duplicate toggle icon:
Workspace, right sidebar closed - unchanged from before:
Workspace, right sidebar open - unchanged from before:
Test plan
pnpm run typecheck- passespnpm run lint(oxlint) - 0 warnings, 0 errorspnpm test- 3675/3675 tests pass (under Node 24 +pnpm rebuild better-sqlite3)y=0, aligned with traffic-light row