Skip to content

feat: queue and reconcile offline service mutations - #642

Open
woahwhattheheck wants to merge 13 commits into
Agentpay-Org:mainfrom
woahwhattheheck:sol56/agentpay630-offline-queue-r2-20261006
Open

woahwhattheheck wants to merge 13 commits into
Agentpay-Org:mainfrom
woahwhattheheck:sol56/agentpay630-offline-queue-r2-20261006

Conversation

@woahwhattheheck

@woahwhattheheck woahwhattheheck commented Oct 6, 2026 •

Copy link
Copy Markdown

Closes #630.

Summary

Adds a persistent offline mutation queue for services-dashboard create and price-update actions, then reconciles queued work when connectivity returns.

  • queue service mutations in browser storage while offline or after a network/timeout failure;
  • preserve persisted enqueue order during replay;
  • single-flight concurrent flushes and coalesce adjacent duplicate clicks without collapsing intentional A → B → A edits;
  • preflight server state before replay and verify server state after a write so retries do not blindly double-apply;
  • surface 409/412 and state drift as explicit conflicts;
  • keep 429, 5xx, network failures, and unverified post-write readback pending/retryable rather than falsely classifying them as conflicts;
  • extend the existing offline banner with queue/sync/conflict status plus retry/discard controls;
  • integrate both service creation and price editing with the queue;
  • retain deleted offline update targets (404 preflight) as discardable server conflicts rather than endlessly pending retries;
  • return stable typed messages for immediate mutation errors without exposing raw server error text.

Acceptance coverage

  • offline mutation → persisted queue + queued UI state;
  • reconnect → FIFO flush;
  • reload-shaped storage read → queue survives;
  • duplicate flush → single-flight / no duplicate write;
  • server conflict → surfaced and retained for operator resolution;
  • unit coverage for queue ordering, idempotent recovery, conflicts, and retryable failures;
  • integration coverage for NewServicePage offline persistence.

Validation boundary

The current carrier has 13 commits and 8 changed files at head e9831bf57b35d0f1800d9e91376a89d681075eff. Source includes focused regressions for uncertain create preflight, deleted update targets, and safe typed mutation errors. An earlier focused receipt records seven queue cases passing; that is historical evidence, not execution of the later regressions. No fresh full lint, test, build, or current-head CI-green claim is made here.

No CRDT/background-service-worker expansion is included.

Hosted CI status

Historical workflow run 37506558258 failed during npm ci before lint/tests/build because of sponsor package/lock drift. This carrier does not modify package.json or package-lock.json; the separate dependency repair is PR #644. Its green run is not validation of this queue carrier. Current-head hosted checks remain authoritative.

@woahwhattheheck

Copy link
Copy Markdown
Author

/claim #630

Existing issue-level claim: #630 (comment)

I, @woahwhattheheck, affirmatively claim original-contributor credit for PR #642 and request evaluation for any applicable GrantFox OSS / Official Campaign (FWC26) reward and payment if accepted. Current carrier head: e9831bf57b35d0f1800d9e91376a89d681075eff.

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.

offline detection with queued services dashboard mutations and reconcile

1 participant