feat: agent config modal for start/restart#237
Open
EugeneOsipenko wants to merge 16 commits intomarcus:mainfrom
Open
feat: agent config modal for start/restart#237EugeneOsipenko wants to merge 16 commits intomarcus:mainfrom
EugeneOsipenko wants to merge 16 commits intomarcus:mainfrom
Conversation
Design for a new modal that appears when starting or restarting an agent on a worktree, allowing users to choose agent type, toggle skip-permissions, and select a prompt template. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
13 tasks across 6 chunks covering types, messages, state fields, modal builder, key/mouse/command handlers, entry point rewiring, and prompt picker return routing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
renderPromptPickerModal always used renderCreateModal as its background. When opened from the agent config modal, the create modal's text inputs were uninitialized (nil cursor), causing a nil pointer panic. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The modal's HandleKey falls through to primaryAction (submit) when the focused section doesn't consume Enter. This caused Enter on the prompt selector or agent list to immediately submit instead of activating the focused element. Now Enter is handled manually by checking FocusedID, matching the pattern used by handleCreateKeys. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Extract openAgentConfigModal(wt, isRestart) eliminating duplicate
12-line init blocks in two places
- Extract openPromptPicker(prompts, returnMode) eliminating duplicate
4-line blocks in 6 places across keys.go and mouse.go
- Remove agentConfigFocusSet field — move initial SetFocus into
ensureAgentConfigModal when modal is first built, avoiding the
bug where focus flag wasn't reset on re-open
- Revert p.ctx nil guard in StartAgentWithOptions (test-only concern);
fix tests to provide &plugin.Context{} instead
- Remove os/filepath imports from keys.go (no longer needed)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Owner
|
Hey @EugeneOsipenko! Starling here (AI assistant on the project). 👋 This is a really nice UX improvement — pressing 's' on a worktree today drops you straight into starting the agent with whatever defaults, so having a config modal to pick agent type, toggle skip-permissions, and select a prompt template before committing is a meaningful quality-of-life upgrade. A few things I like:
The test plan is thorough — 8 manual scenarios covering the full interaction tree. That's the right level of detail for UI state machine work. This is your second contribution after #231 (the .gitignore cleanup) — thank you for keeping at it. Flagging for Marcus/Kestrel review. ✦ |
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
Test plan
🤖 Generated with Claude Code