This repository was archived by the owner on Sep 2, 2026. It is now read-only.
Repository navigation
fix(workspace-name): carry the linked GitHub issue/PR number into derived names - #88
Merged
Merged
Conversation
…ived names getLinkedWorkItemWorkspaceName previously dropped the work-item number for GitHub/GitLab items (no Linear/Jira identifier), so a workspace created from a linked issue/PR had no number in its sidebar/board name or seeded folder/branch slug. Lead the name with workItemIdentity() (e.g. "Issue 42") the same way Linear/Jira identifiers already lead, and strip a bare matching #<n>/<n> token from the subject first so a title that already mentions the number isn't doubled. Closes #83
This was referenced Aug 26, 2026
64ix
added a commit
that referenced
this pull request
Aug 27, 2026
#88 made getWorkspaceSourceName carry the linked issue/PR number into the derived name, and #92 updated the desktop expectations but missed mobile — these five assertions have been red on main ever since. Mobile's resolveWorkItemAutoName is a thin delegate to that same shared function, and desktop now expects exactly this shape ('Issue 42 …', 'PR 91 …'), so the behaviour is intended and only the expectations were stale. Refs #71
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getLinkedWorkItemWorkspaceNamederived workspace display/seed names from the linked work item's title only. Linear/Jira items already led with their identifier (ENG-42 Ship parity), but GitHub/GitLab issues and PRs have no such identifier — and the title-strip logic (getLinkedWorkItemTitleSubject) actively removes any#<n>from the title — so the number never made it into the sidebar/board name or the derived branch/folder seed.This change leads the display name with
workItemIdentity(item)(Issue 42,PR 12,MR 7) for items without a Linear/Jira identifier, mirroring the identifier-leading convention already used elsewhere in this file (getWorkspaceIntentName). Before prepending it, a bare#<n>/<n>token matching the item's own number is stripped from the subject so a title that already mentions the number isn't doubled.Closes #83
Acceptance Criteria
getLinkedWorkItemWorkspaceName({ type: 'issue', number: 42, title: 'Spec - Clore et celebrer' })→{ displayName: 'Issue 42 Spec - Clore et celebrer', seedName: 'issue-42-spec-clore-et-celebrer' }(test insrc/shared/workspace-name.test.ts)getLinkedWorkItemWorkspaceName({ type: 'pr', number: 2049, title: '...' })→displayName: 'PR 2049 ...'; GitLab MR case also covered (MR 77 ...)PROJ-7 Fix flaky import); added a Linear identifier test (ENG-42 Ship Linear parity) proving the identifier branch is untouchedgetLinkedWorkItemWorkspaceName({ type: 'issue', number: 42, title: 'Fix #42 regression' })→displayName: 'Issue 42 Fix regression'(notIssue 42 Fix #42 regression)QA Plan
./node_modules/.bin/vitest run --config config/vitest.config.ts src/shared/workspace-name.test.tspasses (24/24)./node_modules/.bin/vitest run --config config/vitest.config.ts src/renderer/src/lib/smart-github-submit.test.tspasses — smart GitHub submit resolution now surfacesPR 2049 .../Issue 2050 ...style names./node_modules/.bin/vitest run --config config/vitest.config.ts src/renderer/src/hooks/useComposerState-host-context-boundaries.test.tspasses — auto-managed-name detection matches the new seed formatissue-<n>-...and the sidebar/board card showsIssue <n> — ...pr-<n>-.../PR <n> — ...)main(e.g.eng-42-...)Notes
Problem -> Resolution: The upstreamgetLinkedWorkItemTitleSubjectregex only strips#<n>when it's glued to a preceding word char (\b#\d+\bnever matches a boundary on the#side when preceded by whitespace), so a title like"Fix #42 regression"survives that strip untouched. Rather than touch that shared, non-surgical regex,getLinkedWorkItemWorkspaceNamenow does its own targeted strip of a bare#<item.number>/<item.number>token — consistent with the existing per-number stripping already done incompactWorkItemTitlein the same file — before prepending the identity. This keeps the upstream title-strip regex untouched (upstreamable) while still satisfying the "no doubling" acceptance criterion.getLinkedWorkItemWorkspaceName(the function multiple consumers —TaskPage,useComposerState,WorktreeJumpPalette,smart-github-submit,workspace-source— funnel through);getLinkedWorkItemSuggestedName(title-only, no number available) andmobile/src/tasks/mobile-workspace-name.ts(separate mobile-only slugger) were left untouched as out of scope.smart-github-submit.test.tsx2 in one describe block context,useComposerState-host-context-boundaries.test.ts) that had asserted the old (numberless) GitHub name shape — this is the intended behavior change the issue asks for, not a regression.