#486: in-browser document editing via WOPI (Collabora Online integration) #516
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-486"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements #486 end to end, per the approved office-editor mockup rev 2.
Backend (witnessed-red TDD)
internal/office: discovery client (edit actions only, 10 min cache, error surfaced for the admin card), stateless HMAC access tokens (per-boot key; token pins user + path + write-bit + expiry), WOPI file-id codec, embedded empty templates for odt/ods/odp/docx/xlsx/pptx (md/txt create empty).internal/api:/api/v1/office/statusprobe,/api/v1/office/open(write access decided up front from read-only spaces, covering locks and legal holds; Recents +office-openaudit),/api/v1/admin/office,POST /api/v1/files/new(template create through the scoped store — quota/holds/locks enforced for free), and the/wopihost surface on the OUTER mux: CheckFileInfo (UserCanNotWriteRelative), GetFile (marks skip-context — an edit round-trip can never bake a download mark into the stored file), PutFile (X-COOL-WOPI-Timestamphandshake, 409 +COOLStatusCode1010 on external change).office{url,appName,wopiBase}; envCAIRN_OFFICE_URL/CAIRN_OFFICE_WOPI_BASEwin.marks.ContextSkipMarking.office-openaudit verb registered.Frontend (mockup rev 2, all four variants)
office.appName— nothing hardcoded.Docs/packaging: handbook
document-editing.md+ index row, EULA third-party document server clause, compose + chart notes (default off), CHANGELOG v0.6.178.CODE itself is already live at 192.168.10.250 behind code.c0rdyceps.ch (homelab-config
k3s/collabora/), discovery verified with 74 edit actions.internal/office: discovery client (edit actions only, 10min cache, error surfaced for the admin card), stateless HMAC access tokens (per-boot key; token pins user+path+write-bit+expiry), embedded empty templates for odt/ods/odp/docx/xlsx/pptx (md/txt create empty). internal/api: /api/v1/office/status probe, /api/v1/office/open (write access decided up front from read-only spaces, covering locks and legal holds; Recents + audit office-open on open), /api/v1/admin/office card endpoint, POST /api/v1/files/new (template create via the scoped store - quota/holds/locks enforced for free), and the /wopi host surface on the OUTER mux: CheckFileInfo (UserCanNotWriteRelative), GetFile (marks skip-context so an edit round-trip can never bake a download mark into the stored file), PutFile (X-COOL-WOPI-Timestamp handshake, 409 + COOLStatusCode 1010 on external change). config: office{url,appName,wopiBase}; env CAIRN_OFFICE_URL wins. marks: ContextSkipMarking/SkipFrom. audit: office-open verb.Entry points (variant 1): 'Edit in {app}' in the row menu directly under Open for discovery-editable formats; accent Edit button in the preview panel header. App name comes from office.appName, formats from the editor's own discovery - nothing hardcoded. New menu (variant 2): the toolbar's New-folder button becomes New with Folder, the ODF triple, the Microsoft triple and md/txt, each with an extension chip; office entries render only when an editor is configured, md/txt always; documents open straight into the editor. Editor page (variant 3): full-viewport takeover with a single 40px bar - Back, centred name+path, read-only reason chip (locked by {user} / legal hold / read-only space), app tag - and the editor iframe below; token delivered by form POST; browser back and the Back button both return to the folder; no Save button by design. Admin (variant 4): Administration -> Document editor read-only card with Status (connected/not configured/unreachable with the fetch error verbatim), Server, App name, New documents, Formats chips and the config.json/CAIRN_OFFICE_URL footer. i18n x4.