fix(chat): preserve unsent new-session drafts - #720
Merged
Conversation
Park the temporary composer draft before restoring a remembered session, using the selected cwd even when that session belongs to another worktree. Replace draft source assertions with an executable navigation and cleanup regression check for text and images. Validation: 847 tests pass; tsc --noEmit --incremental false, npm run lint, and git diff --check pass.
Resolve the session-selection dependency conflict while preserving draft parking, project identity updates, search navigation, and terminal panel behavior. Update the navigation regression context for the current panel state. Validation: 934 tests pass; tsc --noEmit --incremental false, npm run lint, and git diff --cached --check pass.
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
Drafts continue to use the existing in-memory store. Reloading or reopening Pi Web still clears them.
Demo
Recorded from commit
d4cb9d5dca1878d95c7ac8eb4943a0d2506b93f7on the PR branch, served from that tree athttp://127.0.0.1:30152withnext devbecause this repository prohibits runningnext buildduring development. The run used a fresh isolated Pi agent directory, workspace, and browser profile with the normal application transport. A real GPT-6-Astra model round created the demonstrated existing session; no fixtures, mock transports, synthetic events, or test-only hooks were used.Validation
npm test— 846 tests passedtsc --noEmitnpm run lintgit diff --check