Skip to content

fix(threads): render the branch picker as a compact panel row - #470

Merged
nixuuu merged 1 commit into
devfrom
fix/thread-branch-row
Nov 10, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/thread-branch-row

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 10, 2026

Copy link
Copy Markdown
Member

Change

The thread-details branch picker had a 128 px minimum height, a chevron aligned with the label, and an upstream name that wrapped into awkward fragments. Render Branch and Worktree with shared compact field layouts on web/desktop and mobile: no resting fill, content-driven height, reserved value-line chevron, and middle-truncated upstream names with the full value in a web tooltip or selectable native text.

Running/offline/unsupported states keep the same muted row and an explanation. A dirty result from the existing branch-list request disables branch selection and shows “Commit or stash changes before switching branches.” Reopening refreshes the status after cleanup; the worker still enforces a fresh status before switching. Native picker options use compact single-line labels.

Fixes: #422

Verification

  • bun install --frozen-lockfile, bun run gen:check, bun run typecheck, bun run lint, bun run format:check, and bun run --filter @canopy/web build passed. No UI tests added; full check:tmp left to CI as requested.
  • Inspected the production placement components in Chromium using an isolated temporary fixture with mocked branch responses: light/dark at 1280, 768, and 390 px, plus 320 px light; short, typical, and very long branch/base names; detached HEAD; running, unsupported, offline, and dirty states; hover, keyboard focus, Enter, Escape, and focus return. The typical branch row is 84 px including its three text lines, with no spare bottom area; a checkout without a base line is 60 px. No horizontal overflow at phone widths. Fixtures and images are excluded from the commit.
  • Checked picker search, selected current-branch check, local/remote groups, long option tooltips, phone sheet, and a 32-option scrolling list. List padding and scroll padding are 4 px; sticky headings meet the search divider, and the final option retains a 4 px bottom inset.
  • bunx [email protected] fingerprint:generate --platform ios --build-profile production --json --non-interactive and the equivalent Android command passed before and after the changes. iOS remains 6ddec9ef559ee0095ac33e94ff9418a942053b17; Android remains 5f6eae3ab278f1cd543e9ed763f923a319b65ec9. Mobile changes are TS/TSX only. Native device rendering and live gateway/worker flows were not exercised.

Copy audit (docs/copy.md §8)

  • Existing Branch, Worktree, from, picker/search labels, errors, and detached-HEAD text are unchanged. Existing availability reasons move from inline text to a hover/focus/long-press tooltip on web, keeping the row compact and keyboard reachable; native reasons remain inline.
  • No dirty-status explanation → “Commit or stash changes before switching branches.” One short action sentence identifies how to restore availability; the same wording is used on both clients. No new glossary terms or decorative copy. Checked short, typical, and long names at desktop and phone widths; text and accessibility state convey availability alongside color.

@nixuuu
nixuuu merged commit 10b3e6d into dev Nov 10, 2026
9 checks passed
@nixuuu
nixuuu deleted the fix/thread-branch-row branch November 10, 2026 08:37
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