Skip to content

Clear agent selections in workspace creation and settings - #28543

Merged
nwparker merged 5 commits into
mainfrom
feat/workspace-agent-clear
Oct 14, 2026
Merged

nwparker merged 5 commits into
mainfrom
feat/workspace-agent-clear

Conversation

@nwparker

@nwparker nwparker commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Click X beside the chosen agent to create a workspace without starting an agent. In Settings → Agents, click the selected option again to clear the saved default, leaving nothing selected.

What Changed

  • Add an accessible X to the Git and folder create dialogs. Clearing affects only this creation; choosing Blank Terminal still explicitly opens a shell. With setup in a new tab, clearing leaves just the Setup tab. Missing/skipped setup and split setup retain their shell fallback.
  • Replace the None and No agent settings options with toggles: clicking the selected agent or Auto clears the default and leaves every option unselected. The installed-agent row supports the same action. Clearing saves the existing no-agent value instead of Auto, so another agent is never silently selected. Ignore the retired setup-only default flag and clear it on the next default change; existing optional request fields remain compatible with older peers.

Why

Clearing a selection expresses no agent directly, without another None option beside Blank Terminal. X makes that choice for one workspace; toggling the selected settings option makes it the saved default. Auto remains an explicit choice.

Linked Issue

Follow-up to #25617; related to #25247.

Visual Proof

Captured from the hidden Electron renderer on macOS, using an isolated fixture profile. Before shows the merged #25617 design. All affected surfaces are shown below.

Settings → Agents
Before After
Settings → Agents before Settings → Agents after
Settings: click the selected agent again to clear it
Selected After clicking again
Codex selected No default selected
Create dialog → Configure agents
Before After
Create dialog → Configure agents before Create dialog → Configure agents after
Git workspace creation
Before After
Git workspace creation before Git workspace creation after
Agent dropdown
Before After
Agent dropdown before Agent dropdown after
Cleared states and folder workspace creation

Git workspace with agent cleared

Git workspace with agent cleared

Folder workspace with selected agent

Folder workspace with selected agent

Folder workspace with agent cleared

Folder workspace with agent cleared

Created Git workspace: setup completed, only the Setup tab

Created Git workspace: setup completed, only the Setup tab

Cleared creation with configured default tabs

Two default tabs with commands are configured in the fixture. Clearing the agent and creating the workspace runs setup and leaves only Setup; neither template command launches.

Setup only with configured template tabs

Testing

  • Manually tested on macOS through Playwright CDP with ORCA_BACKGROUND_LAUNCH=1: both settings surfaces, clicking the selected agent to clear it, keyboard toggling Auto, persistence after reopening settings, Git/folder create, selected/cleared/dropdown states, keyboard clear and focus return, setup-only creation, explicit Blank Terminal plus setup, skipped setup shell fallback.
  • Automated tests updated for picker clearing, retired defaults, durable rollback, setup failure/split fallbacks, CLI activation, remote activation, and folder/SSH host routing. Focused picker, workspace, and existing automation regression tests passed after narrowing the scope. The latest settings change passed 59 tests, including clearing/reselecting through the host-owned settings form and toggling Auto.
  • pnpm tc, changed-code quality, localization checks, and Electron production build passed on the latest revision. The full desktop build also passed before the automation changes were removed. Full repository test/lint suites run in CI.
  • Final merge review reproduced and fixed template commands escaping setup-only creation in both host provisioning and renderer fallback. 48 focused tests passed (host provisioning, local startup, creation flow), including explicit Blank Terminal, skipped setup, split setup, and active/background creation. Full typecheck and changed-code quality passed. Hidden Electron validation confirmed one Setup tab with two configured templates; screenshot above.
  • After rebasing onto current main and fixing its duplicate property, 124 focused tests passed across eight files, including settings clearing and agent-session options/queued messages.
  • Windows, Linux, and a live SSH host were not manually exercised.

Review

Reviewed clear versus Blank Terminal, saved-default isolation, no-agent versus Auto semantics, saved-default toggling, old-client requests, setup recovery, remote ownership, folder creation, and keyboard access. X is a sibling button, so there is no nested interactive element.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer source is copied or translated.

Notes

Final CI exposed a duplicate now key already present in the updated base agent-session module. This PR removes the redundant, overwritten entry so the combined branch passes static analysis. No session behavior changes.

This reuses the existing per-create setup flag and host provisioning path. An empty saved default uses the existing blank host value; null still means Auto. No new remote request field or opcode is introduced.

Checklist

  • This PR is small and focused
  • Explained what changed and why
  • Before/after screenshots attached for UI changes
  • Self-reviewed for correctness, security, and performance
  • Cross-platform and SSH/remote compatibility considered
  • Targeted tests, typecheck, changed-code lint, and build checks pass; full suites run in CI

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b60638c3-0271-4453-8e51-7fd9cf8a322f
📥 Commits

Reviewing files that changed from the base of the PR and between 070dd75 and 593e39b.

📒 Files selected for processing: 10
  • src/renderer/src/components/settings/AgentCatalogRow.tsx
  • src/renderer/src/components/settings/AgentDefaultSetting.tsx
  • src/renderer/src/components/settings/AgentLaunchSettingsCatalog.tsx
  • src/renderer/src/components/settings/HostAgentLaunchSettings.test.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
💤 Files with no reviewable changes: 5
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
🚧 Files skipped from review as they are similar to previous changes: 1
  • src/renderer/src/i18n/locales/en.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

📝 Walkthrough

