Skip to content

fix: preserve add-item drafts after local acceptance failures - #290

Draft
brianorwhatever wants to merge 1 commit into
mainfrom
dot/preserve-add-item-drafts
Draft

brianorwhatever wants to merge 1 commit into
mainfrom
dot/preserve-add-item-drafts

Conversation

@brianorwhatever

Copy link
Copy Markdown
Contributor

Problem

If adding item A fails before it enters the local queue, AddItemInput restored A into the input even when the user had already typed B. This overwrote the newer draft.

Change

  • Preserve the current editable draft on rejection and retain each rejected submission separately for explicit retry.
  • Retrying A does not clear or replace B; synchronous guards prevent duplicate immediate submits/retries.
  • Remount draft state per account and list, and ignore late feedback/state changes after unmount.
  • Explain that these rejected items have not been saved on this device and that the page must remain open to retry them.

This is ephemeral recovery for failures before local queue acceptance, not another server-sync queue. Once onAddItem accepts an item, existing OfflineRecovery owns server retries. Drafts/retry entries are not promised to survive reload or leaving the list/account.

Verification

Limits

Full repository tests, TypeScript/lint/build, browser E2E, native builds and real IndexedDB integration have not been run locally. Focused tests isolate the local acceptance promise and do not validate the entire offline UX. Automatic CI will be checked on the exact PR head.

Draft only; no merge or deployment.

@railway-app

railway-app Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the boop-pr-290 environment in Friends

Service Status Web Updated
boop ✅ Success (View Logs) Web Oct 8, 2026 at 8:44 pm UTC

This branch was successfully deployed

1 active deployment
Friends / boop-pr-290 — 595aa35f Deployed Oct 8, 2026 by railway-app[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant