Skip to content

fix(composer): preserve explicit workspace names after selecting tasks - #26937

Merged
nwparker merged 3 commits into
mainfrom
nwparker/explicit-workspace-name-10-09
Oct 10, 2026
Merged

nwparker merged 3 commits into
mainfrom
nwparker/explicit-workspace-name-10-09

Conversation

@nwparker

@nwparker nwparker commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​615 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​615
Prod 16 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​114 $\color{#cf222e}{\Huge{\mathbf{−}}}$​43 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​71

ELI5

When you pick a ticket and enter 002 or 347 in Advanced, Orca should use that name. It currently silently uses the ticket title instead. This keeps the name you entered and its linked ticket.

What Changed

The shared automatic-name rule now uses the existing selected-source and last-generated-name state. Text entered after selecting a source belongs to the user; an empty name or the last generated name can still follow the source. Desktop, folder workspaces, and mobile use the same rule. Linear identifier searches still work on the first selection, while later manual edits survive refresh.

A delayed GitHub or GitLab base lookup also no longer repeats its earlier source/name selection. Direct Start-from selections still link and name the workspace.

Why

Changing the number parser globally, or comparing the typed number with the ticket number, would change issue search and still lose names like 002 entered after selecting issue #2. Existing source ownership distinguishes those actions without a new persisted flag, CLI change, or host protocol field.

Linked Issue

Fixes #21676

Thanks to @markdlabrecque for the report and earlier investigation in #21679, and @bbingz for the follow-up proposal in #26378. This uses a different ownership policy; neither proposal's classifier change or matching-number exception is retained. The original PR remains open.

Visual Proof

Before and after: actual hidden Electron CDP captures of the production Advanced section and creation request builder. The provider data and final creation transport are fixtures; no Git checkout was performed. Before: visible 002 becomes fix-export/generated. After: exact 002, displayNameKind: user, with the original issue URL and number retained. This is an isolated production-component harness, not the full application.

Before:

Before: Advanced 002 is discarded

After:

After: Advanced 002 stays a user name with its issue

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Merged October 10 at 68519e63b9e3a6cf4fbcdc2e8fc2992b1e88c329, with tree 7524f4dee7386ba7ed310ef23da26a783a97bad4. A fresh isolated child tested this exact composition with current main eaf5dbed9e5fec6046eb8b4835303c40125b8012: all 70 focused tests in six files and the canonical renderer typecheck pass. Full source review preserves current main's provider routing and authoritative folder launch checks. All 22 PR path changes match the reviewed patch; six whole files also retain newer main edits. The resulting GitHub squash tree exactly matches the tested tree. Initial missing process-host output diagnostics were retained; the canonical build generated JavaScript/types only in the owned child, without installation, native rebuilding or shared dependency writes.

Earlier October 10 verification: published head 4c5b385e2a39b447088a140f8b88459426932a9a normally includes main 180e8c186f779bc8bfbddc93391855e03eeee006. All 22 production/test paths at that PR head are byte-identical to original head 372467652c350c5fe4203889bdfa9c044e0e46fd; no behavior rework was needed.

On this untouched parent: 105 desktop tests across nine suites, 64 mobile tests across five suites, seven actual registered worktree/folder creation cases, and the web typecheck pass. The creation checks use the real RPC dispatcher, Git and SQLite flush/reopen: numeric names, path collisions, path-shaped input, generated names and folder workspaces preserve the expected label and linked source.

The earlier immutable integration with main b3aa719a57ca7f5b8fe7db38abf3e9dc4b58a4bb passed 18 real mobile-modal lifecycle cases covering close/reopen, committed host switches, same-host client reconnects and an abandoned render. They use component fixtures, not a native phone. This historical evidence transfers through the verified byte-identical PR paths; it was not rerun on the later parent.

On that same earlier b3aa719a integration, sixteen hidden Electron controls render actual production desktop Advanced/Smart fields and mobile Advanced fields with the mobile submit hook. They cover numeric names, refresh, source changes, draft restore, clearing, unlinking and raw searches. Provider/transport fixtures bound these rendered checks; they are not a full-application checkout. The separate current registered-handler controls above exercise actual creation and persistence. Explicit CLI name preservation is also a control; CLI code is unchanged.

Fresh Windows x64 Node 24.18.0 and Linux x64 Node 24.21.0 each pass all 105 desktop tests/nine suites on the immutable integration with pinned main b3aa719a57ca7f5b8fe7db38abf3e9dc4b58a4bb, using explicit owned Vitest caches and installation-disabled Windows Electron. Existing mobile dependencies are used locally; no native mobile dependencies were installed. Earlier Windows/Linux 109-case and mobile 33-case results belong to original 372467652c350c5fe4203889bdfa9c044e0e46fd and remain historical evidence. Initial native overlays also linked the hosts' shared Vitest caches; their metadata and logs are preserved. The fresh naming runs use owned cache paths, and the donors' cache modification times stay unchanged during those runs. Current-main full-file/changed-code quality, formatting and diff checks pass; ordinary CI is green at the new head (17 successful and 15 skipped contexts). No rendered Windows/Linux UI, native mobile application or live SSH checkout is claimed.

AI Disclosure

Review

Root reviewed the complete production delta, all callers and deferred name/source boundaries, the actual captures, and source/proof hashes. Independent source and mobile lifecycle reviews are clean for this bounded naming change. The existing review-selection fencing is already implemented separately in #26954, in the user-owned SSH/remote group. A completed read-only comparison finds that it covers 26 former failures and preserves all 20 existing controls. The remaining assertions are qualified for source reachability and submission policy; they do not establish 21 user bugs. An initially published extraction #27203 was closed as orphaned after this overlap was found. Any residual repair should extend the existing shared selection boundary. This naming PR does not claim to fence every stale base writer; #26954 remains untouched.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

This changes client-side ownership decisions only. Host execution, SSH routing, source URLs, paths, shortcuts, server state and mixed-version protocols are unchanged. Tests/apps used ORCA_BACKGROUND_LAUNCH=1; no native window was shown or focused. Lockfiles are unchanged.

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)

