Seed session pickers from the state DB#27945
Draft
charliemarsh-oai wants to merge 4 commits into
Draft
Conversation
8d5588c to
87acf60
Compare
3e9014b to
7717f16
Compare
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.
Summary
Local resume and fork pickers currently wait for the filesystem-backed scan-and-repair lookup before showing sessions, even when the State DB can provide an indexed first page immediately. This change uses that indexed page to make the picker interactive sooner while preserving scan-and-repair as the authoritative result.
For local workspaces, the initial load now:
Picker page, preview, and transcript RPCs run as independently tracked tasks. This lets provisional transcript actions proceed while reconciliation is pending. Closing the picker aborts and drains those client tasks before shutting down its dedicated app-server session, instead of waiting for reconciliation to finish first.
Selecting a provisional row validates only that rollout before resuming or forking. The validation uses the same bounded rollout summary as filesystem listing and rechecks that the path is discoverable under active sessions, the thread ID still matches, and the current provider, source, cwd, and typed-search filters still accept the authoritative metadata. Search validation also preserves the State DB title and Git branch overlays that the reconciled row would display.
The loading, provisional-state, reconciliation, validation, and focused tests now live in
tui/src/resume_picker/loading.rsandtui/src/resume_picker/loading_tests.rsinstead of extending the already-large picker module.Remote workspaces keep the existing direct scan-and-repair behavior. This reduces initial display latency; it does not reduce the total filesystem work performed by reconciliation.
Testing
just test -p codex-tui resume_picker(103 tests)