fix(tui): plan mode reachable (/plan, PLAN badge, --plan-mode), @bare-name completion, matching question-box borders, bubble width/tabs (#1407) - #1408
Merged
Conversation
…nored by the TUI Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJGxhoFhA8JjkwZFcLGdS5
…he status bar, --tui --plan-mode honored Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJGxhoFhA8JjkwZFcLGdS5
…d runTUI test updated Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJGxhoFhA8JjkwZFcLGdS5
… contain no tabs; streamed-transcript and interrupted-card guards Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJGxhoFhA8JjkwZFcLGdS5
…s, trim padding so assistant bubbles never exceed the terminal width Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJGxhoFhA8JjkwZFcLGdS5
… file names Red: want the two calc files, got [] Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJGxhoFhA8JjkwZFcLGdS5
… names Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJGxhoFhA8JjkwZFcLGdS5
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJGxhoFhA8JjkwZFcLGdS5
…border line Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJGxhoFhA8JjkwZFcLGdS5
…engineering-log entry Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJGxhoFhA8JjkwZFcLGdS5
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Closes #1407
Summary
A twelve-scenario live walk of the TUI (fake provider with scripted streaming and tool turns, plus OpenRouter DeepSeek) surfaced several first-time-user problems. This PR fixes four with red-first tests and live tmux proof: plan mode is now reachable and visible,
@nameTab completion works for bare file names, the question and plan-approval boxes have matching borders, and assistant markdown bubbles never exceed the terminal width or contain tabs. Two guards are added for behaviours that were already correct (streamed-transcript integrity; no duplicate tool card on ctrl+o after an interrupt).The streamed-markdown truncation under a real color profile turned out to be a separate, deeper streaming re-render accounting defect (not the bubble width, which is fixed and unit-tested); it is filed as its own issue and not claimed fixed here — see the scope note on #1407.
Scope and issue reconciliation
Fixed: (1)
/plancommand toggles enforced plan mode, aPLANbadge shows in the status bar, andharnesscli --tui --plan-modeis honored (previouslyrunTUIdropped the flag andctrl+oonly reached plan mode before any tool call ran); (2)@cal+Tab completes bare relative names; (3) AskUserQuestion / Plan-Approval box borders sized to content; (4) assistant bubbles render markdown at the indented width, expand tabs, trim padding. Out of scope and filed separately: streaming glamour reflow truncation, ctrl+o precedence redesign.Impact analysis reconciliation
cmd/harnesscli/tui/model.go:executePlanCommand,PLANbadge instatusBarModelLabel,cfg.PlanModeapplied inNew.cmd/harnesscli/tui/cmd_parser.go:/planregistered (registry-completeness test updated).cmd/harnesscli/main.go:runTUIgains aplanModearg (test updated).cmd/harnesscli/tui/config.go:TUIConfig.PlanMode.cmd/harnesscli/tui/filecomplete.go: bare relative names complete.cmd/harnesscli/tui/askuser.go: box borders sized to content.cmd/harnesscli/tui/components/messagebubble/assistant.go:fitLine, render atcontentWidth.Test-first evidence
Red commands (per slice, on the branch):
TestPlanCommand_TogglesAndShowsInStatusBar/TestTUIConfig_PlanModeFlag;TestFilePathCompleter_BareRelativeName(want the two calc files, got []);TestAssistantBubble_FitsWidthAndHasNoTabs(line contains a tab/is N columns wide);TestAskUser_Overlay_BordersMatch(border widths differ: top 12 vs bottom 50).Green:
go test ./cmd/harnesscli/... -race→ 30 packages ok.Verification evidence
Live tmux 120x40, built binary:
Plan approval reached via /plan (PLAN badge in the status bar):
@bare-name Tab completion:
Question box borders match:
Rollout and rollback
TUI-only; rebuild with
scripts/install.sh, restart the TUI. Rollback: revert.Documentation
website/docs/cli/tui.mdplan-mode note; engineering-log entry.Contract checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01WJGxhoFhA8JjkwZFcLGdS5