Skip to content

Stop the pane title chip from eating its trailing gap - #3728

Merged
ymichael merged 1 commit into
mainfrom
bb/fix-overlapping-panel-title-chips-thr_mnruz59d8m
Sep 15, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/fix-overlapping-panel-title-chips-thr_mnruz59d8m

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

Root cause

The focused pane title chip cancels its own horizontal padding with -mx-2 so the grey surface bleeds outward without shifting the title text. The header's center row separates its children with gap-2 (apps/app/src/components/layout/AppPageHeader.tsx:90) — exactly the 8px that the right-side bleed removes. The chip's painted right edge therefore landed at 0px from the next sibling: the child / side chat pill, or the actions menu button's hover box when no pill is present.

Measured in the running app before the fix: chipRight: 1028, pillLeft: 1028.

This is not a recent regression. The focused-pane title surface arrived in 4422445 (#682, 2026-07-14) as an absolutely-positioned overlay with -inset-x-2, which produced the same flush edge; dbdcc20 (#934, 2026-08-01) rewrote the technique to padding plus negative margin and faithfully reproduced the same offsets. The pill (#85) and the row's gap-2 both predate the surface, so the collision existed from the surface's first commit.

It stayed unnoticed because the surface only paints on the focused pane, only in a split, and is only visibly flush when the thread carries a child / side chat pill — without a pill the neighbour is the actions button, which is transparent until hover.

Change

Keep the left bleed, which is load-bearing (it aligns the title text with the header's px-4), and drop the right bleed so the row gap survives. Applied to both headers that share the chip pattern:

  • apps/app/src/views/thread-detail/ThreadDetailHeader.tsx:164
  • apps/app/src/views/thread-detail/SplitThreadArea.tsx:1134

Verification

Drove a real dev instance with a parent thread, a child thread (so the child pill renders), and a new-thread pane, arranged as three split panes, and measured the live DOM:

chip margin-right gap to next sibling
before -8px 0px
after 0px 8px

All three pane-header variants (thread, child-pill thread, new-thread pane) report margin-right: 0px and an 8px gap after the change, with the title text position unchanged (margin-left stays -8px).

Checks: pnpm exec turbo run typecheck lint test --filter='...[origin/main]' — 533 test files, 4675 passed / 3 skipped, 0 lint errors, exit 0.

AGENT GENERATED

The focused pane title chip cancels its own horizontal padding with
-mx-2 so the surface bleeds outward without shifting the title text.
The header's center row separates children with gap-2, which is exactly
the 8px the right-side bleed removes, so the chip's painted edge landed
flush against the next sibling: the child/side chat pill, or the actions
menu button's hover box.

Keep the left bleed, which aligns the title text with the header's px-4,
and drop the right bleed so the row gap survives.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@ymichael
ymichael merged commit 261f696 into main Sep 15, 2026
16 checks passed
@ymichael
ymichael deleted the bb/fix-overlapping-panel-title-chips-thr_mnruz59d8m branch September 15, 2026 17:44
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.

1 participant