The saved setup-only setting is deprecated and no longer affects settings projections or terminal provisioning. Agent-default controls now toggle between an agent, blank, and Auto. The workspace composer tracks a cleared agent choice separately from saved defaults, and agent selection is optional. Tests and locale strings were updated to match these changes.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to 593e3

Creating a setup-only workspace with default tabs configured can open those tabs and run their commands alongside Setup. This remains a bounded issue to fix or explicitly accept before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 21 functions across 27 files. (6 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the main change: allowing users to clear agent selections during workspace creation and in settings.
Description check Passed The description is complete and aligned with the template. It explains the user-facing behavior, implementation changes, motivation, linked issues, visual proof, testing, compatibility considerations,…
Full details: Docstring Coverage

Explanation

Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 21 functions across 27 files. (6 skipped: 6 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 279a2aa1-da66-42e7-a207-e7f5cd8cd85a
📥 Commits

Reviewing files that changed from the base of the PR and between b9bd8db and d94f2bc.

📒 Files selected for processing: 37
  • src/main/runtime/runtime-client-agent-launch-settings-durability.test.ts
  • src/main/runtime/runtime-client-agent-launch-settings.test.ts
  • src/main/runtime/runtime-client-settings.ts
  • src/main/runtime/runtime-worktree-terminal-provisioning.test.ts
  • src/main/runtime/runtime-worktree-terminal-provisioning.ts
  • src/renderer/src/components/NewWorkspaceComposerCard.tsx
  • src/renderer/src/components/NewWorkspaceComposerModal.tsx
  • src/renderer/src/components/agent/AgentCombobox.test.tsx
  • src/renderer/src/components/agent/AgentCombobox.tsx
  • src/renderer/src/components/automations/AutomationEditorDialog.tsx
  • src/renderer/src/components/automations/AutomationEditorSettingsSidebar.test.tsx
  • src/renderer/src/components/automations/AutomationEditorSettingsSidebar.tsx
  • src/renderer/src/components/automations/AutomationExtraAgentArgsField.tsx
  • src/renderer/src/components/automations/AutomationsPage.agent-clear.test.tsx
  • src/renderer/src/components/automations/automation-draft-model.ts
  • src/renderer/src/components/automations/automation-orca-save.ts
  • src/renderer/src/components/automations/automation-save-action.ts
  • src/renderer/src/components/new-workspace/NewWorkspaceComposerAgentSection.test.tsx
  • src/renderer/src/components/new-workspace/NewWorkspaceComposerAgentSection.tsx
  • src/renderer/src/components/new-workspace/new-workspace-composer-card-props.ts
  • src/renderer/src/components/settings/AgentDefaultSetting.tsx
  • src/renderer/src/components/settings/AgentLaunchSettingsCatalog.tsx
  • src/renderer/src/hooks/ipc-events/worktree-event-runtime.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/agent-picker-search.test.ts
  • src/renderer/src/lib/agent-picker-search.ts
  • src/shared/agent-launch-settings.ts
  • src/shared/default-agent-settings.test.ts
  • src/shared/default-agent-settings.ts
  • src/shared/global-settings-types.ts
  • src/shared/new-workspace-setup-only.test.ts
  • src/shared/new-workspace-setup-only.ts
💤 Files with no reviewable changes: 6
  • src/renderer/src/hooks/ipc-events/worktree-event-runtime.ts
  • src/renderer/src/components/new-workspace/NewWorkspaceComposerAgentSection.test.tsx
  • src/shared/new-workspace-setup-only.ts
  • src/renderer/src/lib/agent-picker-search.test.ts
  • src/shared/new-workspace-setup-only.test.ts
  • src/renderer/src/lib/agent-picker-search.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

@nwparker nwparker changed the title Use X to clear workspace and automation agents Use X to clear the agent in new workspace creation Oct 14, 2026
@nwparker nwparker changed the title Use X to clear the agent in new workspace creation Clear agent selections in workspace creation and settings Oct 14, 2026
@nwparker
nwparker enabled auto-merge (squash) October 14, 2026 05:41
@nwparker
nwparker disabled auto-merge October 14, 2026 05:45
@nwparker
nwparker force-pushed the feat/workspace-agent-clear branch from 5753f78 to 5290fb2 Compare October 14, 2026 05:53
@nwparker
nwparker merged commit eb7f427 into main Oct 14, 2026
13 of 14 checks passed
@nwparker

Copy link
Copy Markdown
Contributor Author

Follow-up #28607 removes translated None keys added on main after this branch began and gives Mobile verify a unique check name. GitHub auto-merged this PR when the mobile check named verify passed before the full PR gate completed. The full gate subsequently reported stale catalog entries; typecheck itself passed. The follow-up includes a regression test reserving verify for the full PR workflow and will be merged only after all its checks finish.

Jinwoo-H added a commit that referenced this pull request Oct 14, 2026
#28543 reads settings before creating default tabs (setup-only skips them), so a storeless runtime now fails provisioning with runtime_unavailable.
Jinwoo-H added a commit that referenced this pull request Oct 14, 2026
…s removed

#28543 and #28599 each dropped one of the duplicate now keys, leaving none.
Jinwoo-H added a commit that referenced this pull request Oct 14, 2026
 left red (#28603)

* fix(i18n): drop the setup-only keys #28543 removed from en.json

Main's localization catalog check fails on these three stale keys in es/fr/ja/ko/zh.

* test(runtime): give the default-tab agent fixture a store

#28543 reads settings before creating default tabs (setup-only skips them), so a storeless runtime now fails provisioning with runtime_unavailable.

* fix(native-chat): restore the option write's clock both crossing fixes removed

#28543 and #28599 each dropped one of the duplicate now keys, leaving none.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant