Skip to content

P1: Writer silently loses a durable offline chapter edit on reconnect when another device concurrently edits the same chapter #248

Done

Description

@callumalpass

Summary

When a user edits a chapter in Writer while offline (proven locally durable across an offline page reload) and another client (CLI daemon) concurrently edits and syncs the same chapter online, reconnecting Writer silently replaces the chapter with the remote version and drops the offline edit. Even clicking Download local drafts produces a ZIP containing only the remote CLI text without the offline edit, and CLI reports zero holds and zero unresolved conflicts.

Environment

  • Production Connect revision: 5be4c301c8b6781131071147fa0ba9d892a74dc6
  • Writer served asset: index-DLcFFXXC-d10c4ef83e7d.js (SHA-256 9ef1adeab9bc37979798fc05dea02911106a54674fdf2d7ac339aac6cf5103d1)
  • CLI / daemon: mdbase 0.2.60
  • Collection: disposable hosted collection on prod-b

Reproduction (2026-11-28)

  1. Create a chapter containing WR_BASE_01 and confirm it syncs to CLI disk (pending=0).
  2. Take Writer offline via CDP (Network.emulateNetworkConditions({ offline: true })), insert WR_OFFLINE_42, wait 5 s, and reload the page while offline. Reopen the chapter and verify WR_OFFLINE_42 survived the offline reload locally.
  3. While Writer stays offline, append CLI_WR_99 to the chapter file on CLI disk and confirm mdbase status shows pending=0, held=0, conflicts=0.
  4. Bring Writer back online and wait 30 s.
  5. Observed: Both Writer and CLI show only WR_BASE_01 + CLI_WR_99; WR_OFFLINE_42 is gone. Writer shows "Not on server" / "Download local drafts", but the downloaded ZIP contains only the CLI marker and not WR_OFFLINE_42. CLI holds [], zero unresolved conflicts.

Related / Fix in Progress

  • Companion to live P1 mdbase-dev/mdbase-connect#2022 (Editor + shared SDK RecordSession).
  • Fix PR already open in CI: mdbase-dev/mdbase-writer#247 (retains a local backup for pending device saves and surfaces conflict recovery when rejection brings in another chapter body).

Activity

  1. added
    agent-e2e
    on Nov 28, 2026
  2. callumalpass commented on Nov 28, 2026

    @callumalpass
    MemberAuthor

    Release supervisor posture (P1)

  3. callumalpass commented on Nov 28, 2026

    @callumalpass
    MemberAuthor

    Verified fixed live in production on 2026-11-29 Melbourne / 2026-11-28 UTC (Writer index-C9BPYEoO-340d89e043cf.js, SHA-256 55fee84a0972ffec8c9011dddcc116677f30e52c856d309ebbe23d57b61bf2bf, Connect 3b2af1a7e705, CLI 0.2.60, account prod-b, dedicated GCP desk).

    • Trial A (offline edit -> offline reload -> online CLI concurrent edit -> reconnect): PASS — Writer paused editing and presented "Review recovered local draft" side by side with "Your local text" and "Collection version"; the local-drafts ZIP preserved WR248_A_OFFLINE; after restore & manual merge both WR248_A_OFFLINE and CLI_A_CONCURRENT synced to CLI disk at rev 23 with 0 pending/held/conflicts.
    • Trial B (repeat on a second chapter): PASS — identical recovery UI + ZIP backup; both WR248_B_OFFLINE and CLI_B_CONCURRENT synced to CLI disk at rev 29 with 0 pending/held/conflicts.
    • Control (single-writer offline edit -> reload mid-save -> reconnect): zero data loss — offline draft preserved in recovery UI and local-drafts ZIP and synced cleanly on restore to rev 15 (noted minor UX friction: reloading while "Recovering save…" required clicking "Restore local draft").

    Report: results/sprint-20261128/p1-writer-248-retest/report.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-e2e

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions