feat: add new session confirmation dialog with Esc-to-back and state preservation - #37
Closed
huang-hf wants to merge 2 commits into
Closed
feat: add new session confirmation dialog with Esc-to-back and state preservation#37huang-hf wants to merge 2 commits into
huang-hf wants to merge 2 commits into
Conversation
Two improvements to the new session confirmation dialog: 1. Esc on the confirmation screen now returns to the form instead of closing the entire dialog. Previously, DialogProvider's keyboard handler would intercept Esc and pop DialogNew off the stack entirely. 2. Form state is no longer lost when navigating back from confirmation. Previously, dialog.push() caused DialogNew to unmount, so all signal values were reset on re-mount. Now all form signals are saved to a module-level variable before pushing the confirmation dialog, and restored when DialogNew re-mounts after dialog.pop(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
|
Replacing with a clean branch that doesn't include unrelated copyClaudeDir changes. |
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
Changes
New: Confirmation dialog before session creation
When the user presses Enter to create a session, a confirmation screen is shown with a summary of the current configuration (tool, title, path, branch, etc.). The session is only created after the user confirms.
Fix: Esc returns to form
Pressing Esc on the confirmation screen now returns to the form for further editing, rather than closing the entire new session dialog.
Root cause:
DialogProvider's keyboard handler fires beforeDialogNew's, so Esc was poppingDialogNewitself off the stack entirely.Fix: Form state preserved on back
All form values (tool, title, path, branch, worktree options, etc.) are fully restored when navigating back from the confirmation screen.
Root cause:
dialog.push()unmountsDialogNew(only the top stack item is rendered byDialogProvider). Whendialog.pop()is called, a newDialogNewinstance is created with default signal values, losing all user input.Solution: Before calling
dialog.push(), all form signal values are saved to a module-level_savedFormStatevariable. WhenDialogNewmounts, it reads and restores from this variable, then clears it.Test plan
🤖 Generated with Claude Code