-
Notifications
You must be signed in to change notification settings - Fork 965
fix(desktop): honor agent selection in new-workspace modal #3699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -185,6 +185,10 @@ export const pendingWorkspaceSchema = z.object({ | |||||||||||||||||||
| linkedIssues: z.array(pendingLinkedIssueSchema).default([]), | ||||||||||||||||||||
| linkedPR: pendingLinkedPRSchema.nullable().default(null), | ||||||||||||||||||||
| attachmentCount: z.number().int().default(0), | ||||||||||||||||||||
| // User-selected agent from the modal. `"none"` = user explicitly chose not | ||||||||||||||||||||
| // to launch; any other string = `AgentDefinitionId`; null = legacy rows | ||||||||||||||||||||
| // (predating this field), treated as "use fallback". | ||||||||||||||||||||
| agentId: z.string().nullable().default(null), | ||||||||||||||||||||
|
Comment on lines
+188
to
+191
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comment contradicts actual null-handling behavior. The comment states Recommend aligning the comment with the actual no-op behavior so future maintainers don't expect a fallback resolution path. 📝 Proposed comment fix- // User-selected agent from the modal. `"none"` = user explicitly chose not
- // to launch; any other string = `AgentDefinitionId`; null = legacy rows
- // (predating this field), treated as "use fallback".
+ // User-selected agent from the modal. `"none"` = user explicitly chose not
+ // to launch; any other string = `AgentDefinitionId`; null = legacy rows
+ // (predating this field) — treated the same as `"none"` (no-op launch on
+ // retry) rather than falling back to a default agent.
agentId: z.string().nullable().default(null),📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||
|
|
||||||||||||||||||||
| // fork + checkout (irrelevant for adopt — worktree already exists). | ||||||||||||||||||||
| runSetupScript: z.boolean().default(true), | ||||||||||||||||||||
|
|
||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment says
nullis "treated as 'use fallback'" butresolveAgentIddoes the opposite —!selected(which is true fornull) immediately returnsnull, skipping the launch entirely. A legacy row withagentId: nulland a prompt will show the "Workspace created but no agent launched" warning toast, not fall back to Claude as the comment implies. The comment should reflect the actual no-op semantics.Prompt To Fix With AI