Skip to content

fix: prevent agent badge clipping and portal tabs into titlebar#533

Closed
heyramzi wants to merge 1 commit intostablyai:mainfrom
heyramzi:fix/titlebar-badge-clipping-and-tab-placement
Closed

fix: prevent agent badge clipping and portal tabs into titlebar#533
heyramzi wants to merge 1 commit intostablyai:mainfrom
heyramzi:fix/titlebar-badge-clipping-and-tab-placement

Conversation

@heyramzi
Copy link
Copy Markdown
Contributor

@heyramzi heyramzi commented Apr 12, 2026

Summary

Two titlebar layout fixes:

1. Agent badge clipping

The active-agent badge ("● 1 active") was rendered inside the sidebar-width-constrained container with overflow-hidden, causing it to get clipped when the sidebar is narrow.

Fix: Moved the badge out of the constrained container so it sits as a direct child of the titlebar flex row. Added flex-shrink: 0 to prevent compression.

Before:
image

The badge text gets cut off — "1 active" becomes "1 activ..."

2. Tabs in titlebar (save vertical space)

The titlebar row was entirely empty in its center section (#titlebar-tabs was an invisible spacer), while tabs rendered in a separate 36px row below it — wasting vertical screen real estate.

Fix: When there are no split groups, the tab bar is portaled into the titlebar's #titlebar-tabs slot via createPortal, so the titlebar doubles as the tab strip. When splits are active, each group renders its own inline tab bar as before — avoiding the visual "jump" issue noted in the previous implementation.

Changes

File What
App.tsx Moved agent badge outside sidebar-width container; updated #titlebar-tabs to accept portaled tabs with items-stretch
TabGroupPanel.tsx Portal tab bar into #titlebar-tabs when !hasSplitGroups; fall back to inline rendering for splits
main.css Added flex-shrink: 0 to badge; added #titlebar-tabs > .terminal-tab-strip no-drag rule for portaled tabs

Test plan

  • Open Orca with a narrow sidebar — verify the agent badge ("● N active") is fully visible and not clipped
  • Toggle showTitlebarAgentActivity off in Settings → Appearance — badge should disappear
  • With a single worktree (no splits): tabs should render in the titlebar row, no separate tab strip below
  • Create a split (⌘D or drag): both groups should show their own inline tab bars
  • Close the split: tabs should portal back into the titlebar
  • Verify tabs are clickable and scrollable when in the titlebar (no drag region interference)

Two titlebar layout fixes:

1. Agent badge clipping: moved the active-agent badge out of the
   sidebar-width-constrained container so it is never clipped when the
   sidebar is narrow. Added flex-shrink: 0 to prevent the badge from
   being compressed by adjacent flex items.

2. Tabs in titlebar: when no splits are active, the tab bar is portaled
   into the titlebar's #titlebar-tabs slot so the titlebar row doubles
   as the tab strip, saving ~36px of vertical space. When the user
   creates a split, each group renders its own inline tab bar as before.
@nwparker
Copy link
Copy Markdown
Contributor

Thanks @heyramzi

We made some changes here to re-work the split pane work... but 100% agreed this is real.
In fact, we did a temporary revert, but will re-work these changes into our feature re-work

cc @brennanb2025

@AmethystLiang
Copy link
Copy Markdown
Contributor

This issue has been fixed in other PRs. Closing this one now.

Thx for putting it up though!

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.

3 participants