Skip to content

Composer / menu: a long argument hint hides the command name and makes the menu scroll sideways on mobile #7564

Closed

Description

@dillonzq

Summary

In the composer's / menu, a command with a long argument hint pushes its own name and description to zero width and makes the row wider than the menu. On a phone-width screen the name disappears (the row shows only the hint) and the whole menu scrolls sideways. On desktop the menu is wide enough that the name survives, but the description shrinks to a couple of characters ("R..").

Versions and environment

  • bb 0.49.0 (latest release), server on Linux
  • claude-code provider, Claude Code 2.1.325 (its built-in code-review command has the long hint)
  • Seen on an iPhone and reproduced in headless Chrome with a 402×874 mobile viewport

Steps to reproduce

  1. Open a Claude Code thread in a viewport about 400 px wide (phone, or devtools device mode).
  2. Type / in the composer.
  3. Scroll the menu to code-review, whose argument hint is [low|medium|high|xhigh|max] [--fix] [--comment] [<pr#>|<branch>|<path>] [--max-findings <n>|all].
  4. Drag the menu horizontally.

Any command whose argument hint is wider than the menu row reproduces it; rows without an argument hint lay out fine.

Expected vs actual

Actual: the code-review row shows only "[low|medium|high|xhigh|max] [--fix] [--c…", with no
command name and no description. The menu scrolls horizontally because that row overflows.

Measured on the code-review row (402 px viewport):
  button (row)        clientWidth 360   scrollWidth 711
  name span           width 0           needs 83
  description span    width 0           needs 1999
  argument hint span  width 671         (shrink-0, not truncated)

Expected: the command name stays visible, the description and argument hint truncate with an
ellipsis, and the menu never scrolls horizontally.

Evidence

The row is a flex container. The name is truncate (shrinks), the description is truncate [flex-shrink:9999], but the argument hint is shrink-0 with no truncation, so when it is wider than the row it takes all the space and overflows:

  • Argument hint span:
    {item.argumentHint !== null ? (
    <span className="shrink-0 text-subtle-foreground">
    {item.argumentHint}
    </span>
    ) : null}
  • Row layout (name truncate, no min-w-0/overflow-hidden guard on the hint):
    <div className="flex min-w-0 items-center gap-1.5">
    {icon}
    {typeof primary === "string" ? (
    <span className="truncate text-foreground">{primary}</span>
    ) : (
    primary
    )}
    {trailing}
    {badge === undefined ? null : (
    <span className="ml-auto shrink-0">{badge}</span>
    )}
  • Description span:
    function MutedTrailing({ children }: { children: string }) {
    return (
    <span className="truncate text-subtle-foreground [flex-shrink:9999]">
    {children}
    </span>
    );
    }

Widths were read with getBoundingClientRect() and scrollWidth on the rendered row.

A possible fix: let the hint shrink and truncate (min-w-0 truncate, perhaps with a max width such as max-w-[50%]), and keep the name from collapsing (shrink-0 or a small min-w), so the order of giving up space is description → hint → name.

What you ruled out

  • Not interface-language related: identical in English and with a translated UI.
  • No commands are missing from the menu: the same items are listed at desktop and phone width; the "missing" entry is the code-review row whose name has zero width.
  • The code is unchanged on main at da3e60b.
  • No existing issue found (searched "argument hint", "slash menu overflow", "typeahead mobile", "slash command name hidden").

Suggested priority and effort (optional)

Low–Medium: affects every mobile user who opens / in a Claude Code thread (the command is built in); workaround is typing the full command name; no data loss. Effort Low (CSS only).

Checks

  • I reproduced this on the latest release or on main, or I say above that I could not.
  • I searched open and closed issues for the same problem.
  • If an agent wrote this, the body ends with > AGENT GENERATED and links the thread or report.

The investigation ran in a private bb thread, so there is no public link; the measurements above are the full findings.

AGENT GENERATED

Activity

  1. added theissue type on Nov 14, 2026
  2. added
    ui
    mobile
    confirmed-repro
    on Nov 14, 2026
  3. bb-slop-cop commented on Nov 14, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority Medium · Effort Low. Applied labels: ui, mobile, confirmed-repro.
    • Verdict: REPRODUCED, with high root-cause confidence. Reproduction and root-cause report.
    • Root cause: An unbounded, non-shrinking argument hint consumes the flex row, collapses the command name, and creates horizontal overflow.
    • Verification: Reproduced against trusted origin/main in two clean checkouts using the real component and Chromium. The browser regression fails before repair and passes for a local candidate at 320, 402, 768, and 1280px. Existing composer tests: 96 passed; typecheck and lint passed. Safari and a live provider were not tested.
    • No new PR: #7565 appeared during investigation and already links this issue. The local candidate was stopped without committing or pushing to avoid a duplicate; the existing PR received static review only.
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

    confirmed-repromobileui

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions