Skip to content

refactor(composer): delete the full-create path no caller reaches - #26052

Merged
brennanb2025 merged 2 commits into
mainfrom
brennanb2025/composer-delete-unreachable-full-create
Oct 7, 2026
Merged

brennanb2025 merged 2 commits into
mainfrom
brennanb2025/composer-delete-unreachable-full-create

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6 $\color{#cf222e}{\Huge{\mathbf{−}}}$​273 $\color{#cf222e}{\Huge{\mathbf{−}}}$​267
Prod 40 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​15 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1492 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1477

ELI5

The new-workspace composer contains a second, older way to create a workspace (the "full create" path) that nothing in the app can reach any more. Only its own tests run it. This PR deletes it, so the next change to workspace creation has one composer path to move, not two. Nothing in the app changes.

What Changed

The problem.

  • The composer's state hook still builds a full-create flow:
    • source preparation;
    • submit preparation (setup trust, issue command);
    • creation execution, with its finalization, issue-command, startup and structured-launch helpers;
    • an orchestration that wires them up.
  • It exposes that flow as submit and as the composer card's onCreate.
  • Nothing reaches it:
    • NewWorkspaceComposerModal is the only component that renders the composer card. The other is a test fixture.
    • The modal never reads submit from useComposerState.
    • The modal passes its own onCreate={() => void handleCreate()} after {...cardProps}, which overrides the card props' onCreate: submit. handleCreate runs the quick create (submitQuick), the composer's only create.
    • The eight full-path modules are imported only by the submit orchestration, and two of them by their own tests.
  • It's 1,389 lines that every change to workspace creation would otherwise have to keep in step.

For users: nothing changes. Every create still goes through the quick create, as before.

The change:

  • Delete the full-path modules:
    • full-submit-source-preparation
    • full-submit-preparation
    • full-creation-execution, -finalization, -issue-command, -startup, -structured-launch
    • full-submit-orchestration
  • Delete their two tests.
  • Remove the wiring:
    • the submit-state contract entries;
    • the composer model's executeFullCreation, prepareFullSubmit, prepareFullSubmitSource, submit and the full-submit types;
    • the card props' onCreate (the modal supplies its own);
    • useComposerState's submit.
  • Delete what only the full path used, now orphaned:
    • applyWorktreeMeta and the updateWorktreeMeta plumbing behind it;
    • the composer store's own createWorktree and setSidebarOpen (quick create uses the app store's);
    • currentIssueCommand on the composer model;
    • buildAgentPromptWithContext and getLinkedWorkItemPromptContext, with their tests;
    • one unused translation key, removed from all six catalogs.
  • Delete the full create-gate mode. createGateMode defaulted to 'full', and the modal, the only caller, always passed 'quick'. With the full submit gone, the default would have named a mode with no create action. This removes:
    • getFullComposerCreateDisabled;
    • the two wait flags only it read;
    • the issue-command preload that ran only in full mode.
  • The quick create's Create-button rule and hook re-check run exactly as before.
  • The quick-path comment that pointed at the deleted file now states its reason itself: typed creature names aren't retired, and mobile shares the rule.

Why

Dead code that looks live is the code a later change trips on. The next step, moving new-workspace launches onto one host operation, would otherwise have to port or reason about a path no user can reach.

Linked Issue

None.

Visual Proof

N/A: no reachable behavior changes. Main and this branch were compared live; the screenshots are in the review comment.

Testing

  • tc:web and tc:node pass (tc:web re-run on the follow-up commit, which touches only renderer code).

  • Follow-up commit: 43 composer, card, gate and work-item test files pass (394 tests), along with the localization checks.

  • The 17 composer test files (composer-state, the composer card and modal, useComposerState) pass: 101 tests.

  • oxlint is clean.

  • No reference to a deleted module or symbol remains in src/ or tests/.

  • The CI timing baseline still lists the two deleted tests. The balancer only weights files that exist, and the baseline already tolerates deleted paths (ci-shard-timings.md).

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Author: @BrennanKB5. Deletion only (about −1,740 lines net). No wire, storage or platform impact.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

