Skip to content

fix(new-workspace): accept an all-digits name instead of treating it as an issue number - #26378

Closed
bbingz wants to merge 2 commits into
stablyai:mainfrom
bbingz:fix/21676-all-digits-workspace-name
Closed

bbingz wants to merge 2 commits into
stablyai:mainfrom
bbingz:fix/21676-all-digits-workspace-name

Conversation

@bbingz

@bbingz bbingz commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

ELI5

If you typed just a number, like 347, as the name of a new workspace, Orca quietly threw it away and used the linked ticket's title instead. It thought the number was an issue you wanted to look up. Now a plain number is kept as the name. Typing #347 or pasting an issue link still looks the issue up.

What Changed

Before: in the New Workspace composer, pick a ticket, type 347 or 002 into the name field, and create. The workspace, branch and folder are named after the ticket's title. Nothing says the typed name was dropped. Names like 002-x were kept, so only the all-digits case broke.

After: 347 is kept as the workspace name. #347 and issue or pull request links still count as lookups and are still replaced by the title-derived name. Typing 123 in the name field and then picking issue #123 from the search results still renames the workspace after the issue, as before.

Mechanism: the composer sorts what is in the name field into two kinds. A deliberate name must never be overwritten. A lookup reference, such as a pasted link, may be replaced once the ticket is resolved. isWorkItemLookupText decides which is which. It used parseGitHubIssueOrPRNumber, which accepts a number with or without #, so 347 counted as issue #347. Now the name-field check only counts a number when it starts with #. Link fields, the jump palette and other callers of parseGitHubIssueOrPRNumber are unchanged, because a bare number there really is an issue number.

The name field is also a search box, and typing 123 there offers issue #123. To keep picking that result working, shouldApplyWorkspaceSourceAutoName takes an optional item number: a bare number that parses to the picked item's number is still treated as the search text. Zero padding counts, because search reads 002 as #2. The two desktop GitHub pick paths pass the number. The mobile pick path calls the same shared check in one line, because that file is at its line limit. This mirrors the existing Linear rule, where a typed STA-123 that matched the picked issue is replaced.

Why

347 is a valid branch and folder name, and some teams name workspaces by ticket number alone. The submit-time smart lookup in getSmartGitHubSubmitIntent already required # before a number, so this makes the name-field classifier agree with it.

Alternatives considered:

  • Make parseGitHubIssueOrPRNumber require #. Rejected. Link fields and the jump palette rely on a bare number meaning an issue number.
  • Only fix the submit-time check. Rejected. Re-applying a linked item, such as on a provider switch, would still overwrite the typed number.
  • Show an error instead of keeping the name. The issue lists this as a fallback. Keeping the name is the direct fix, and silent replacement of other names is tracked separately in [Bug]: New Workspace composer replaces a typed name with no feedback #21680.

The approach follows the reporter's #21679, which its author closed without review. This PR adds the guard that keeps "type a number, pick that issue" renaming the workspace on desktop and mobile.

Linked Issue

Fixes #21676

Visual Proof

N/A. No pixels change. The fix changes which string becomes the workspace and branch name, and the automated tests below pin that behavior.

Testing

Automated, run locally on macOS:

  • src/shared/new-workspace/work-item-lookup-text.test.ts: 1234, 002 and 347 are names. #1234, issue and pull request URLs, and a URL inside text are still lookups. 347-ticket, fix 1234 later and #12a are unchanged.
  • src/shared/new-workspace/workspace-source.test.ts: a typed 347 is kept. 42 is replaced only when the applied item is Fix GitHub status refresh on activity #42, and 002 is replaced when the applied item is Fix Ctrl+Backspace not deleting word in terminal #2.
  • src/renderer/src/hooks/useComposerState-host-context-boundaries.test.ts: 1234 is a user-authored name at submit, and #1234 is not.
  • src/renderer/src/hooks/composer-state/composer-name-source-selection.test.ts: picking issue Fix GitHub status refresh on activity #42 over a typed 347 keeps the name, and over a typed 42 renames it. Both the regular and the folder-workspace pick paths are covered.
  • mobile/src/tasks/composer-linked-work-item.test.ts: mobile's auto-name gate keeps 347.

The new expectations fail on main and pass with this change. The focused desktop composer and new-workspace suites pass, as do the mobile task suites that load in this checkout. The web and node typechecks pass. The mobile typecheck was not run, because this checkout has no mobile dependencies installed. oxlint, oxfmt --check and pnpm run check:code-quality:changed are clean.

