Repository navigation
fix(j5): a Collaborator on a thread sees its preview tabs - #797
Conversation
A person whose access is narrower than the server saw a preview tab's URL bar and menu but never the page. The page comes on its own WebSocket, /api/preview-stream/ws, and the access gate kept a narrowed session's permissions only on /ws, thread loads and the artifact read, so the stream's upgrade was refused. The gate now keeps them on the stream, its downloads and its uploads when the person holds Collaborator on the thread the request names. Tabs are keyed by thread, so that thread is the tab's. Viewers stay refused, as People and access AC21 defers watching to #540. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
From review of #797. A thread id the gate cannot read, such as `%20`, threw inside the gate and answered 500; it is now refused. Tests add a Collaborator streaming a thread they only view, a project Collaborator streaming another project's thread, and the socket's upgrade sign-in. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Walkthrough
Merge Risk:
|
Brings in from j5/main: - #773 publish the Windows x64 CLI archive and installer - #797 a Collaborator on a thread sees its preview tabs - #662 Fleet: measured ledger and runtime facts - #767 bump J5 Code to 0.0.51 - #769 storage cleanup reads Git 2.56's broken-gitfile message - #765 a shared conversation's note stays off the timeline minimap - #763 a link for one person always names who it is for - #764 widen a person to a project or the server from their People row Adapted to v0.1.3: the minimap's shared-note check lives in J5's minimapMessages.ts; Fleet's keyboard test is a browser test on the browser userEvent, so @testing-library/user-event is not added; Fleet's monitor test follows upstream's awaited-only hold rule; the Windows build pins Node 26.12.1; memo hooks, an em dash, a long comment and an unbudgeted effect from main are fixed for the branch's lint rules. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Problem
A person who holds Collaborator on a thread or a project, but not the server, saw a preview tab's URL bar and menu and never the page. The page comes on its own socket,
/api/preview-stream/ws, which the access gate refused to every narrowed session. Closes #796.What changed
accessHttpRulenow names the preview stream, its downloads and its uploads, and keeps a narrowed session's permissions on them when the person holds Collaborator on the thread the request'sthreadIdnames. Tabs are keyed by thread and tab, so that thread is the tab's. A thread rule now carries the level it needs: a thread's loads still need Viewer, the preview routes need Collaborator. Viewers stay refused, since People and access AC21 defers watching to #540.Checking the tab's thread, rather than letting any Collaborator anywhere through, matches how the preview RPCs are already gated (
onThread("collaborator")). Jackson chose it on 2026-10-29.UI changes
The page a thread-scoped Collaborator sees in the thread's preview tab:
Live testing
Verdict: the change works. A tester agent ran
j5-live-testat f39f404 againstorigin/j5/main, with one real turn on Claude Haiku 5.5 in a new thread.<input type=file>and a download (200, the file's contents) work for the thread Collaborator./downloadanswers 403, with nothing loud. The tab is not listed for them either; "Browser" is greyed out in "Open a surface"./download.Known gap, tracked in #798: a stream socket opened before the demotion stays usable after it, because upstream's stream route checks the session only when it opens. The tester reproduced it with a Node client holding the socket: it kept streaming and clicking for over two minutes. The web client isn't affected, since it reloads on renewal. The gap is upstream's and already applies to server-wide sessions; this PR extends it to thread and project Collaborators. Fixing it edits an upstream file, so it's a separate change.
Not exercised live: raising a person back from Viewer to Collaborator. The People section of the Owner's thread details panel vanished on selection and saved nothing, three times. That's outside this PR and wasn't checked on base; a person should try it by hand.
Head: b72dac9, after the tested commit, refuses a malformed thread id instead of throwing, and adds unit tests. It changes no path the test exercised, so it wasn't re-tested live.
Not covered by this kind of test: the desktop app, relay and tunnel connections, and mobile.
Checklist
FORK.md(case text and file-table row) in this PR. No upstream file is edited; case 69's list of allowed routes is updated.docs/j5/product/upstream.md. Not applicable: J5's own gate.AGENTS.md). Web and mobile both stream through the same route; no contract change; losing the level refuses the next request.docs/j5/product/and user docs rewritten where this changes them. Not needed: AC14 and AC16 already say a Collaborator uses previews.Claude Opus 5.5 in Claude Code, running in J5 Code.
🤖 Generated with Claude Code