Repository navigation
fix(tui): keep stale agent picker closed after refresh failure - #116715
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 31, 2026, 3:53 AM ET / 07:53 UTC. ClawSweeper reviewWhat this changesThe PR changes the terminal UI so the agent picker opens only after a successful fresh roster response, while a failed refresh retains the cached roster for passive display and reports the gateway error. Merge readinessKeep this PR open for explicit maintainer handling: the targeted freshness gate is a focused, source-consistent repair with supplied PTY proof, but the Priority: P2 Review scores
Verification
How this fits togetherThe terminal UI fetches the Gateway’s agent roster and stores the normalized result in local session state. Slash commands and keyboard shortcuts use that state to open the agent picker, which can change the active agent and session selection. flowchart LR
A[User runs /agents or Ctrl+G] --> B[Terminal UI command handler]
B --> C[Refresh agent roster]
C --> D{Gateway response succeeds?}
D -->|Yes| E[Normalize and store fresh roster]
E --> F[Open agent picker]
D -->|No| G[Show actionable error]
G --> H[Keep cached roster closed for display only]
Decision needed
Why: This is a user-visible session-selection policy during backend unavailability, and the protected Before merge
Agent review detailsSecurityNone. PR surfaceSource +23, Tests +129. Total +152 across 5 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the explicit successful-refresh result at the TUI session-action boundary, preserve cached data only for non-interactive display, and merge after the responsible TUI reviewer accepts the outage behavior and the remaining checks finish. Do we have a high-confidence way to reproduce the issue? No live current-main reproduction was independently run in this read-only review, but the failure path is source-reproducible: a rejected Is this the best way to solve the issue? Yes. Returning an explicit refresh result at the session-action boundary lets the command handler distinguish fresh data from cached display state without discarding the last good roster or adding configuration surface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 37b1a7165406. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
TUI owner decision: accepted. We accept the safer outage policy on this exact head: cached agent data may remain visible for passive context, but |
|
Merged via squash.
|
* repair/pr-111802-preserve: (3263 commits) test: type session request parameters (openclaw#116713) fix: retain event invalidation for pagination docs: note queued session refresh fix fix: preserve queued session refresh options fix(exec): require approval for abbreviated inline eval flags [AI] (openclaw#116529) fix: keep owner-only tools out of non-owner skill commands [AI] (openclaw#116532) fix(ui): bound Talk relay microphone uplink fix(tui): require a fresh agent roster (openclaw#116715) fix(memory-wiki): preserve user edits when rolling back ChatGPT imports (openclaw#116517) fix(agents): cron failures preserve timeout and cancellation reasons (openclaw#116566) fix(release): unblock beta validation workflows (openclaw#116708) fix(ci): discover frozen target startup benchmark cases (openclaw#116711) fix(session): preserve reset message payloads (openclaw#116195) fix(qa): tolerate loaded-runner bus delivery stalls (openclaw#116448) improve(ci): rebalance embedded agent test configs (openclaw#116436) fix(browser): return committed trace path (openclaw#116702) fix(qa): exceed Slack table aggregate limit in fallback probe (openclaw#116447) fix(qa): use built plugin tools server (openclaw#116442) fix(test): keep memory FD repro config valid (openclaw#116698) fix(telegram): keep queued tool progress in one message (openclaw#116685) ...
* preserve/pr-109971-ollama-show-inspection-20260731: (4302 commits) fix(agents): resume interrupted turns past progress commentary (openclaw#116725) fix(gateway): sign device proofs with challenge time (openclaw#116679) fix(testing): load relay smoke through UI Vite config test(testing): guard realtime relay smoke module path fix(testing): repair realtime relay live smoke import test: type session request parameters (openclaw#116713) fix: retain event invalidation for pagination docs: note queued session refresh fix fix: preserve queued session refresh options fix(exec): require approval for abbreviated inline eval flags [AI] (openclaw#116529) fix: keep owner-only tools out of non-owner skill commands [AI] (openclaw#116532) fix(ui): bound Talk relay microphone uplink fix(tui): require a fresh agent roster (openclaw#116715) fix(memory-wiki): preserve user edits when rolling back ChatGPT imports (openclaw#116517) fix(agents): cron failures preserve timeout and cancellation reasons (openclaw#116566) fix(release): unblock beta validation workflows (openclaw#116708) fix(ci): discover frozen target startup benchmark cases (openclaw#116711) fix(session): preserve reset message payloads (openclaw#116195) fix(qa): tolerate loaded-runner bus delivery stalls (openclaw#116448) improve(ci): rebalance embedded agent test configs (openclaw#116436) ...
* preserve/pr-107473-ollama-stream-ndjson-cap: (5598 commits) chore(changelog): remove release-owned entry fix(agents): resume interrupted turns past progress commentary (openclaw#116725) fix(gateway): sign device proofs with challenge time (openclaw#116679) fix(testing): load relay smoke through UI Vite config test(testing): guard realtime relay smoke module path fix(testing): repair realtime relay live smoke import test: type session request parameters (openclaw#116713) fix: retain event invalidation for pagination docs: note queued session refresh fix fix: preserve queued session refresh options fix(exec): require approval for abbreviated inline eval flags [AI] (openclaw#116529) fix: keep owner-only tools out of non-owner skill commands [AI] (openclaw#116532) fix(ui): bound Talk relay microphone uplink fix(tui): require a fresh agent roster (openclaw#116715) fix(memory-wiki): preserve user edits when rolling back ChatGPT imports (openclaw#116517) fix(agents): cron failures preserve timeout and cancellation reasons (openclaw#116566) fix(release): unblock beta validation workflows (openclaw#116708) fix(ci): discover frozen target startup benchmark cases (openclaw#116711) fix(session): preserve reset message payloads (openclaw#116195) fix(qa): tolerate loaded-runner bus delivery stalls (openclaw#116448) ...
…-supported-paths * origin/main: (115 commits) test: type session request parameters (#116713) fix: retain event invalidation for pagination docs: note queued session refresh fix fix: preserve queued session refresh options fix(exec): require approval for abbreviated inline eval flags [AI] (#116529) fix: keep owner-only tools out of non-owner skill commands [AI] (#116532) fix(tui): require a fresh agent roster (#116715) fix(memory-wiki): preserve user edits when rolling back ChatGPT imports (#116517) fix(agents): cron failures preserve timeout and cancellation reasons (#116566) fix(release): unblock beta validation workflows (#116708) fix(ci): discover frozen target startup benchmark cases (#116711) fix(session): preserve reset message payloads (#116195) fix(qa): tolerate loaded-runner bus delivery stalls (#116448) improve(ci): rebalance embedded agent test configs (#116436) fix(browser): return committed trace path (#116702) fix(qa): exceed Slack table aggregate limit in fallback probe (#116447) fix(qa): use built plugin tools server (#116442) fix(test): keep memory FD repro config valid (#116698) fix(telegram): keep queued tool progress in one message (#116685) fix(qa): stop waiting on yielded fanout runs (#116440) ... # Conflicts: # src/system-agent/setup-inference-detect.ts # ui/src/e2e/model-setup.e2e.test.ts
…-supported-paths * origin/main: (115 commits) test: type session request parameters (openclaw#116713) fix: retain event invalidation for pagination docs: note queued session refresh fix fix: preserve queued session refresh options fix(exec): require approval for abbreviated inline eval flags [AI] (openclaw#116529) fix: keep owner-only tools out of non-owner skill commands [AI] (openclaw#116532) fix(tui): require a fresh agent roster (openclaw#116715) fix(memory-wiki): preserve user edits when rolling back ChatGPT imports (openclaw#116517) fix(agents): cron failures preserve timeout and cancellation reasons (openclaw#116566) fix(release): unblock beta validation workflows (openclaw#116708) fix(ci): discover frozen target startup benchmark cases (openclaw#116711) fix(session): preserve reset message payloads (openclaw#116195) fix(qa): tolerate loaded-runner bus delivery stalls (openclaw#116448) improve(ci): rebalance embedded agent test configs (openclaw#116436) fix(browser): return committed trace path (openclaw#116702) fix(qa): exceed Slack table aggregate limit in fallback probe (openclaw#116447) fix(qa): use built plugin tools server (openclaw#116442) fix(test): keep memory FD repro config valid (openclaw#116698) fix(telegram): keep queued tool progress in one message (openclaw#116685) fix(qa): stop waiting on yielded fanout runs (openclaw#116440) ... # Conflicts: # src/system-agent/setup-inference-detect.ts # ui/src/e2e/model-setup.e2e.test.ts
What Problem This Solves
Fixes an issue where
/agentsor Ctrl+G could open the last cached agent roster afteragents.listfailed. An operator could then select stale data and mutate the local agent/session tuple while the Gateway was unavailable.Why This Change Was Made
Agent roster refresh now returns an explicit binary result. The TUI preserves the last good roster for passive display, but the interactive picker opens only after a fresh successful response; failures remain visible in the chat log.
User Impact
When agent discovery fails, the TUI shows the actionable error and keeps the stale picker closed. A later successful refresh still opens the normalized current roster normally.
Evidence
agents.listcall to fail, displayedagents list failed: gateway unavailable, and then delivered typed input tosendChat. That final input proves no stale picker overlay consumed it. Verdict:PASS, with two refresh calls and visible failure, on Testboxtbx_01kyvh5p4hzyrzr520yvmf5mgz(run 30612928358).