Not manually tested in the running app. Not tested on Linux, Windows or over SSH. The change is pure string logic in the renderer and mobile client, with no path, shell or platform code.

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

AI Disclosure

Implemented with Claude (Anthropic) as a coding agent. Reviewed by OpenAI Codex (codex exec, read-only).

Review

OpenAI Codex reviewed the diff read-only in two rounds. The first round found one real problem: a zero-padded search such as 002 finds issue #2, but picking it kept 002 because the match compared strings. The second commit compares the numbers instead, and adds tests. The second round answered "No actionable findings." Codex checked the other callers of the name classifier on desktop and mobile, the URL forms still covered by the link parser, and the submit-time lookup, and found no other regression.

Self-review: cross-platform, SSH, agent and integration compatibility are unaffected, since this is string classification in the client. There is no performance or security impact, and no UI layout change.

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

  • Security: none. No new input reaches a shell, path or network call.
  • Cross-platform: no platform-dependent code.
  • Remote SSH: unaffected. Classification runs in the client, and the name travels to the host as before.
  • Mobile: the mobile composer shares isWorkItemLookupText and gets the same fix, plus the same pick-a-searched-number rule.
  • Git providers: only the GitHub bare-number branch changed. GitLab, Jira and Linear never treated a bare number as a lookup.
  • Backwards compatibility: no wire, storage or protocol change. The only behavior change is that a typed bare number in the name field is kept.
  • Tradeoff: if you type 123 and then pick a different search result, 123 is kept as the name. Before, it was replaced.
  • Performance: none.

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)

https://claude.ai/code/session_01XZXEdbC4RKp288k2gBzLUW

bbingz added 2 commits October 7, 2026 23:24
…as an issue number

Typing a bare number such as "347" into the New Workspace name field was
classified as a GitHub issue lookup, so the composer silently replaced it with
the linked item's title-derived name at submit. Only "#123" or an issue/PR URL
now counts as a lookup in the name field. Selecting a search result whose
number the field holds still swaps in the title-derived name, so typing "123"
and picking issue #123 behaves as before.

Fixes stablyai#21676

Claude-Session: https://claude.ai/code/session_01XZXEdbC4RKp288k2gBzLUW
… item

Search parses "002" as #2, so picking #2 from that search must still replace
the typed query with the title-derived name. Compare the number numerically
through one shared helper used by desktop and mobile.

Claude-Session: https://claude.ai/code/session_01XZXEdbC4RKp288k2gBzLUW
@coderabbitai

coderabbitai Bot commented Oct 8, 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: 1e2d7d8f-889d-4617-ae28-4347a05ae80c
📥 Commits

Reviewing files that changed from the base of the PR and between 369b202 and e5c6bc5.

📒 Files selected for processing (10)
  • mobile/src/tasks/composer-linked-work-item.test.ts
  • mobile/src/tasks/use-mobile-composer-source.ts
  • src/renderer/src/hooks/composer-state/composer-name-source-selection.test.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/useComposerState-host-context-boundaries.test.ts
  • src/shared/new-workspace/work-item-lookup-text.test.ts
  • src/shared/new-workspace/work-item-lookup-text.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; 7 remain after this review.


📝 Walkthrough

Walkthrough

The change adds a shared check for numeric names that match a selected work-item number. GitHub lookup detection now requires a # prefix for numeric issue or pull-request references; recognized URLs remain supported. Composer paths pass selected item numbers into auto-name decisions. The mobile composer also treats a matching numeric name as empty when applying the suggested name.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to e5c6b

A bare all-digits workspace name such as 347 is now kept as typed instead of being replaced by an issue title. #347 and issue or pull request links still trigger lookups. No merge-blocking risk was identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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 7 functions across 10 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 summarizes the primary change: bare all-digit workspace names are accepted instead of being treated as GitHub issue numbers.
Description check ✅ Passed The description is complete and follows the repository template. It explains the user impact, implementation, rationale, linked issue, testing, limitations, compatibility considerations, and checklist…
Linked Issues check ✅ Passed Issue #21676 requires the New Workspace composer to keep an all-digits name instead of silently replacing it with a title-derived name. The change makes bare digits non-lookups in the name field, whil…
Out of Scope Changes check ✅ Passed The changed production code and tests are limited to name-field lookup classification and automatic naming for the behavior in issue #21676. The changes preserve other parseGitHubIssueOrPRNumber cal…
  • Fix all pre-merge checks with AI
  • 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.

@bbingz

bbingz commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #26937, which merged without keeping this parser change.

@bbingz bbingz closed this Oct 18, 2026
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