Repository navigation
fix(tui): distinguish asynchronous UI states - #36759
Merged
Merged
Conversation
kitlangton
force-pushed
the
fix-dialog-states
branch
from
July 14, 2026 14:44
579fdae to
962e8fa
Compare
This was referenced Jul 19, 2026
jinhuang712
pushed a commit
to jinhuang712/opencode
that referenced
this pull request
Sep 26, 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.
What
Give asynchronous V2 TUI surfaces distinct loading, loaded-empty, filtered-empty, and failure states.
This implements the state-copy decision tracked in #36707 across shared selectors, skills, integrations, project directories, session search, prompt autocomplete, pairing, and the diff viewer.
Before / After
Before: Several surfaces rendered
No results foundorNo matching itemswhile data was still loading or after a request failed. Pairing could show a transport error andLoading server information...simultaneously, failed diff requests appeared asNo diff!, and stale autocomplete results remained selectable during a new search.After: Loading, source-empty, filtered-empty, and failure states are mutually exclusive. Session search filters the preloaded sessions immediately, then uses the server to find older matches;
Searching sessions…appears only when there is no local match. Errors take precedence over empty states, and failure copy names the real recovery path.How
noMatchViewtoDialogSelect; its default source-empty state is nowNo items availablewhile filtered misses remainNo results found.Scope
This PR does not add loading/error state to the shared bootstrap data model, surface stale-data refresh failures for project directories, or change stash persistence. Those require data-layer work rather than dialog copy changes.
It also does not change static selector terminology or unrelated dialog actions.
Testing
bun run testfrompackages/tui(221 passed, 1 skipped)bun typecheckfrompackages/tuibun turbo typecheck --concurrency=3(32/32 tasks passed)Demo
Synchronized
opencode-drive v0.4.0recording. BEFORE runs the exact PR base (748b0d8836); AFTER runs the state-copy commit (06e3bfe4d0). The local-first session-search follow-up (579fdaebd7) preserves the shown no-local-match states. The video demonstrates command autocomplete no-match, Sessions loaded-empty and filtered-empty, and Diff loaded-empty states.pr-36759-before-after.mp4