Repository navigation
Conversation
…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
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (10)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe change adds a shared check for numeric names that match a selected work-item number. GitHub lookup detection now requires a Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to A bare all-digits workspace name such as 347 is now kept as typed instead of being replaced by an issue title. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
|
Superseded by #26937, which merged without keeping this parser change. |
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#347or pasting an issue link still looks the issue up.What Changed
Before: in the New Workspace composer, pick a ticket, type
347or002into 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 like002-xwere kept, so only the all-digits case broke.After:
347is kept as the workspace name.#347and issue or pull request links still count as lookups and are still replaced by the title-derived name. Typing123in 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.
isWorkItemLookupTextdecides which is which. It usedparseGitHubIssueOrPRNumber, which accepts a number with or without#, so347counted as issue #347. Now the name-field check only counts a number when it starts with#. Link fields, the jump palette and other callers ofparseGitHubIssueOrPRNumberare unchanged, because a bare number there really is an issue number.The name field is also a search box, and typing
123there offers issue #123. To keep picking that result working,shouldApplyWorkspaceSourceAutoNametakes 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 reads002as #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 typedSTA-123that matched the picked issue is replaced.Why
347is a valid branch and folder name, and some teams name workspaces by ticket number alone. The submit-time smart lookup ingetSmartGitHubSubmitIntentalready required#before a number, so this makes the name-field classifier agree with it.Alternatives considered:
parseGitHubIssueOrPRNumberrequire#. Rejected. Link fields and the jump palette rely on a bare number meaning an issue number.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,002and347are names.#1234, issue and pull request URLs, and a URL inside text are still lookups.347-ticket,fix 1234 laterand#12aare unchanged.src/shared/new-workspace/workspace-source.test.ts: a typed347is kept.42is replaced only when the applied item is Fix GitHub status refresh on activity #42, and002is 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:1234is a user-authored name at submit, and#1234is not.src/renderer/src/hooks/composer-state/composer-name-source-selection.test.ts: picking issue Fix GitHub status refresh on activity #42 over a typed347keeps the name, and over a typed42renames 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 keeps347.The new expectations fail on
mainand 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 --checkandpnpm run check:code-quality:changedare 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.
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
002finds issue #2, but picking it kept002because 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
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
isWorkItemLookupTextand gets the same fix, plus the same pick-a-searched-number rule.123and then pick a different search result,123is kept as the name. Before, it was replaced.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)https://claude.ai/code/session_01XZXEdbC4RKp288k2gBzLUW