Skip to content

fix(layout): align right sidebar to top in non-workspace views#1356

Open
leynier wants to merge 2 commits intostablyai:mainfrom
leynier:fix/right-sidebar-top-alignment
Open

fix(layout): align right sidebar to top in non-workspace views#1356
leynier wants to merge 2 commits intostablyai:mainfrom
leynier:fix/right-sidebar-top-alignment

Conversation

@leynier
Copy link
Copy Markdown
Contributor

@leynier leynier commented May 2, 2026

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.tsx built the shell as a flex-col with the full-width .titlebar rendered 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 at y≈42px instead of y=0.

When workspaceActive becomes true (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

  • Wrapped the left + center columns in a flex-col that 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.
  • Gated 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. (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:

telegram-cloud-photo-size-1-5167948807013076127-y

Landing, right sidebar open - right sidebar anchors at the top, titlebar shrinks to the left+center area, no duplicate toggle icon:

telegram-cloud-photo-size-1-5167948807013076128-y

Workspace, right sidebar closed - unchanged from before:

telegram-cloud-photo-size-1-5167948807013076129-y

Workspace, right sidebar open - unchanged from before:

telegram-cloud-photo-size-1-5167948807013076131-y

Test plan

  • pnpm run typecheck - passes
  • pnpm run lint (oxlint) - 0 warnings, 0 errors
  • pnpm test - 3675/3675 tests pass (under Node 24 + pnpm rebuild better-sqlite3)
  • Manual verification on macOS:
    • Landing screen, toggle right sidebar open: header icons at y=0, aligned with traffic-light row
    • Landing screen, toggle right sidebar closed: titlebar re-expands to full width, no duplicate toggle
    • Workspace view (worktree + terminal): right sidebar still anchored at the top, no regression
    • Workspace view, file explorer panel open in right sidebar: working
    • Window drag region preserved

leynier added 2 commits May 2, 2026 11:27
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
@AmethystLiang AmethystLiang requested a review from brennanb2025 May 5, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Right sidebar opens below the titlebar on landing / settings / tasks views

1 participant