Skip to content

[bug][mobile] Terminal/Issues/Pulls/Actions tabs overflow — the icon-only pattern exists 80 lines above in the same file and was not applied #431

Description

@serge-ivo

The repo tab row keeps its labels on mobile — the fix pattern already exists 80 lines above it

Reported: Terminal · Issues · Pulls · Actions overflow the screen on mobile.

Where it is

agents/coder/web/src/CodingTab.tsx:887-896 — the single-repo tab helper:

const tab = (id: typeof soloView, label: string, Icon: typeof SquareTerminal) => (
  <button
    type="button"
    onClick={() => setSoloView(id)}
    aria-pressed={soloView === id}
    className={`flex items-center gap-1 px-2.5 py-1 text-xs font-bold ${}`}
  >
    <Icon size={13} /> {label}
  </button>
);

No responsive class anywhere: the label renders at every width, and four of these sit in one inline-flex row (:899-900).

The same file already solves this correctly

CodingTab.tsx:807-808, the Co-pilot / Terminal toggle:

title="Terminal" aria-label="Terminal" aria-pressed={}
className="flex items-center justify-center gap-1 w-8 sm:w-auto sm:px-2 py-1 text-xs font-bold …"
><SquareTerminal size={14} /><span className="hidden sm:inline">Terminal</span></button>

Icon-only below sm, labelled from sm up — exactly what was asked for. It was applied to the two-button toggle and not to the four-button row, which is the one that actually overflows.

The fix

Bring tab() in line with its sibling:

const tab = (id: typeof soloView, label: string, Icon: typeof SquareTerminal) => (
  <button
    type="button"
    onClick={() => setSoloView(id)}
    title={label}
    aria-label={label}
    aria-pressed={soloView === id}
    className={`flex items-center justify-center gap-1 w-8 sm:w-auto sm:px-2.5 py-1 text-xs font-bold ${}`}
  >
    <Icon size={13} /><span className="hidden sm:inline">{label}</span>
  </button>
);

title and aria-label are not optional here. Today the button's accessible name comes from its visible text; hiding the text without adding them leaves four unlabelled icon buttons — an a11y regression of exactly the kind #389 was filed to fix. The sibling at :807 sets both, which is why it is the right thing to copy rather than re-derive.

Alternatives considered and rejected

  • Let the row wrap. The container is already flex-wrap at :899, so it can wrap — and a wrapped tab bar pushes the terminal pane down on the screen where vertical space is scarcest ([bug] Terminal output is invisible on mobile — TmuxTab stacks eight blocks in one column and the output pane is the only one that yields #370 was filed for precisely that class of problem on this tab).
  • Horizontal scroll on the tab row. Works, but hides tabs behind a scroll gesture with no affordance; four icons fit trivially at 320px.
  • Shorten the words ("Term", "PRs"). Rejected — truncated labels read as jargon and still cost more width than an icon, and it would diverge from the icon-only convention the instance tab bar already uses on mobile.

Acceptance criteria

  • At 320px and 390px the four tabs fit on one line with no horizontal overflow and no wrap.
  • Each tab has an accessible name at every width (aria-label), and a tooltip on desktop.
  • At ≥sm the row is unchanged — icon + label as today.
  • The active-tab styling still reads clearly when only the icon is visible.

Regression risk

Not measured. This is filed from the code, which is unambiguous (no responsive class at all, versus a sibling that has one). I did not reproduce it in a browser because the single-repo Coder view needs specific instance state; the acceptance criteria above are written so the implementer measures it.

Related: #426 (the other mobile-overflow defect in the chat header, with measurements), #389 (tap targets and accessible names on this surface), #370 (mobile layout on this same tab).

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions