Skip to content

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

Merged
AmethystLiang merged 2 commits into
stablyai:mainfrom
leynier:fix/right-sidebar-top-alignment
May 5, 2026
Merged

AmethystLiang merged 2 commits into
stablyai:mainfrom
leynier:fix/right-sidebar-top-alignment

Conversation

@leynier

@leynier leynier commented May 2, 2026 •

Copy link
Copy Markdown
Contributor

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

@AmethystLiang
AmethystLiang requested a review from brennanb2025 May 5, 2026 04:17
@AmethystLiang
AmethystLiang requested review from AmethystLiang and removed request for brennanb2025 May 5, 2026 17:15
leynier and others added 2 commits May 5, 2026 10:22
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
PR stablyai#1381 shrank .titlebar-left to 36px but left .titlebar at 42px.
Before the right-sidebar top-alignment fix, the 6px mismatch was
hidden because the right sidebar was pushed below the titlebar in
non-workspace views. With top-alignment, the 36px right-sidebar
header no longer lines up with the 42px titlebar — visible as a
6px seam on the Landing page when the right sidebar is open.

Match all three (titlebar, titlebar-left, right-sidebar header) at
36px so the top strip is uniform across views.

Co-authored-by: Orca <[email protected]>
@AmethystLiang
AmethystLiang force-pushed the fix/right-sidebar-top-alignment branch from 1cf5f9c to 0a8f875 Compare May 5, 2026 17:56

@AmethystLiang AmethystLiang 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.

Rebased onto main and added a 6px titlebar height fix on top — non-workspace .titlebar was still 42px while .titlebar-left and the right-sidebar header are 36px, which left a visible seam after this PR top-aligned them. Merging once CI is green. Thanks!

@AmethystLiang
AmethystLiang merged commit 14e879a into stablyai:main May 5, 2026
2 checks passed
AmethystLiang added a commit that referenced this pull request May 5, 2026
Two related top-band issues:

1. Non-workspace view: Tasks page used pt-3 above its X/source-icons row,
   placing the cluster's center 6px below the sidebar "Tasks" nav row's
   center. Drop to pt-1.5 so both rows center on the same baseline.

2. Workspace view: the strip TaskPage renders to replace the full-width
   titlebar was 42px, but PR #1356 standardized titlebar/titlebar-left/
   right-sidebar header at 36px. Match that with h-9 so the band is
   uniform across columns when a worktree is active.

Co-authored-by: Orca <[email protected]>
@leynier
leynier deleted the fix/right-sidebar-top-alignment branch July 15, 2026 02:37
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…yai#1356)

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

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

* fix(titlebar): shrink non-workspace .titlebar to 36px

PR stablyai#1381 shrank .titlebar-left to 36px but left .titlebar at 42px.
Before the right-sidebar top-alignment fix, the 6px mismatch was
hidden because the right sidebar was pushed below the titlebar in
non-workspace views. With top-alignment, the 36px right-sidebar
header no longer lines up with the 42px titlebar — visible as a
6px seam on the Landing page when the right sidebar is open.

Match all three (titlebar, titlebar-left, right-sidebar header) at
36px so the top strip is uniform across views.

Co-authored-by: Orca <[email protected]>

---------

Co-authored-by: Jinjing <[email protected]>
Co-authored-by: Orca <[email protected]>
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
Two related top-band issues:

1. Non-workspace view: Tasks page used pt-3 above its X/source-icons row,
   placing the cluster's center 6px below the sidebar "Tasks" nav row's
   center. Drop to pt-1.5 so both rows center on the same baseline.

2. Workspace view: the strip TaskPage renders to replace the full-width
   titlebar was 42px, but PR stablyai#1356 standardized titlebar/titlebar-left/
   right-sidebar header at 36px. Match that with h-9 so the band is
   uniform across columns when a worktree is active.

Co-authored-by: Orca <[email protected]>
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

3 participants