🤖 feat: composer-draft follow-ups that need new protocol or mechanism
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend-api-design, desktop, distributed-systems
Research direction
This is a backlog of 15 follow-ups rather than one bounded change. Start with the relevant originating issue and the named entry points, such as draftService.ts, DraftStore, or the drafts.importLegacy and drafts.update APIs; check dependencies such as #5217 before choosing one item. Done means implementing and validating one selected protocol or concurrency mechanism without taking on the other listed items.
Written by the indexing model from the issue text.
Description
Backlog for composer-draft follow-ups that need a new protocol or mechanism, split out of #5075 (and deferred review findings from #5221 and #5222). Each item below adds API surface or cross-process machinery, so it was kept out of the fix PRs.
From #5075
- Draft index with sibling backends on one root (#5067,
draftService.ts).DraftServicecaches a metadata index after the firstlist(). A second backend on the same Xum root (XUM_ALLOW_MULTIPLE_INSTANCES=1) can changedraft.jsonwithout this process noticing, and change events are in-process only. Needs a cross-process change token or a file watch. - Bulk legacy import (#5068, #5075 item 3). The one-time migration sends one
drafts.importLegacycall per legacy scope. Needs an array input ondrafts.importLegacy(API change). Bounded by the origin's legacy key count, and it runs once. - Remote edit during
moveDraft(#5068, #5069, #5075 item 9). A server-applied change does not bump local version counters, so a move can delete the source while holding a stale copy (multi-client only). Needs an atomic backenddrafts.move. - Failed-import fallback can overwrite a concurrent client's newer draft (#5068, #5075 item 13). After a failed
importLegacy, the store shows the legacy draft and saves it with a normal (overwriting)drafts.update; a draft another client created meanwhile is replaced. Needs a conditional write (for example "only if absent" or "only at revision N") ondrafts.update.
Deferred review findings
- A sub-project's own default creation draft (#5221 review). A sub-project's New Workspace action does not consider that sub-project's default creation draft (only the project-level row does, after #5221). Same behavior as main before #5221.
- Concurrent follow-up send clears a restored draft (#5222 review). If an edit send is still unresolved when the user starts another send, the edit's completion restores the pre-edit draft into the composer, and the later send's
setInput("")then clears the whole composer, including that restored draft. Pre-existing clear-after-capture behavior of a send; a fix needs sends to clear only what they captured. - Edit completion restores the wrong snapshot when a second edit started meanwhile (#5222 review). If a second edit starts while the first edit's RPC is unresolved, the first completion reads the shared pre-edit snapshot (now the second edit's) and closes edit mode, ending the second edit (the close is main's behavior). Needs the snapshot and the close bound to the submitted edit operation.
- Review notes attached while an edit send is pending are replaced (#5222 review). With a pre-edit review override, the completion restores the old override instead of merging it with notes attached meanwhile.
- Deep-link quota fallback before the first draft snapshot (#5228 informational review on the rebased head). If a startup
new_chatlink hits the draft-list quota fallback beforeDraftStorehydrated, the prompt is appended to an empty in-memory default draft; the dirty text then wins over the backend's existing default draft at the first snapshot. Needs the default draft loaded (or the append deferred to hydration) before merging the prompt. - Attachment-only legacy pending import has no retry marker — blocked on PR5 (#5217) (#5075 item 8). If the draft-list write fails at a full origin, an attachment-only legacy pending draft has no legacy key left to retry from, so the imported backend draft is unreachable. Re-listing it from the snapshot alone would resurrect a draft whose delete was interrupted (#5228 review), so the fix needs a small persisted recovery marker, which needs a registered key and budget in the localStorage key registry that #5217 is rewriting. Do after #5217 merges.
- Send clearing misses a boundary carried by the sent text's own trailing whitespace (#5229 round-3 review, non-loss). With
sent = "follow-up "andcurrent = "follow-up more"(typed during send preparation),removeSentTextfinds no whitespace boundary after the prefix and leaves the composer unchanged, so the already-sent text stays visible next to the new text (a duplicate, never a loss). Accept a boundary supplied by trailing/leading whitespace insidesent. - A failed send overwrites the composer (pre-existing on main; #5229 final check). On
!result.success,setDraft(preSendDraft)replaces the composer, losing anything restored or typed while the send was pending. Needs a merge-style restore. - Switching directly between two open, unsent edits loses the original pre-edit draft (pre-existing on main; #5229 final check). The second edit snapshots the first edit's text as its pre-edit draft.
- Queued-message Edit (restoreDraft) while an edit send is pending replaces the composer (pre-existing on main; #5229 final check). Not covered by the edit-send refusal.
- Cancelling an edit during the send's preference wait still sends it (pre-existing on main; no input loss since #5229). Should abort the send before dispatch.
Refs #5075
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $14.19
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 140
- Avg merge
- 2h 27m
- Merged PRs (30d)
- 873
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
-
🤖 bug: workspace header buttons shift left when the skills indicator loadsPossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
bug investigation
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
approved backlog
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
approved backlog
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
Similar issues
-
affected/v17 affected/v18 area/frontend type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
umbraco/Umbraco-CMS#24186 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
better-auth/better-auth#11723 · 1 reaction ·
Maintainers usually reply within 1 day
-
area: docs difficulty: easy documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Worker-Erstellung bricht langsame Git-Worktree-Checkouts nach 20 Sekunden abPossibly taken @KajoVanBuyten claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
AgentSystemLabs/agent-office#367 ·
Maintainers usually reply within 1 day