# Offline draft sync test report

> Inspect a local fixture where reconnecting overwrites a newer offline draft. Follow the revision order and compare the saved text after sync.

Source: https://cueapril.com/reports/offline-draft-sync
Updated: 2026-12-01
Index: https://cueapril.com/llms.txt

## Does a user lose their newest edit when the connection returns?

The original implementation failed the “Local has newer edit” check. Expected 4 and observed 3. The corrected implementation met both expectations on the same inputs.

After reconnect, retain the draft with the newest revision. Compare two versions of a small, runnable fixture. The inputs, expected values and recorded results are public.

## What the control case missed

The first check has a newer remote revision so a remote-wins strategy passes. During an offline edit the local revision advances beyond the remote version. On reconnect, the same strategy loses the latest work.

Observed values from the two implementations

| Check | Expected | Original | Corrected |
| --- | --- | --- | --- |
| Remote is newer | 3 | 3 | 3 |
| Local has newer edit | 4 | 3 | 4 |

## What to check before merging

Resolve version ordering before writing remote state over a draft. A single increasing revision works for this model. Concurrent edits on different devices also need conflict resolution or an explicit user choice.

## Reproduce the recorded result

Download the [Node.js fixture](/examples/qa-regressions/run.mjs) and run node run.mjs offline-draft-sync with Node.js 24. Compare the printed JSON with the [recorded results](/examples/qa-regressions/results.json). This is a locally executed model of the regression, using synthetic inputs. It covers the rule shown here. Hosted runs, browser behaviour and customer PRs require their own evidence.

## Primary documentation

- [Runnable synthetic regression fixtures](/examples/qa-regressions/run.mjs)
- [Recorded output for all twelve fixtures](/examples/qa-regressions/results.json)

By Cue April. Updated 2026-12-01.

## Related

- [Worked test reports](https://cueapril.com/reports): Replay a real mobile pricing defect from a Cue April pull request. Explore runnable reports for checkout, search, data migrations and other regressions.
- [Pull request testing](https://cueapril.com/use-cases/pull-request-testing): See what a pull request test report should show before you merge. Follow a failing checkout check through the fix and inspect a real PR report.
