Repository navigation
fix(web): bind workspace drafts to confirmed Pi sessions - #482
Merged
tt-a1i merged 3 commits intoSep 8, 2026
Merged
Conversation
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.
Problem
Fixes #467.
With an empty current Session in workspace A, selecting workspace B only updates the displayed workspace. A subsequent snapshot restores A from the current Session's cwd. Before that refresh, sending a prompt can still target A's existing Session even though the UI shows B.
Value
Workspace selection remains stable, and the first prompt from a workspace draft is admitted only after Pi confirms a new active Session in that workspace. Users can retry failures without losing their intended directory or prompt text, or accidentally sending work to the previous repository.
Approach
sessionPathin the client type and rebuild the tracked Web bundle. No backend protocol change or parallel Session lifecycle is introduced.Validation
NODE_OPTIONS=--no-webstorage bun run test: 1,461 Node tests passed, 1 skipped; 128 Vitest tests passed. The temporary flag avoids the local Node 25 experimental WebStorage/jsdom conflict; plainbun run testfails in that environment without it. No global configuration was changed.OPENPI_WEB_BROWSER_EXECUTABLE='/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' ./node_modules/.bin/playwright test --config tests/web/playwright.config.ts: 10/10 passed on the final full run. An earlier full run concurrent with other tests hit an existing logo-animation opacity timeout; subsequent full reruns passed without weakening assertions or timeouts.bun run check: config contract, discipline ledger, and Web checks/build passed; the aggregate command is blocked by formatting in an unrelated, pre-existing untracked local architecture JSON artifact. That user artifact is unchanged and excluded from this PR.bun run lint,bun run typecheck, andgit diff --check: passed.Impact