NewWorkspaceComposerModal is the only renderer of the composer card, and it overrides the card
props' onCreate (the full-create submit) with its quick create and never reads useComposerState's
submit. The full path (source and submit preparation, creation execution and its finalization,
issue-command, startup and structured-launch helpers, the orchestration) was reachable only from
its own tests. Delete it with them, and drop onCreate and submit from the composer contracts.
Removing the full-create path left code whose only readers were gone:
- applyWorktreeMeta and the updateWorktreeMeta plumbing that fed it
- createWorktree and setSidebarOpen on the composer target store
- currentIssueCommand on the composer model
- buildAgentPromptWithContext and getLinkedWorkItemPromptContext (only
  their own tests still called them) and those test cases
- the "Selected agent is disabled" locale string in every catalog
- the export on confirmRuntimeIssueCommandRead

The 'full' create-gate mode goes too. Its only caller passed 'quick', so
the default named a mode with no create action. That removes the option,
the full gate, the issue-automation wait flag and the renderer issue
command preload that ran only in 'full' mode. Quick create is unchanged.

The quick path's name-retirement comment pointed at the deleted full
submit path; it now carries that reasoning itself, including the mobile
counterpart that must change with it. An e2e comment no longer names
applyWorktreeMeta.
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Review and QA summary

The problem. The New Workspace composer carried two ways to create a workspace:

  • the quick create, which every Create click runs;
  • an older "full create" path (8 modules, about 1,400 lines) that nothing could reach.

It was unreachable because the modal, the only component that renders the composer card, passes its own onCreate (quick create) after spreading the card props, so the props' onCreate: submit was always overridden. The next step moves every new-workspace launch onto one host operation, and it would otherwise have had to port or reason about a path no user can reach.

What changes for users: nothing. Every create still runs the same quick create as on main.

Review

  • Reachability, checked first-hand on main (deleting reachable code would have been release-blocking):
    • The modal (NewWorkspaceComposerModal.tsx) is the only production renderer of the card, and it is mounted once.
    • Every create trigger reaches the modal's handleCreate: the Create button, Enter on the agent picker, and Cmd/Ctrl+Enter.
    • The deleted modules had no importers outside themselves and their tests: nothing in main, preload, shared, mobile or the CLI.
    • Git, folder, SSH and WSL targets, linked GitHub/Linear/GitLab items, and chat vs terminal agents all go through the quick create.
    • None of the open PRs that touch the composer would bring the path back.
  • Architecture: a from-scratch version of this change matches it. Keep it as one PR: the module deletion, submit and onCreate depend on each other, and any one of them alone leaves a half-removed mode or a type error. The card's onCreate stays required, so the type system now makes any future renderer supply its own create action.
  • Fixed in this review (commit 13420ab):
    • Deleted the code the full path left orphaned: applyWorktreeMeta/updateWorktreeMeta, the composer store's createWorktree/setSidebarOpen, currentIssueCommand on the model, two prompt-context helpers and their tests, and one translation key in all six catalogs.
    • Removed the dead full create-gate mode. It was the default, but no caller used it, and without the full submit the default named a mode with no create action. A second reviewer checked that the quick create's Create-button rule, hook re-check effect and issue-command template are unchanged.
    • Restored the reasoning behind the quick-path comment that pointed at a deleted file, and fixed an e2e comment.
  • Deferred (they were already that way on main; each belongs in its own PR):
    • More composer state still has no live reader: tuiAgent, agentPrompt, attachmentPaths, the link popover, the linked-only template, draft persistence, and the always-empty issue-command template. Files dropped on the quick card may be written into state that nothing submits (not verified end to end).
    • The deleted tests were the only hook-level tests about closing the composer mid-create. The quick create has no such test, and live QA shows a create keeps going after the composer closes, on main and here alike.
  • Readiness checklist (network, crash/retry, security, performance, correctness, compatibility, cross-platform, organization): no findings.
    • Only renderer code and one e2e comment change.
    • No package, lockfile, wire, storage or mobile surface is touched.

