Skip to content

fix(tui): persist provider selection during retry backoff - #834

Merged
agenteinstinct1-max merged 2 commits into
dev-vibecodedfrom
fix/tui-provider-switch-during-retry-831
Nov 10, 2026
Merged

agenteinstinct1-max merged 2 commits into
dev-vibecodedfrom
fix/tui-provider-switch-during-retry-831

Conversation

@agenteinstinct1-max

Copy link
Copy Markdown
Collaborator

Closes #831

Summary

  • Treat retry backoff as a running status when propagating a TUI model/provider selection to the session row.
  • Pass the actual session status into selectionUpdate, preserving idle suppression, same-selection idempotence and agent/session isolation.
  • Add helper and mounted TUI SDK PATCH regressions for mid-backoff switching, idle routing and rejected writes.

Validation

Externally authored with official OpenCode and a zero-cost model, on c54ff0e. Three files only, no lockfile or workflow changes.

Actual repository focused tests reported: 54 pass, 1 pre-existing skip, 0 fail, 273 expectations across test/context/local.test.ts and test/cli/tui/dialog-agent-effort.test.tsx. The mounted regression verifies the SDK PATCH propagation; this is not yet a claim that the complete TUI-to-backend provider-switch flow has been accepted.

Negative-control proof, real TUI/backend acceptance, independent review and exact-head CI remain pending. No live or paid provider request is required for acceptance. Do not treat this PR's publication as a completed fix.

@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@kilo-code-bot

kilo-code-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • packages/tui/src/context/local.tsx
  • packages/tui/test/cli/tui/dialog-agent-effort.test.tsx
  • packages/tui/test/context/local.test.ts
Previous Review Summary (commit fcba774)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit fcba774)

Status: 4 Issues Found | Recommendation: Address WARNING and consider SUGGESTIONS before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 3
Issue Details (click to expand)

WARNING

File Line Issue
packages/tui/src/context/local.tsx 64 status parameter should use a union type ("busy" | "retry" | "idle" | undefined) instead of string for type safety and self-documentation

SUGGESTION

File Line Issue
packages/tui/src/context/local.tsx 67 Add comment documenting that unknown statuses are treated as not running (fail-safe behavior)
packages/tui/src/context/local.tsx 936-938 Replace JSON.stringify(update) deduplication with explicit field comparison to avoid serialization order ambiguity
packages/tui/test/context/local.test.ts - Add test case for session: { id: "session" } (session without model field) to verify expected behavior
Files Reviewed (3 files)
  • packages/tui/src/context/local.tsx - 4 issues
  • packages/tui/test/context/local.test.ts - 1 issue (test coverage)
  • packages/tui/test/cli/tui/dialog-agent-effort.test.tsx - 0 issues (new tests are comprehensive)

Fix these issues in Kilo Cloud


Reviewed by free · Input: 38.8K · Output: 16.6K · Cached: 99.7K

@agenteinstinct1-max
agenteinstinct1-max merged commit c7bfa40 into dev-vibecoded Nov 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant