Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

🤖 Flat sidebar: draft numbers collide when two projects hold a legacy-pending draft

Open Beginner friendly
#5,737 1 comment 0 reactions 0 assignees View on GitHub

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

backlog

🤖 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from coder/xum

All issues in coder/xum

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.