refactor(statusline): drop token line, simplify context segment#22
Merged
refactor(statusline): drop token line, simplify context segment#22
Conversation
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>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
↑/↓session token totals + effort tail).ctx <pct>%only — label renamed fromc, parenthesised token count dropped.buildTokenLine,readEffortLevel, unused color constants (cTokIn/cTokOut/cDimGray),internal/claudeimport.Final layout:
```
Opus 4.7 (1M) ~/projects/ctm
ctx 11% w 40% h 10%
```
Test plan
go vet -tags sqlite_fts5 ./...cleango test -tags sqlite_fts5 -race -count=1 ./...— 887 pass / 27 packagesmake buildok↑/↓/⚡, context showsctx 11%.Notes
contextTokens/fmtTokenshelpers + 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