🤖 Flat sidebar: draft numbers collide when two projects hold a legacy-pending draft
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- desktop
Research direction
Start in ProjectSidebar, read getVisibleDraftNumbers and its three lookups, then check how DraftStore.migrateLegacyDrafts assigns legacy draft IDs. Add a test with two projects that each have a legacy-pending draft; done means their flat-sidebar labels have distinct numbers while other modes remain unaffected.
Written by the indexing model from the issue text.
Description
🤖 Follow-up from #5722 (#5677), Codex round 3 finding. It is not fixed there because the review budget is used up.
Problem: In flat sidebar mode, ProjectSidebar numbers visible drafts with a map keyed by draftId alone (flatDraftNumberById). Draft IDs are not unique across projects: DraftStore.migrateLegacyDrafts imports each project's old pending draft under the fixed ID legacy-pending. If two projects both keep such a draft, the second map entry overwrites the first, and both rows show the same number in their "Open workspace draft N" and "Delete workspace draft N" labels. Grouped mode and the scratch section number per project, so they are not affected.
Fix idea: key the numbering by the scope, for example ${projectPath}\u0000${draftId}, in getVisibleDraftNumbers and at its three lookups. About 10 lines, plus a test with two projects that each hold a legacy-pending draft.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $11.70
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 140
- Avg merge
- 5h 59m
- Merged PRs (30d)
- 935
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from coder/xum
-
backlog
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
backlog
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
backlog
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
backlog
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
backlog
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
farbenmeer/tapi#531 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
naver/egjs-flicking#971 ·
-
Renderer treats a sub-pixel width difference as a resize, which cancels the `motion()` entranceOpen
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Tenant
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
MTES-MCT/Dossier-Facile-Frontend#2061 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
backnotprop/plannotator#1784 ·
Maintainers usually reply within 1 day