🤖 drafts: empty-row edge cases in creation draft list cleanup (deferred from #5232)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
Read src/node/services/draftService.ts, focusing first on deleteProjectDrafts, putListEntry, importLegacyList, and collectOrphanedCreationDrafts, along with the referenced review threads. Verify both re-added-project cleanup and orphan-directory failures leave no empty listed draft rows, while preserving the existing lock order and cleanup behavior.
Written by the indexing model from the issue text.
Description
Deferred from the #5232 round-4 review (creation draft list on the backend, src/node/services/draftService.ts). Both are narrow cases in project-removal cleanup that leave or drop an empty listed draft row; no typed input is involved. The coordinator stopped the review loop on #5232 after round 4 and deferred them here.
- Re-added project vs. removal cleanup (thread on
deleteProjectDrafts). If the same project path is registered again whiledeleteProjectDraftsholds the project's drafts dir lock,putListEntry(which takes only the list lock) can list a new empty draft that the cleanup's delisting then removes. Fix shape: haveputListEntry/importLegacyListtake the project dir lock too (dir lock, then list lock, the existing order), or record a project generation and delist only rows older than the removal. - List GC stops at the first failing orphan dir (thread on
collectOrphanedCreationDrafts). If clearing one orphan project dir throws, the outer catch skipsremoveUnownedListEntries, so empty rows of unconfigured projects stay until the next start (and show again if that path is re-added). Fix shape: catch per directory, or run the list cleanup as its own guarded step.
Refs #5225
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $31.20
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 139
- Avg merge
- 6h 58m
- Merged PRs (30d)
- 774
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
-
🤖 tests: localStorage budget worst-case test runs near the 5 s timeout and flakes in the merge queueOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
backlog
Difficulty 5/5 Over a week Newbie friendliness 38/100
Maintainers usually reply within 1 day
-
backlog
Difficulty 5/5 Over a week Newbie friendliness 20/100
Maintainers usually reply within 1 day
Similar issues
-
refactor
Difficulty 2/5 Half a day Newbie friendliness 84/100
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
OHDSI/Data2Evidence#3450 ·
Maintainers usually reply within 2 days
-
e2e-failure ready-to-code
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
redhat-developer/rhdh-plugin-export-overlays#4011 · 1 comment ·
Maintainers usually reply within 1 day
-
automation missing-model model-sync provider:ofox
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anomalyco/models.dev#8421 ·
Maintainers usually reply within 1 day
-
SlackAdapter and TelegramAdapter are not assignable to Adapter under exactOptionalPropertyTypesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day