@nwparker
nwparker marked this pull request as ready for review October 9, 2026 19:11
@coderabbitai

coderabbitai Bot commented Oct 9, 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: af61f542-cecb-4d36-bfa5-a65e311b45b4





📥 Commits

Reviewing files that changed from the base of the PR and between 54b623b and 3724676.






📒 Files selected for processing (22)
  • mobile/src/tasks/composer-linked-work-item.ts
  • mobile/src/tasks/use-mobile-composer-name-ownership.test.ts
  • mobile/src/tasks/use-mobile-composer-name.ts
  • mobile/src/tasks/use-mobile-composer-source.ts
  • src/renderer/src/components/sidebar/folder-workspace-composer-submit.test.ts
  • src/renderer/src/components/sidebar/folder-workspace-composer-submit.ts
  • src/renderer/src/hooks/composer-state/branch-start-point-actions.ts
  • src/renderer/src/hooks/composer-state/composer-decisions.ts
  • src/renderer/src/hooks/composer-state/composer-deferred-source-name.test.ts
  • src/renderer/src/hooks/composer-state/composer-external-sync.ts
  • src/renderer/src/hooks/composer-state/composer-name-ownership.test.ts
  • src/renderer/src/hooks/composer-state/composer-name-source-selection.test.ts
  • src/renderer/src/hooks/composer-state/composer-source-model.ts
  • src/renderer/src/hooks/composer-state/composer-source-state.ts
  • src/renderer/src/hooks/composer-state/github-provider-selection.ts
  • src/renderer/src/hooks/composer-state/github-source-application.ts
  • src/renderer/src/hooks/composer-state/gitlab-provider-selection.ts
  • src/renderer/src/hooks/composer-state/issue-source-actions.ts
  • src/renderer/src/hooks/composer-state/quick-submit-source-preparation.ts
  • src/renderer/src/hooks/composer-state/source-identity-actions.ts
  • src/shared/new-workspace/workspace-source.test.ts
  • src/shared/new-workspace/workspace-source.ts





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







📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The shared workspace auto-name helper now accepts an optional flag that identifies lookup text as a query. Desktop and mobile composer flows pass linked-work-item context when deciding whether to apply generated names. Desktop base-branch selection can skip reapplying an already linked work item. Mobile name state and auto-name tracking move into a dedicated hook. Added tests cover manual names, query-derived names, source changes, and submission.












Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 37246

Explicit numeric workspace names are preserved in the reviewed paths. The remaining delayed GitLab base-selection race predates this change and does not block this merge.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 4.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 25 functions across 22 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed The pull request links issue #21676 with a matching objective and uses the required “Fixes #21676” reference.
Out of Scope Changes check Passed The implementation remains within the stated scope of preserving explicit workspace names and preventing repeated source selection. The description explicitly identifies deferred stale-base-writer wor…
Title check Passed The title clearly and concisely describes the primary change: preserving explicit workspace names after task selection.
Description check Passed The description is complete and relevant. It includes the required explanation, change details, rationale, linked issue, visual proof, testing evidence, review notes, compatibility considerations, and…

  • 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.

@nwparker
nwparker merged commit 68519e6 into main Oct 10, 2026
32 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.

[Bug]: New Workspace composer silently ignores an all-digits name and falls back to the slugified issue title

1 participant