fix(tui): distinguish location loading from data sync failures - #46961
Open
kitlangton wants to merge 2 commits into
Open
fix(tui): distinguish location loading from data sync failures#46961kitlangton wants to merge 2 commits into
kitlangton wants to merge 2 commits into
Conversation
This was referenced Sep 3, 2026
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.
Why
When
/api/locationsucceeds but/api/agentreturns HTTP 500, the TUI replaces the composer with “Session location unavailable” and tells the user to choose another directory. Moving does not address that catalog failure, and the user loses access to their draft while the panel is shown.What Changes
The existing
syncInfo/syncboundary is enough to distinguish these cases: successful location info stays cached, while failed reads remain retryable. Original causes remain available in location state or logs. Disconnect invalidates the existing attempt generation before the buffered reconnect event arrives.Demo
location-sync-comparison.mp4
Before:
d9c85d8d95. After:d036479eff. Both run the production TUI through the same deterministic OpenCode Drive fixture at 100×30, with a simulated provider and a loopback HTTP proxy returning 500 only for/api/agent;/api/locationsucceeds. After the endpoint is healed, the new Retry action reloads it without losing the draft. Equal-length clips are shown sequentially to keep terminal text readable; startup is trimmed, not accelerated.Scope
Overlaps #45601, but keeps this fix TUI-local: no new protocol errors, filesystem probes, client generation, or server cache changes. In particular, the existing server can still return cached location info after a booted directory is deleted; this PR does not add deletion detection or claim to resolve the separate, unconfirmed unknown-shell incident.
Verification
d9c85d8d95with the old directory-recovery panel.