Skip to content

[Bug]: Diff panel hides the current branch name and the arrow overlaps the base ref when the panel is narrow #19048

Closed

Description

@vwgp8wkgjz-beep

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open a thread whose branch has a large diff against its base, so the +N −N count is wide (mine showed +134k −104).
  2. Open the right Diff panel with the Changes scope, comparing against origin/main.
  3. Keep the right panel fairly narrow.

Expected behavior

The toolbar reads main → origin/main. If space runs out, the branch name truncates with an ellipsis (ma… → origin/main).

Actual behavior

The current branch name disappears completely, and the arrow is drawn on top of the first letter of the base ref. The toolbar shows →origin/main with the arrow overlapping the "o".

Impact

Cosmetic issue

Version or commit

Desktop nightly; server 0.0.46-nightly.20261013.3053

Environment

macOS desktop app connected to a T3 Code server running on Linux

Logs or stack traces

Not a crash, no logs.

Possible cause, from reading the code (not tested): in apps/web/src/components/DiffPanel.tsx
the head ref and arrow sit inside a `min-w-0` tooltip trigger. When the row runs out of room,
that wrapper can shrink to zero width, so the head ref's `truncate` span collapses to nothing
and the `shrink-0` arrow overflows onto the base-ref button.

Screenshots, recordings, or supporting files

Image

Workaround

None verified.

Activity

  1. juliusmarminge commented on Oct 13, 2026

    @juliusmarminge
    Member

    Note

    Grok responding on behalf of Julius.

    Confirmed in code on main, so I'm accepting this as a cosmetic bug.

    In apps/web/src/components/DiffPanel.tsx (branch-scope row, ~L796), the head ref and ArrowRightIcon sit inside the tooltip trigger <span className="flex min-w-0 items-center gap-2">. It has min-w-0 but no overflow-hidden and no minimum width of its own. The base-ref ComboboxTrigger next to it is also min-w-0 and wants up to max-w-48. When the row is squeezed, flexbox shrinks the trigger to roughly zero, the truncate head-ref span goes down to 0 px, and the shrink-0 arrow (plus gap-2) spills onto the base-ref button. That matches your screenshot.

    This isn't a duplicate. #2127, #11739, #15843, #17674 and #15314 are other DiffPanel problems, and no open PR touches this row.

    Suggested fix: give the head-ref group a floor and let it shrink before the base ref does. For example, use shrink with min-w-8 overflow-hidden on the trigger, or put shrink-[2] on it and shrink-0 on the arrow's container. That way the head ref truncates to ma… and never collapses. There's no workaround except widening the panel.

  2. added
    acceptedfeature request accepted
    bugSomething is broken or behaving incorrectly.
    via-triageFiled through npx t3 triage
    on Oct 13, 2026
  3. juliusmarminge commented on Oct 18, 2026

    @juliusmarminge
    Member

    Note

    Grok responding on behalf of Julius.

    Fixed by #19089, now on main: the head ref stays visible in narrow Diff panels (down to about 500 px) and the arrow no longer draws over the base ref. Below that the row is too narrow to fit the head ref, so it stays hidden there; open a new issue if that still bothers you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedfeature request acceptedbugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions