fix(tui): settings overlays — /cost in/out tokens, /profiles row fit, /config ellipsis + [RO] legend + server-default model, /permissions separator (#1405) - #1406
Conversation
…ipsis and [RO] legend, /permissions stray separator; profiles width guard Red output: /cost must show 15,000 in and 700 out; /config must not cut the model id silently; stray separator line in /permissions: "│──". Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJGxhoFhA8JjkwZFcLGdS5
… rows fit the box, /config values get an ellipsis and a wider column with a [RO] legend, /permissions separator fits its box Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJGxhoFhA8JjkwZFcLGdS5
…e model; engineering-log entry Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJGxhoFhA8JjkwZFcLGdS5
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 65420f19a2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1,5 +1,10 @@ | |||
| # Engineering Log | |||
|
|
|||
| ## 2026-09-06 — Settings overlays read wrong to a first-time user (#1405) | |||
There was a problem hiding this comment.
Add the new log entry to the folder index
This commit adds the durable #1405 engineering-log entry while leaving docs/logs/INDEX.md unchanged, so the folder index does not expose the new record. Update the logs index in the same change.
AGENTS.md reference: AGENTS.md:L56-L56
Useful? React with 👍 / 👎.
| ## 2026-09-06 — Settings overlays read wrong to a first-time user (#1405) | ||
|
|
||
| - Symptom: `/cost` showed `↑ 0 in ↓ 15,760 out` after a run (the TUI only tracked a single total and passed it as output); `/profiles` wrapped its highlighted row mid-word; `/config` cut values at 20 characters with no ellipsis (the model id read as `deepseek/deepseek-v4`) and never explained `[RO]`, and showed an empty model cell before a model was chosen; `/permissions` drew a stray `──` line because its separator was as wide as the terminal inside a narrower box. | ||
| - Fix: `applyUsageDelta` keeps cumulative prompt/completion tokens for the cost snapshot; the profile picker sizes rows to the box content area; the config panel widens the value column to the dialog, ends cut values with `…`, adds `[RO] read-only` to the footer and a "(server default — use /model to choose)" placeholder; the permissions panel is sized to the overlay box. Config snapshot goldens regenerated. Live tmux captures in PR. |
There was a problem hiding this comment.
Record this task's success criteria
A repository-wide search finds no #1405 entry or corresponding success definition in docs/logs/long-term-thinking-log.md, even though this entry records the completed implementation. Add the command intent, user intent, and success criteria there so the task's completion contract is durable.
AGENTS.md reference: AGENTS.md:L23-L23
Useful? React with 👍 / 👎.
Closes #1405
Summary
Four settings overlays misled a first-time user:
/costreported 0 input tokens and the total as output,/profileswrapped its highlighted row mid-word,/configcut values at 20 characters without an ellipsis (so the model read asdeepseek/deepseek-v4) and never explained[RO], and/permissionsdrew a stray──line. All four are fixed;/configalso says the server default applies when no model is chosen.Scope and issue reconciliation
The four items in #1405 plus the empty-model placeholder found while verifying (same seam,
configEntriesFromModel). Nothing else.Impact analysis reconciliation
cmd/harnesscli/tui/context_usage.go: cumulative prompt/completion tokens parsed fromusage.delta;model.go: two new fields feedcostSnapshotFromModel; the status bar's total is unchanged.components/profilepicker/view.go: rows sized to the box content area (box width unchanged overall).components/configpanel/view.go: value column sized to the dialog, ellipsis, footer legend; three snapshot goldens regenerated (footer text only).model.gopermissions overlay: panel width = terminal − 4 to fitboxOverlay.Architecture and duplication check
Searched
rg 'costSnapshotFromModel|totalTokens' cmd/harnesscli/tui,rg innerWidth components/profilepicker,rg maxValLen components/configpanel. Changes stay inside the owning components.Test-first evidence
Red command:
go test ./cmd/harnesscli/tui/ -run 'TestCost_|ProfilePicker_Selected|ConfigPanel_Values|NoStraySeparator'(commit 0d782b8)Observed failure:
/cost must show 15,000 in and 700 out;/config must not cut the model id silently;stray separator line in /permissions: "│──". The profiles guard passed in the unit fixture (the wrap only reproduced live); it stays as a regression guard and the live capture below is the proof.Green command:
go test ./cmd/harnesscli/tui/... -race→ 28 packages ok.Verification evidence
Live tmux 120x40 after one real run (OpenRouter, DeepSeek V4 Pro), built binary:
Rollout and rollback
TUI-only; rebuild with
scripts/install.sh, restart the TUI. Rollback: revert.Documentation
Engineering-log entry. No operator doc describes these overlays' internals.
Contract checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01WJGxhoFhA8JjkwZFcLGdS5