Repository navigation
fix(status): prefer waiting over working matches - #203
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe change updates Claude’s default waiting rules and status matching. Waiting matches can override earlier working matches. Matching scopes now include approval-dialog footers when required. Tests cover Claude and Codex approval and input states. ChangesWaiting-state detection
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/status/status_test.go`:
- Around line 56-135: Add a dedicated test in the Claude status-test block using
defaultEngine with a pane containing “Enter to confirm” alongside a stale
working-spinner signal, and assert Match returns Waiting with matched=true. Keep
the existing numbered-dialog coverage unchanged and follow the assertions used
by TestClaudeMixedApprovalPane.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 9eddc296-be3d-457f-b19a-c137ab5279e8
📒 Files selected for processing (4)
internal/config/config.gointernal/config/config_test.gointernal/status/status.gointernal/status/status_test.go
YoanWai
left a comment
There was a problem hiding this comment.
Thanks for this one! Ran the full race suite here plus a live A/B against real panes: the shipped binary reads a numbered draft during an active turn as waiting, this branch reads it correctly as working, and the mixed approval pane resolves to waiting as intended. Nice work on the footer scoping.
|
Shipped in v0.20.0. |
What changed
waitingrule over an earlierworkingmatch within the current pane turn.Why
An approval dialog can coexist with a stale spinner or
esc to interruptline. Returning the first working match makes the session look busy even though it is blocked on the user. The match-time precedence is required for existingconfig.tomlfiles whose rule order is not migrated.Closes #112
How it was verified
go test ./internal/config ./internal/statusgo vet ./...go build ./...git diff --checkEvery changed Go file passes
gofmt -l.Synthetic merge trees with the current heads of feat: fork sessions into named siblings #200 and feat(config): add Pi as a built-in tool #201 are conflict-free; those PRs touch adjacent config/test sections but do not implement this status precedence.
go test ./...was also attempted on Windows. The touched packages pass, while unrelated packages hit existing Windows-specific assertions and Application Control blocks some temporary test executables.gofmt -l .prints nothing (the Windows CRLF checkout makes the repository-wide form non-actionable; all four changed files pass)go vet ./...passesgo test -race ./...passes (not run: this Windows host has no C compiler)Ran it against real sessions