Live QA (main vs this branch, same machine, macOS)

Production builds of main (d3e1494) and this branch (13420ab), each with an isolated profile, driven over Playwright/CDP:

Case Main This branch Screenshots
Git project, no agent creates and opens with a terminal same main · branch
Git project, Codex + prompt agent starts, prompt arrives once same main · branch
Chat agent not offered in the composer not offered —
Folder project, no agent folder workspace opens same main · branch
Folder project, Codex + prompt agent starts, prompt arrives once same main · branch
Create button with an empty name; Cmd+Enter enabled, no reason text; Cmd+Enter creates same main · branch
Escape right after Create the workspace is still created same main · branch

Verified and not verified

  • Verified:
    • Reachability, by reading the code.
    • tc:web passes.
    • The 43 composer, card, gate and work-item test files pass, along with the localization checks.
    • CI is green on 13420ab. One test shard first failed on flatten-retained-slice.test.ts, a heap-size measurement this PR doesn't touch, and passed on rerun.
    • The branch merges cleanly with current main.
    • Live QA, in the table above.
  • Not verified live:
    • SSH and WSL targets, and linked work items. They run the same renderer quick create, which this PR doesn't change; that was checked in code only.
    • A chat agent from the composer, which the QA build didn't offer.
    • Windows and Linux.
    • The screenshots were captured and checked by the QA driver. The reviewer didn't open them separately.

@coderabbitai

coderabbitai Bot commented Oct 7, 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: 5a8af7d0-69b1-47ad-81ab-54f596ff3942
📥 Commits

Reviewing files that changed from the base of the PR and between 70c6876 and 13420ab.

📒 Files selected for processing (46)
  • src/renderer/src/components/NewWorkspaceComposerModal.tsx
  • src/renderer/src/hooks/composer-state/assemble-composer-model.ts
  • src/renderer/src/hooks/composer-state/async-composer-state.ts
  • src/renderer/src/hooks/composer-state/async-model.ts
  • src/renderer/src/hooks/composer-state/composer-card-contract.ts
  • src/renderer/src/hooks/composer-state/composer-card-props.ts
  • src/renderer/src/hooks/composer-state/composer-external-sync.ts
  • src/renderer/src/hooks/composer-state/composer-navigation-actions.ts
  • src/renderer/src/hooks/composer-state/composer-source-model.ts
  • src/renderer/src/hooks/composer-state/composer-source-state-contract.ts
  • src/renderer/src/hooks/composer-state/composer-source-state.ts
  • src/renderer/src/hooks/composer-state/composer-store-actions.ts
  • src/renderer/src/hooks/composer-state/composer-submit-model.ts
  • src/renderer/src/hooks/composer-state/composer-submit-orchestration.ts
  • src/renderer/src/hooks/composer-state/composer-submit-state-contract.ts
  • src/renderer/src/hooks/composer-state/composer-target-store.ts
  • src/renderer/src/hooks/composer-state/derived-composer-state.ts
  • src/renderer/src/hooks/composer-state/derived-model.ts
  • src/renderer/src/hooks/composer-state/full-creation-execution.test.ts
  • src/renderer/src/hooks/composer-state/full-creation-execution.ts
  • src/renderer/src/hooks/composer-state/full-creation-finalization.ts
  • src/renderer/src/hooks/composer-state/full-creation-issue-command.ts
  • src/renderer/src/hooks/composer-state/full-creation-startup.ts
  • src/renderer/src/hooks/composer-state/full-creation-structured-launch.ts
  • src/renderer/src/hooks/composer-state/full-submit-orchestration.test.ts
  • src/renderer/src/hooks/composer-state/full-submit-orchestration.ts
  • src/renderer/src/hooks/composer-state/full-submit-preparation.ts
  • src/renderer/src/hooks/composer-state/full-submit-source-preparation.ts
  • src/renderer/src/hooks/composer-state/host-runtime-effects.ts
  • src/renderer/src/hooks/composer-state/quick-submit-source-preparation.ts
  • src/renderer/src/hooks/composer-state/target-store-model.ts
  • src/renderer/src/hooks/useComposerState.integration.test.ts
  • src/renderer/src/hooks/useComposerState.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/ensure-hooks-confirmed.ts
  • src/renderer/src/lib/linked-work-item-context.test.ts
  • src/renderer/src/lib/linked-work-item-context.ts
  • src/renderer/src/lib/new-workspace-create-gates.test.ts
  • src/renderer/src/lib/new-workspace-create-gates.ts
  • src/renderer/src/lib/new-workspace.ts
  • tests/e2e/worktree.spec.ts
