Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions doc/changelog/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,16 @@ not deferred to release. `release-tag.sh` promotes `[Unreleased]` →

### Changed

- **Compact ccstatusline layout** (`module/config/claude/ccstatusline.settings.json`,
refs #416). Row 1 is now `model (effort) | Ctx <pct> | Usage: 7d <pct> ↻
<reset>` and row 2 is `cwd | git-branch | git-changes`. Dropped the
`Total: <tokens> (<cost>)` group, the 5h usage widgets (`session-usage`,
`reset-timer`; a Max 20x plan has no 5h window, so they only rendered
`[Timeout]` / `[Rate limited]`) and the compaction counter, and shortened the
`Context: ` label to `Ctx `. ccstatusline 2.2.19 has no per-plan show/hide
option, so the layout is fixed at template level. No script or deploy-path
change; the three layout specs in `test/unit/module/claude-code-config_spec.bats`
were updated to assert the new rows (and the removed widgets staying out).
- **yazi no longer renders/previews PDFs** (`module/config/yazi/yazi.toml`).
Removed the two `{ mime = "application/pdf", run = "pdf" }` rules from the
`[plugin]` `preloaders` and `previewers` lists so PDF files fall through to
Expand Down
34 changes: 10 additions & 24 deletions module/config/claude/ccstatusline.settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,26 @@
"version": 3,
"lines": [
[
{ "id": "1", "type": "current-working-dir", "color": "blue", "metadata": { "fishStyle": "true" } },
{ "id": "2", "type": "separator" },
{ "id": "10", "type": "git-branch", "color": "magenta", "metadata": { "hideNoGit": "true" } },
{ "id": "11", "type": "separator" },
{ "id": "12", "type": "git-changes", "color": "yellow", "metadata": { "hideNoGit": "true" } },
{ "id": "48", "type": "separator" },
{ "id": "3", "type": "model", "color": "cyan", "rawValue": true },
{ "id": "4", "type": "custom-text", "color": "brightBlack","customText": " (" },
{ "id": "5", "type": "thinking-effort", "color": "cyan", "rawValue": true },
{ "id": "47", "type": "custom-text", "color": "brightBlack","customText": ")" },
{ "id": "6", "type": "separator" },
{ "id": "31", "type": "custom-text", "color": "brightBlack","customText": "Total: " },
{ "id": "15", "type": "tokens-total", "color": "white", "rawValue": true },
{ "id": "32", "type": "custom-text", "color": "brightBlack","customText": " (" },
{ "id": "30", "type": "session-cost", "color": "green", "rawValue": true },
{ "id": "33", "type": "custom-text", "color": "brightBlack","customText": ")" }
],
[
{ "id": "28", "type": "custom-text", "color": "brightBlack","customText": "Context: " },
{ "id": "51", "type": "separator" },
{ "id": "28", "type": "custom-text", "color": "brightBlack","customText": "Ctx " },
{ "id": "17", "type": "context-percentage", "color": "white", "rawValue": true },
{ "id": "34", "type": "custom-text", "color": "brightBlack","customText": " (" },
{ "id": "25", "type": "compaction-counter", "color": "yellow", "metadata": { "format": "number" } },
{ "id": "35", "type": "custom-text", "color": "brightBlack","customText": ")" },
{ "id": "45", "type": "separator" },
{ "id": "36", "type": "custom-text", "color": "brightBlack","customText": "Usage: 5h " },
{ "id": "37", "type": "session-usage", "color": "yellow", "rawValue": true },
{ "id": "49", "type": "custom-text", "color": "cyan", "customText": " ↻ " },
{ "id": "19", "type": "reset-timer", "color": "cyan", "rawValue": true },
{ "id": "38", "type": "custom-text", "color": "brightBlack","customText": " · 7d " },
{ "id": "38", "type": "custom-text", "color": "brightBlack","customText": "Usage: 7d " },
{ "id": "21", "type": "weekly-usage", "color": "yellow", "rawValue": true },
{ "id": "50", "type": "custom-text", "color": "cyan", "customText": " ↻ " },
{ "id": "41", "type": "weekly-reset-timer", "color": "cyan", "rawValue": true }
],
[]
[
{ "id": "1", "type": "current-working-dir", "color": "blue", "metadata": { "fishStyle": "true" } },
{ "id": "2", "type": "separator" },
{ "id": "10", "type": "git-branch", "color": "magenta", "metadata": { "hideNoGit": "true" } },
{ "id": "11", "type": "separator" },
{ "id": "12", "type": "git-changes", "color": "yellow", "metadata": { "hideNoGit": "true" } }
]
],
"flexMode": "full",
"compactThreshold": 60,
Expand Down
29 changes: 17 additions & 12 deletions test/unit/module/claude-code-config_spec.bats
Original file line number Diff line number Diff line change
Expand Up @@ -407,25 +407,30 @@ _ccs_json="${MODULE_DIR}/config/claude/ccstatusline.settings.json"
assert_success
}

@test "ccstatusline.settings.json has the two-row layout (+ trailing empty row)" {
run jq -e '(.lines | length) == 3
@test "ccstatusline.settings.json has the two-row layout (no trailing empty row)" {
run jq -e '(.lines | length) == 2
and (.lines[0] | length) > 0
and (.lines[1] | length) > 0
and (.lines[2] | length) == 0' "${_ccs_json}"
and (.lines[1] | length) > 0' "${_ccs_json}"
assert_success
}

@test "ccstatusline.settings.json row 1 leads with cwd then git (reordered layout)" {
run jq -e '.lines[0][0].type == "current-working-dir"
and .lines[0][2].type == "git-branch"' "${_ccs_json}"
@test "ccstatusline.settings.json row 2 leads with cwd then git (#416)" {
run jq -e '.lines[1][0].type == "current-working-dir"
and .lines[1][2].type == "git-branch"' "${_ccs_json}"
assert_success
}

@test "ccstatusline.settings.json row 2 inlines reset timers (no separate Reset row)" {
run jq -e '[.lines[1][].type] as $t
| ($t | index("context-percentage")) != null
and ($t | index("reset-timer")) != null
and ($t | index("weekly-reset-timer")) != null' "${_ccs_json}"
@test "ccstatusline.settings.json row 1 shows model, context and weekly usage only (#416)" {
run jq -e '[.lines[0][].type] as $t
| ($t | index("model")) != null
and ($t | index("context-percentage")) != null
and ($t | index("weekly-usage")) != null
and ($t | index("weekly-reset-timer")) != null
and ($t | index("session-usage")) == null
and ($t | index("reset-timer")) == null
and ($t | index("tokens-total")) == null
and ($t | index("session-cost")) == null
and ($t | index("compaction-counter")) == null' "${_ccs_json}"
assert_success
}

Expand Down
Loading