Skip to content

Show unsynced edits and replay them on reconnect - #269

Merged
it-rec merged 1 commit into
masterfrom
claude/ux-pending-sync
Jun 1, 2026
Merged

Show unsynced edits and replay them on reconnect#269
it-rec merged 1 commit into
masterfrom
claude/ux-pending-sync

Conversation

@it-rec

@it-rec it-rec commented Jun 1, 2026

Copy link
Copy Markdown
Owner

What

A pending-changes indicator so edits made while offline are visible and not silently lost.

  • A new pendingSync store tracks channels whose latest edit hasn't reached the server.
  • useGameChannel marks a channel dirty when its POST fails and clean when it succeeds.
  • The connection badge shows a ⟳ N count of unsynced changes.
  • On the next reconnect, every dirty channel is re-posted automatically.

Why

Previously a failed save only flashed a toast; there was no lasting signal that N edits were still local, and nothing replayed them. The disconnect toast already promised "kept locally until the link returns" — this makes that real.

Tests

New pendingSync.test.js (counting/dedupe, subscribe, reconnect replay, failure stays dirty) and an added ConnectionBadge case for the pill. Lint + build pass.

Screenshot

Two edits made after the link dropped — the badge shows Offline with ⟳ 2 waiting to sync:

pending changes

Screenshot file included in this PR at docs/screenshots/ux/pending.png.

Notes

Independent of the other UX PRs (touches useGameChannel and ConnectionBadge, both untouched elsewhere).

https://claude.ai/code/session_0166awMvVyFXuwEex3x7jDmM


Generated by Claude Code

Edits made while the link is down now mark their channel dirty; the
connection badge shows a count of changes waiting to sync, and a pendingSync
store re-posts each dirty channel automatically once the connection returns.
@it-rec
it-rec merged commit 69562ea into master Jun 1, 2026
4 checks passed
@it-rec
it-rec deleted the claude/ux-pending-sync branch June 1, 2026 12:31
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.

2 participants