Skip to content

fix(statusline): Drop the duplicated session name from the status row - #106

Merged
4ndreello merged 3 commits into
mainfrom
fix/statusline-trim
Sep 23, 2026
Merged

4ndreello merged 3 commits into
mainfrom
fix/statusline-trim

Conversation

@4ndreello

Copy link
Copy Markdown
Owner

The status row showed the session name twice: once on the input border, where Claude Code draws it after /rename, and again as the first field of the statusline (read from the name sidecar, capped at 30 chars). That field used ~30 columns, so the tail with context, tokens and cost got cut to …. Inside a Claude Code worktree the row also repeated the slug as happy-wandering-matsumoto/worktree-happy-wandering-matsumoto.

plugin/statusline.sh no longer reads the sidecar, so the role is the first field again, as criteria 8 and 9 of the spec already required. When the branch equals the project basename or worktree-<basename>, only the branch is rendered. Any other branch keeps project/branch.

Before: Otimizar performance do startu · orchestrator-edit · happy-wandering-matsumoto/worktree-happy-wandering-matsumoto · ctx 88% · …
After: orchestrator-edit · worktree-happy-wandering-matsumoto · ctx 88% · <tok> · <cost>

The sidecar itself is untouched: it still feeds the /rename injection.

Spec: .specs/features/run-usage-statusline/spec.md, criteria 9.1 to 9.3.

Not covered: CodeDeck's own worktrees (<session-id> directory, ra/<slug>-<id> branch) don't collapse. README.md:133 still documents an older layout with <model>.

Tests

  • npx vitest run tests/statusline.test.ts tests/usage-statusline-contract.test.ts: 2 files, 18 passed
  • npx vitest run tests/usage-statusline-contract.test.ts tests/plugin-manifest.test.ts tests/open-args.test.ts: 3 files, 110 passed (first commit)
  • Mutation probes, all killed: re-adding the task name field, collapsing only on branch === project, collapsing always, loosening the match to branch.endsWith(project).

4ndreello and others added 3 commits September 22, 2026 22:43
Remove the sidecar task name from the statusline and collapse redundant project and branch labels.

Co-Authored-By: Codex <noreply@openai.com>
Pin that only an exact project or worktree-<project> branch collapses, so a loose includes or endsWith match fails the suite.
The README still listed a <model> field and the old ULTRA prefix. Describe the fields plugin/statusline.sh emits and the branch collapse rule.
@sonarqubecloud

Copy link
Copy Markdown

@4ndreello
4ndreello merged commit 67c0b01 into main Sep 23, 2026
4 checks passed
@4ndreello
4ndreello deleted the fix/statusline-trim branch September 23, 2026 02:49
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