💤 Files with no reviewable changes (35)
  • src/renderer/src/hooks/composer-state/full-submit-orchestration.test.ts
  • src/renderer/src/hooks/composer-state/full-creation-finalization.ts
  • src/renderer/src/hooks/composer-state/full-submit-source-preparation.ts
  • src/renderer/src/hooks/composer-state/full-submit-preparation.ts
  • src/renderer/src/hooks/composer-state/full-creation-structured-launch.ts
  • src/renderer/src/hooks/composer-state/derived-model.ts
  • src/renderer/src/hooks/composer-state/full-creation-execution.ts
  • src/renderer/src/hooks/composer-state/composer-source-model.ts
  • src/renderer/src/hooks/composer-state/full-creation-execution.test.ts
  • src/renderer/src/hooks/composer-state/assemble-composer-model.ts
  • src/renderer/src/hooks/composer-state/full-creation-startup.ts
  • src/renderer/src/hooks/composer-state/target-store-model.ts
  • src/renderer/src/hooks/composer-state/async-composer-state.ts
  • src/renderer/src/hooks/composer-state/composer-external-sync.ts
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/linked-work-item-context.test.ts
  • src/renderer/src/hooks/useComposerState.ts
  • src/renderer/src/hooks/composer-state/async-model.ts
  • src/renderer/src/hooks/composer-state/composer-submit-state-contract.ts
  • src/renderer/src/lib/new-workspace-create-gates.ts
  • src/renderer/src/hooks/composer-state/full-submit-orchestration.ts
  • src/renderer/src/lib/new-workspace.ts
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/hooks/composer-state/derived-composer-state.ts
  • src/renderer/src/hooks/composer-state/composer-submit-orchestration.ts
  • src/renderer/src/lib/linked-work-item-context.ts
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/hooks/composer-state/composer-card-contract.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/hooks/composer-state/full-creation-issue-command.ts
  • src/renderer/src/hooks/composer-state/composer-store-actions.ts
  • src/renderer/src/hooks/composer-state/composer-target-store.ts
  • src/renderer/src/hooks/composer-state/composer-submit-model.ts

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


📝 Walkthrough

Walkthrough

The composer no longer exposes the full-submit API or its preparation, orchestration, and creation modules. Quick-submit actions remain, and the create gate now uses quick-submit checks. The changes also remove issue-command loading and related prompt helpers, plus worktree metadata actions from the composer action contracts.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 13420

Quick-create issue automation retains its submission-time command check. No actionable merge-blocking risk was established.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 11 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the removal of the unreachable full-create path and matches the main change.
Description check ✅ Passed The description covers the change, rationale, user impact, visual proof, and testing. It marks the linked issue as “None,” although the template requests an issue link for outside contributors; the te…
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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.

@brennanb2025
brennanb2025 merged commit 535c83a into main Oct 7, 2026
81 of 83 checks passed
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