Skip to content

fix(yjs): report why a handshake was refused and keep editing locally - #3270

Merged
JammingBen merged 1 commit into
mainfrom
fix/yjs-denied-reasons
Sep 2, 2026
Merged

fix(yjs): report why a handshake was refused and keep editing locally#3270
JammingBen merged 1 commit into
mainfrom
fix/yjs-denied-reasons

Conversation

@JammingBen

Copy link
Copy Markdown
Member

The Yjs server collapsed 401, 403 and 404 from the Graph permissions probe into one "access denied", and threw a plain Error.

Refusals now carry a DeniedReason code (token-invalid, access-denied, malformed-document, server-error), mirrored as YjsDeniedReason in useYjsSession. Unexpected errors map to server-error instead of looking like a denial.

A refused room no longer locks the editor read-only: it falls back to local mode, since AppWrapper derives read-only from the resource permissions and the WebDAV PUT is the real write gate.

@JammingBen JammingBen self-assigned this Aug 31, 2026
The Yjs server collapsed 401, 403 and 404 from the Graph permissions probe
into one "access denied", and threw a plain Error.

Refusals now carry a DeniedReason code (token-invalid, access-denied,
malformed-document, server-error), mirrored as YjsDeniedReason in
useYjsSession. Unexpected errors map to server-error instead of looking
like a denial.

A refused room no longer locks the editor read-only: it falls back to local
mode, since AppWrapper derives read-only from the resource permissions and the
WebDAV PUT is the real write gate.
@JammingBen
JammingBen force-pushed the fix/yjs-denied-reasons branch from 8cce39d to ba4378e Compare September 1, 2026 07:17
@JammingBen
JammingBen merged commit 911f744 into main Sep 2, 2026
31 checks passed
@JammingBen
JammingBen deleted the fix/yjs-denied-reasons branch September 2, 2026 09:05
@openclouders openclouders mentioned this pull request Sep 2, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants