# Recover local drafts after disconnection

Understand IndexedDB drafts, explicit queued saves, conservative conflict handling and offline shell limits.

Canonical URL: https://opennodeflow.dev/wiki/offline-editing/
JSON reference: https://opennodeflow.dev/wiki/offline-editing/index.json
Source snapshot: 2026-10-23

The workflow editor can retain an open draft during a short API/network interruption. This is draft recovery, not offline execution. Graph edits remain local until an explicit save is accepted by the server.

## Continue editing

An open canvas retains its graph, socket metadata and edits while disconnected. Move/add/remove nodes and wires, edit literals/configuration and organise frames. IndexedDB stores the draft after a short debounce so the same tab can recover it after reload.

Click Save while offline to queue that explicit workflow save. Unsaved edits are retained locally but are not automatically published just because connectivity returns. Switching away and choosing to discard a draft also clears its queued save.

On reconnect, ONF first reads the current server revision. Independent field changes can merge. Conflicting changes to the same field stay local and require a choice rather than silently overwriting the server.

## Resolve a conflict

Keep local choices retains conflicting local values, incorporates independent remote edits and prepares a reviewed explicit Save. Use server version deliberately discards the local draft. Export a valuable local draft before deciding.

If a save reached the server but its response was lost, reconciliation recognises accepted content instead of creating a duplicate revision. Normal revision guards remain active. A timeout is not evidence that a write failed.

Action requests are different from saves: Run, trigger pause/resume, code execution and library publication are not queued for automatic replay. Read the retained state before retrying any uncertain action.

## Cached shell limits

Service workers are available on secure origins and localhost. After an online visit, the cached shell and already loaded assets can reopen the workbench offline. A direct LAN HTTP origin cannot rely on the same cold-offline reload behavior.

The service-worker cache excludes API responses and run payloads. Metadata caches exclude definition source/documentation and execution payloads, while graph drafts may contain values typed into configuration or inputs. Assets never fetched online may remain unavailable offline.

Browser storage belongs to one origin/profile. HTTP, HTTPS, localhost and direct IP are separate stores. Clearing site data removes drafts. Private browsing or storage quotas can prevent recovery; the app reports a storage warning and retains its open in-memory draft where possible.

Separate tabs use separate draft keys. There is no cross-device draft synchronisation. Browser recovery does not replace server [backup/restore](/wiki/backup-restore/).

## Execution display versus server work

The execution eraser clears this tab's selected run input/snapshot/highlights and closes Debug. It does not edit the graph, delete history or cancel a job. Use Cancel in Runs to stop active server work.

Reconnecting refreshes the selected accepted job and preserves the last result on read failure. Refresh retries reads, never submits another run. A job accepted after its local display was cleared remains available in Runs.

Use [versioning](/wiki/versioning/) for library updates and [troubleshooting](/wiki/troubleshooting/) when the disconnect persists. Keep local recovery and execution recovery separate.

---

## Documentation provenance

- `docs/OFFLINE-EDITING.md`
- `docs/WORKFLOWS.md`

This page describes maintained source, not a live inventory or an authorization to perform actions.
