docs-editing: Nextcloud never learns the editor exists — install richdocuments + point wopi_url at Collabora when Document editing is placed #413
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#413
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
The gap
The docs-editing port deploys Collabora Online end to end (
internal/clan/docsediting.go+docsediting_attach.go, #226 lineage): coolwsd on the ruled host, mesh-only behind the front door (ADR 0074), admin secret over a clan var, and a WOPI storage allow-list that namesfiles.<apex>as the one host permitted to embed the editor.But the coupling's other half has no code: nothing installs the
richdocumentsapp in Nextcloud or sets itswopi_url, so a community that ticks Document editing gets a running Collabora that trusts Nextcloud — and a Nextcloud that has never heard of the editor. No edit button on any document.grep -rn "richdocuments\|wopi_url" internal/comes back empty.(Found 2026-08-10 while answering "does the files deploy include Collabora?" against the GREEN nextcloud provision drive
20260810T144654Z— the drive deployed files alone; both services together would still not give in-Nextcloud editing.)What to build
When both files and docs-editing are placed for the community, the files node grows a
nextcloud-richdocumentsoneshot — the third of its kind besidenextcloud-oidc(ADR 0150) andnextcloud-brand(DDR 0007) ininternal/clan/files.go, same discipline throughout:occ app:install richdocuments || occ app:enable richdocuments(install-or-enable, the user_oidc guard shape),occ config:app:set richdocuments wopi_url --value="https://docs-editing.<apex>"— the editor host derived through the ONE hostname authority (ADR 0113), never retyped; this is the mirror ofDocsEditingConfig.FilesHostflowing the other way,nextcloud-setup.servicelike its siblings.Attach-time join: the render needs to know docs-editing is placed when it renders the files node (and vice-versa — a later
AttachDocsEditingwhen files is already active must also land the Nextcloud side). Follow the existing live-set / attach shape; whichever side attaches second completes the pair.Private-path wrinkle to carry (the split-horizon lesson, drive
20260810T134228Z): Nextcloud fetches fromwopi_urlserver-side, and Collabora calls back tofiles.<apex>server-side too. Both hosts resolve loopback in-guest via the T2 /etc/hosts wiring and are served by the front door with the community-CA chain the guest already trusts, so no new bridge should be needed — but say so in a comment and let the drive prove it, don't assume silently.Acceptance
internal/clan/files_test.go(or a sibling): both-placed renders the oneshot with the derivedwopi_url; files-alone renders NOTHING richdocuments (this drive's shape stays byte-identical).occ app:listshows richdocuments enabled,occ config:app:get richdocuments wopi_urlreadshttps://docs-editing.<apex>, and Collabora's/hosting/discoveryanswers over the front door.provision-nextcloud.live.spec.ts).Pointers
internal/clan/files.go— the two oneshot precedents to copy (nextcloud-oidc,nextcloud-brand).internal/clan/docsediting.go/docsediting_attach.go— the Collabora side + the FilesHost derivation to mirror.worktree-bridge-cse_01PLKLFxEnGVFCawokpodMEountil Ben merges — build on top of that once it lands on main.Landed as
df7c496onmain.The docs-editing coupling's other half now exists —
grep -rn "richdocuments\|wopi_url" internal/is no longer empty:internal/clan/files.go:FilesConfig.DocsEditingHost+renderNextcloudRichdocuments— anextcloud-richdocumentsoneshot (third of its kind besidenextcloud-oidc/nextcloud-brand), emitted ONLY when a docs-editing host is set:occ app:install richdocuments || occ app:enable richdocuments, thenocc config:app:set richdocuments wopi_url --value="https://docs-editing.<apex>"— the editor host derived through the ONE hostname authority (ADR 0113), ordered afternextcloud-setup.service, idempotent/re-run safe (ADR 0062). Files alone renders NOTHING richdocuments (byte-identical drive).internal/clan/files_attach.go:FilesLiveSet.DocsEditing→AttachFilesderivesdocs-editing.<apex>from the SAME apex through the SAME authority (the mirror ofdocsediting.goderivingfiles.<apex>); refused, never fabricated, if the apex yields no editor host.internal/clan/docsediting_attach.go: documents the pair-completion — whichever service attaches second, the orchestrator (holding both live sets) re-runsAttachFileswithDocsEditingset; docs-editing's own render declares the WOPI allow-list.AC1 (render tests) green:
internal/clan/files_test.go(both-placed renders the oneshot with the derivedwopi_url; files-alone renders NOTHING richdocuments; ordered+idempotent oneshot) andinternal/clan/files_attach_test.go(derived editor host / no-coupling).go test ./internal/clan/ ./internal/provision/passes.AC2 (live private-path check) and the both-ticked edit-a-document e2e drive leg remain the noted out-of-scope e2e follow-up (extends
provision-nextcloud.live.spec.ts).