diff --git a/apps/desktop/src/app/chat/composer/status-stack/coding-row.test.tsx b/apps/desktop/src/app/chat/composer/status-stack/coding-row.test.tsx index 9d10dd9c96fec..018862fc39042 100644 --- a/apps/desktop/src/app/chat/composer/status-stack/coding-row.test.tsx +++ b/apps/desktop/src/app/chat/composer/status-stack/coding-row.test.tsx @@ -40,7 +40,18 @@ describe('CodingStatusRow', () => { fireEvent.click(screen.getByText('bb/hitbox')) expect(onOpen).toHaveBeenCalledTimes(1) - fireEvent.click(screen.getByText('12').closest('button')!) + fireEvent.click(screen.getByText('12')) expect(onOpen).toHaveBeenCalledTimes(2) }) + + it('wraps the click targets without adding a layout box', () => { + const { container } = render( undefined} repoPath="/repo" />) + + // `display: contents` is what keeps the branch label and the counts direct + // flex children of the row — the hit areas cost nothing visually. + expect(screen.getByText('bb/hitbox').parentElement?.classList.contains('contents')).toBe(true) + expect(screen.getByText('12').closest('button')?.classList.contains('contents')).toBe(true) + // The glyph button fills the row's existing 3.5 leading slot exactly. + expect(container.querySelector('button[class~="size-3.5"]')).not.toBeNull() + }) }) diff --git a/apps/desktop/src/app/chat/composer/status-stack/coding-row.tsx b/apps/desktop/src/app/chat/composer/status-stack/coding-row.tsx index ca51f842ff7a6..1296b3fb18037 100644 --- a/apps/desktop/src/app/chat/composer/status-stack/coding-row.tsx +++ b/apps/desktop/src/app/chat/composer/status-stack/coding-row.tsx @@ -215,24 +215,26 @@ export const CodingStatusRow = memo(function CodingStatusRow({ // The base "where am I working" strip is part of the composer surface // itself, so it inherits the composer's width and clipped top radius. className="coding-status-bar min-h-7 rounded-t-[inherit] rounded-b-none border-b border-(--ui-stroke-tertiary) px-3.5 py-1.5 hover:bg-transparent" + // Static branch glyph — never the loading spinner. This row only renders + // once `status` exists, so a spinner here only ever fired on *refreshes* + // of an already-loaded repo (window focus, turn settle), reading as an + // annoying icon "blip" with no first-load value. Refreshes are silent. + // It's a button (not the whole row) so the glyph opens the review pane + // while the strip around it stays inert; size-3.5 fills the slot exactly. + leading={ + + } >
- {/* Only the branch identity opens the review pane — the strip itself - is not a button, so the dead space around it stays inert. Static - branch glyph, never the loading spinner: this row only renders - once `status` exists, so a spinner here only ever fired on - *refreshes* (window focus, turn settle), an icon "blip" with no - first-load value. Refreshes are silent. */} - {/* Branch actions kebab — same pattern as the session/worktree rows. @@ -260,12 +262,13 @@ export const CodingStatusRow = memo(function CodingStatusRow({ )}
- {/* The other half of the hit target: the counts describe what's in the - review pane, so clicking them opens it. */} + {/* The counts describe what's in the review pane, so clicking them + opens it. `contents` again: the two spans stay direct flex children + of the row, keeping their gap and `ml-auto` behaviour untouched. */} {(status.ahead > 0 || status.behind > 0 || hasLineDelta || untrackedOnly) && ( -