Document notes

The File Repository keeps an unfinished note for each actual document. Inferred display metadata and file-availability checks leave the stored source record unchanged. Capturing a note creates separate event and metadata records. Selecting another file, searching, switching project routes or views, and returning to the original file preserves that file's note in the current app instance. Stale controls, replaced document objects, detached views and changed sessions cannot read or capture another document's note. View and comment/write permissions are checked again when capturing a write event.

For authenticated workspaces with the protected recovery API configured, unfinished notes can also survive reload. Before inspecting private retained bytes, the app obtains a fresh server-verified deployment, issuer and subject, then loads the current server workspace and verifies the original document, project boundary and permissions. Browser profiles and decoded tokens do not establish recovery identity. Unsigned local APIs and unavailable verification leave editing in memory with an explicit recovery warning.

Retained notes remain separate from workspace snapshots and cloud saves. Reload presents Restore retained note and, for an uncaptured draft, Discard retained note. Neither action runs automatically. Both repeat the protected context and workspace checks. Restore does not replace later in-memory edits. A changed metadata base permits explicit restoration as an unsaved note while preserving earlier save evidence; a changed project, business boundary or document incarnation cannot adopt the old retained key. Moving the same actual document can preserve its current memory note under the destination's permissions, but does not retarget its original durable recovery record. Attempted retention reports that change.

Captures and uncertain saves

Capturing creates a document write event and metadata record from the exact note version. The editor clears only that captured version; a later edit survives. The retained recovery record keeps the original text, event and metadata until a matching server response confirms them. Before sending a captured-note save, it also retains the original request body, expected workspace version, idempotency key and reason. Later captures queue separately without rewriting that request.

A lost or failed acknowledgement leaves the save unconfirmed and blocks later workspace saves. Check original note save obtains fresh context and workspace authority. It checks every event and metadata record in the original batch. Already confirmed events require no duplicate write. An unconfirmed request can be retried only with its original bytes and headers, an unchanged expected version, and current permission for every affected document. A conflicting or changed result preserves the evidence for manual resolution.

Confirmation removes only the confirmed capture evidence. It preserves uncaptured retained text even when the user has not restored it into the editor, as well as later queued captures. A queued capture receives a separate request and version after the original outcome is resolved. If the server workspace has otherwise changed, later local workspace changes require reload rather than overwriting newer facts.

Browser storage and lifecycle

The app-owned adapter uses the unchanged private @categori/browser-recovery package. Recovery keys include the verified deployment, issuer, subject and original document/project ownership and incarnation fields. Complete document bases remain separate from these stable resource keys. Note text is bounded to 64 KiB; retained request bodies and envelopes also have explicit bounds. Quota errors, denied storage, malformed records and oversized records are reported without deleting existing bytes. Notes that cannot be retained remain in memory while the context is current.

Updates and deletion use opaque receipts and exact stored preimages so an older acknowledgement or discard preserves a newer retained record. Remaining text and captures are rewritten conditionally without first deleting the previous record. Browser localStorage has no atomic comparison-and-write operation; these are best-effort checks, not database transactions or cross-tab locking. Storage content cannot establish identity or permission, and legacy unscoped records are not read or migrated automatically.

Workspace loads, saves and object requests retain their initiating session and API configuration. Requests use the original authorization header and recheck context after transport and response parsing. Changed sessions, expiry, API configuration, sign-out and disposal clear the private view, memory drafts and callbacks. Retained browser records remain under their original scope and require fresh protected verification before a later read. Failed, missing or partial hydration cannot inherit the previous actor's workspace.

Saves run sequentially within the current app context. Object status and upload results require the same document/project objects, storage path, permissions and recorded object facts. Notebook imports recheck the project, write permission and original cells after reading a file. Late OAuth exchanges cannot replace a newer session or pending sign-in; failed storage removal retains a local sign-out tombstone.

Cloud saves require the expected workspace version and the original request ID. The coordinator retains complete candidates and completed request editions; competing saves of the same version return a conflict. An original request can return its accepted edition after a later save. Unknown provider reads fail before writes; proven absence returns an empty workspace without creating storage. Publication across separate providers is coordinated, with no single atomic transaction across them. Privileged direct writers and already dispatched effects retain their separate limits. Canonical admission, immediate token-specific revocation and broader native interruption/lifecycle acceptance remain open.

Local acceptance

Regressions exercise the production render and delegated callbacks, branded API context, bounded recovery adapter and actual cloud handler through local fixtures. Compiled Chromium acceptance uses sealed synthetic sessions and Gateway claims, routes private requests through the actual handler, and intercepts provider transport with in-memory stores. It covers explicit reload restoration, an acknowledgement lost after commit, queued captures, later text, newer stored records, separate subjects, rejected context, quota errors and unavailable provider reads. No provider credentials or cloud operations are required.