wo1056: editor sessions follow the document; item id for apps; folder locks (#1056, v0.6.386) #1069

Merged
Cordy merged 50 commits from wo1056 into main 2026-11-02 13:29:10 +00:00
Owner

Closes #1056 on release.

  • Editor sessions:
    • The WOPI id comes from the item id (item-id-key, HMAC). A session table follows renames and moves, including parent-folder and space renames.
    • Participants share one session lock, which is released record by record.
    • Every WOPI call checks the item again. The session ends moved-away, replaced or deleted, and the editor page shows an end banner.
    • Calls made while a move is in progress wait, and there is a 30 s grace period.
    • Read-only participants take no part in the lock.
  • Item id for apps: the public item id appears in the change feed (id) and as the WebDAV property cairn:item-id.
  • Locks (Nikola's decisions, research-1056-folderlocks):
    • A folder that holds another person's lock cannot be deleted, trashed or moved. Live editor locks follow moves.
    • Owner transfer carries locks and editors along. Delete unread files and space delete break the locks, with an audit entry and a bell.
    • The 423 response names lockOwner and lockPath.
  • S3 lost writes fixed: the write fence plus a keep-check during folder renames.
  • Admin restores keep the owner's key.
  • Docs: CHANGELOG v0.6.386, chart, document-editing, file-browser, change-feed, sharing, spaces, users-access, admin-policy, deployment, ARCHITECTURE.

Waves reviewed, research-backed decisions applied, final review, merged with v0.6.385, plus interaction tests with #1055, #1057 and #1063.

Closes #1056 on release. - **Editor sessions:** - The WOPI id comes from the item id (`item-id-key`, HMAC). A session table follows renames and moves, including parent-folder and space renames. - Participants share one session lock, which is released record by record. - Every WOPI call checks the item again. The session ends `moved-away`, `replaced` or `deleted`, and the editor page shows an end banner. - Calls made while a move is in progress wait, and there is a 30 s grace period. - Read-only participants take no part in the lock. - **Item id for apps:** the public item id appears in the change feed (`id`) and as the WebDAV property `cairn:item-id`. - **Locks (Nikola's decisions, research-1056-folderlocks):** - A folder that holds another person's lock cannot be deleted, trashed or moved. Live editor locks follow moves. - Owner transfer carries locks and editors along. Delete unread files and space delete break the locks, with an audit entry and a bell. - The 423 response names `lockOwner` and `lockPath`. - **S3 lost writes fixed:** the write fence plus a keep-check during folder renames. - **Admin restores** keep the owner's key. - **Docs:** CHANGELOG v0.6.386, chart, document-editing, file-browser, change-feed, sharing, spaces, users-access, admin-policy, deployment, ARCHITECTURE. Waves reviewed, research-backed decisions applied, final review, merged with v0.6.385, plus interaction tests with #1055, #1057 and #1063.
main.go loads item-id-key after the state binding (bound in statePaths),
gives changes.Wrap the public id, records restores with it, wires actrec's
move marks (fold as the store) and the editor follow first
(WithEditorFollow, late-bound to the handler), the office API's session
mode (editorWiring: Sessions.Fold, WopiID, EnsureItemID and ItemAt as the
home owner, SpaceOf/SpaceDir, Marks) and dav PublicID. stacktest gains
Opts.PublicItemID; the reuse rig wires as main.go does. End to end on
posix and s3.
The save-state check runs from the start of every editor by WOPI id
(?file=), every 30 s, every 5 s with unsaved edits or a refusal episode,
and at once when the tab is shown again (D9). A rename updates the bar's
name and folder in place (frame A). The first 404 editor-item-moved stops
the check and builds the end banner once, focused (frame B), with
Download a copy, Open folder and Close; the close warning asks first
with unsaved edits; Open folder lands on the folder or its nearest parent
that opens, Shares for /shared (frame C). office/open: 503
item-id-unavailable says edOpenUnavailable; share-read says edRoShare.
The editor frame gets a title (axe frame-title).

edsave913.test.js lines 219-220 and edsave913fix.test.js S3: the ?file=
URL and the 5 s / 30 s cadence (spec 8.1, D9).
Conflicts: CHANGELOG (386 above 385..383), chart appVersion v0.6.386; actrec (marks, editor follow and write fence beside the #1055 copy hook and #1063 SharedPollFor; Copy fenced, then copied hook); main.go and stacktest (share hooks with the federated ledger and item hooks, then marks and editor follow); owners.go (federated re-point, then the editor follow of the transfer); pathreuse835_test (composeShareHooks with nil ledger plus editor wiring); index.html (duLockStop and duShareParts); ARCHITECTURE, change-feed (id and why), deployment, users-access.
ocm: the unsharer failures test gives the peers 3 s, not 500 ms (flaked on the CI runner)
All checks were successful
ci / test-and-build (pull_request) Successful in 45m29s
35658aac10
Cordy merged commit 9893b5d207 into main 2026-11-02 13:29:10 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#1069
No description provided.