Skip to content

refactor(statusline): drop token line, simplify context segment#22

Merged
aksOps merged 1 commit intomainfrom
refactor/statusline-simplify
May 10, 2026
Merged

refactor(statusline): drop token line, simplify context segment#22
aksOps merged 1 commit intomainfrom
refactor/statusline-simplify

Conversation

@aksOps
Copy link
Copy Markdown
Contributor

@aksOps aksOps commented May 9, 2026

Summary

  • Removes line 3 of the statusline (cumulative / session token totals + effort tail).
  • Context segment renders ctx <pct>% only — label renamed from c, parenthesised token count dropped.
  • Cleans up consequentially-dead code: buildTokenLine, readEffortLevel, unused color constants (cTokIn/cTokOut/cDimGray), internal/claude import.

Final layout:

```
Opus 4.7 (1M) ~/projects/ctm
ctx 11% w 40% h 10%
```

Test plan

  • go vet -tags sqlite_fts5 ./... clean
  • go test -tags sqlite_fts5 -race -count=1 ./... — 887 pass / 27 packages
  • make build ok
  • Smoke test: piped a sample payload to `ctm statusline`, output is exactly 2 lines, no ↑/↓/⚡, context shows ctx 11%.

Notes

  • contextTokens / fmtTokens helpers + their unit tests remain. No production caller, but kept for safety and to avoid scope creep; happy to remove in a follow-up if preferred.

🤖 Generated with Claude Code

Statusline shrinks from 3 lines to 2 and the context segment renders
just `ctx <pct>%` (no parenthesised token sum). Removes:

- Line 3 cumulative session ↑/↓ token totals + trailing effort tail
- buildTokenLine, readEffortLevel, unused color constants (cTokIn,
  cTokOut, cDimGray)
- claude package import (no longer needed for effort lookup)
- Obsolete tests for the dropped token-count behaviour

Token-count helpers (contextTokens, fmtTokens) and their unit tests
remain — no production caller, but the formatting behaviour stays
verified for any future reuse.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 9, 2026

@aksOps aksOps merged commit 0145ce6 into main May 10, 2026
11 of 12 checks passed
@aksOps aksOps deleted the refactor/statusline-simplify branch May 10, 2026 03:55
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