Skip to content

Clip worktree and branch names at the start in the workspace list - #528

Merged
powerfooI merged 1 commit into
powerfooI:mainfrom
thiblahute:upstream/start-ellipsis
Oct 31, 2026
Merged

powerfooI merged 1 commit into
powerfooI:mainfrom
thiblahute:upstream/start-ellipsis

Conversation

@thiblahute

Copy link
Copy Markdown
Collaborator

In the workspace list, a worktree nested under its repository mostly repeats the repository's name, and branch names share prefixes (task/, a user name). Both clipped at the end, so the part that tells them apart was the part that got cut.

Nested worktree names and branch badges now clip at the start and keep the end (…ject-system-iga-184, …video-direction). The full name stays in the tooltip. Top-level workspace names still clip at the end.

Changes

  • .start-ellipsis in WorkspaceTree.css: a right-to-left box, so the ellipsis is drawn at the start, with an isolated left-to-right inner span so the text itself is unchanged.
  • WorkspaceRow applies it to child rows' labels; GitStatusBadges applies it to the branch badge.
  • scripts/check-web-assets.mjs: the initial JS budget moves from 805 to 806 KiB. main was at 805.0/805 KiB; this change puts it at 805.1 KiB.

Verification

  • bun test web/src/components/WorkspaceTree.test.ts web/src/components/WorkspaceTree.servers.test.ts web/src/components/ModalDialogs.test.ts: 3 pass, 0 fail (label and branch text content unchanged).
  • bun run format:check on the changed files: clean.
  • bun run lint: clean apart from the existing TerminalView.tsx exhaustive-deps warning.
  • bun run typecheck: passes, including the web build and asset budget check (initial JS 805.1/806 KiB).
  • bun run test:quick with an isolated HOME, on main plus this change and the other small fixes I am sending alongside: 3965 pass, 4 skip, 2 fail. Both failures (useMobileControlsDrag.keyboard.test.ts and the SSH paths test) fail the same way on main on macOS.

Checked before this rebase in Chrome with a long nested worktree name and branch. Not repeated on this branch, and not checked in Safari or Firefox.

Manual checks:

  • Narrow sidebar with a nested worktree whose name is longer than the row: the start is clipped, the end is visible, the tooltip shows the full name.
  • A long branch badge clips at the start; a top-level workspace name still clips at the end.
  • Names with non-Latin or right-to-left text still read in their own order.

Compatibility

Markup and CSS only.

A worktree nested under its repository mostly repeats the repository's
name, and branch names share prefixes (task/, a user name): what tells
them apart is their end. Their labels now keep the end and clip the start
(…ject-system-iga-184, …video-direction); the full name stays in the
tooltip. Top-level workspace names still clip at the end.

The initial JS goes from 805.0 to 805.1 KiB, so its budget moves from 805
to 806 KiB.
@github-actions github-actions Bot added the enhancement New feature or request label Oct 31, 2026

Copy link
Copy Markdown
Owner

Reviewed the start ellipsis CSS, isolated inner text, child-row targeting, and full-name tooltip behavior. Combined verification on current main plus all six contributions: bun run format:check, bun run typecheck (including the web build and asset budgets), and bun run test:quick all passed: 3968 pass, 4 conditional skips, 0 fail. Initial JS is 805.4/806 KiB. Native Bun checks and lint passed in the correction commits' pre-commit hooks (existing TerminalView exhaustive-deps warning remains).

I could not repeat browser visual checks: computer-use access was blocked by the current browser URL policy. The author's prior Chrome check remains the available visual evidence; Safari/Firefox and RTL rendering were not rechecked.

@powerfooI
powerfooI merged commit 0e14a8d into powerfooI:main Oct 31, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants