You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Share links 3: the Share action, the People page and the link #535
Third of four pieces for share links, after #531 (the data) and #532 (the filter). This is the piece that switches sharing on, so it lands only once #532 is merged.
A member who holds the Manage access permission names a person and makes a share link for them; the link pairs one device as that person, and a further device takes a further link (AC17, AC19, AC20).
Share action on a thread and on a project, with the dialog text of AC21, and the optional line saying what the guest is there for.
People page in Settings: each person, what they can reach, their devices; add, change and remove grants; make a device link (AC18).
A guest can leave a grant they hold, from their own client (AC25).
A link uses a route by which the server is already reachable (AC22).
Findings to build on (read from the code, nothing run)
Upstream's HTTP pairing endpoint accepts only a label and scopes; createPairingLink itself accepts a subject. A J5 route mints the link.
A link is single use.
A guest session holds, from the start, the upstream permissions its highest possible level needs (view, operate tasks, control previews) and none of terminal, filesystem, source control, settings, providers or access, because a session's permissions cannot change later. The grants narrow it.
Upstream
Minting a guest link changes what upstream's pairing does. It needs an entry in the register of divergences, and FORK.md entries for each upstream file touched.
Surfaces
Share and the People page on web and desktop; decide for mobile and say so. A guest's client on every surface must show a view-only thread with a read-only composer.
From #536: a guest link, and so every session made from it, must carry the subject j5:guest (GUEST_SESSION_SUBJECT), and the session's row in j5_a2a_person_session must be written when the session is created. The subject is the second mark that makes the binding fail closed: a guest session with no row reaches nothing, where an unmarked session with no row is a member's own device.
From the security review of #561 (2026-10-12). Requirements for the link:
A guest link must never carry access:write. MCP OAuth consent (auth/McpOAuth.ts) signs in through authenticateBrowserSession, which the guest gate does not wrap, and approves any session that holds access:write. A guest with it could mint an mcp-client session with the full toolkit. Add a test that fails if a guest link is made with it, and consider refusing the consent route to a j5:guest subject outright.
Decide whether a guest can use /oauth/token to get a bearer session. A session made that way has a new id; unless it is bound to the person it is a guest with no grants (it fails closed, but the guest's second client would see nothing).
GET /api/auth/session is ungated and reports a guest its real permissions. That is what tells the client it holds 'operate'; the client piece needs to account for it.
A guest cannot mint asset URLs, so images and attachments in a granted thread probably do not render. Check in the browser and decide.
To verify once a grant can be changed on a running server: over a real socket, a guest's open subscribeThread stops delivering when its grant is removed. #561 proves this with a stand-in handler only.
For the UI layer, from the panel on #581, #582 and #585 (2026-10-12):
The Artifacts page keeps showing a file after a guest leaves the project grant (seen live). The server refuses further reads; the page shows what it already loaded, because apps/web/src/j5/artifacts/ArtifactsPage.tsx refreshes on a change and does not handle the subscription ending. J5's own file: clear the page when the subscription is refused.
Opening a guest's link in a browser signed in as a member switches that browser to the guest, and the member has to pair again. Upstream replaces a browser's previous session on pairing. The Share dialog should say to send the link, not open it.
The requests the UI calls are in packages/contracts/src/j5/sharing.ts: listPeople, createGuest, putGrant, removeGrant, removePerson, revokeDevice, createLink, revokeLink (being added), listOwnGrants, leaveGrant, and for the open link createOpenLink, revokeOpenLink, confirmGuestName, listOpenLinks, with POST /api/j5/sharing/join for the join page.
Giving Collaborate to someone whose name is self-given is refused by the server until a member confirms the name (being added), so the People page needs the confirm step before the level control.
UI design decisions (Jackson with the designer agent, 2026-10-12)
Full write-up with verbatim wording: J5 artifact artifacts/share-links-ui-design.md; mockups artifacts/share-links-ui-mockups.html (project "J5 Code"). The build should take wording from the artifact; this is the summary.
Thread menu (header title and sidebar right-click): "Share thread…" after Copy. Disabled, not hidden, without Manage access.
Header chip only once a thread is shared: stacked avatars + "2 people", left of the panel toggles. Opens the Share dialog for a member who can manage access; information for everyone else, guests included.
A People section in the thread details panel (after Lineage, mounted like Automations/Relationships): heading with an add-person icon (Share dialog) and a "···" menu (Make a join link…; Copy/Revoke join link while one exists; Manage project sharing when the project is shared; Open People settings). One row per thread-grant person with a level control ("View ▾"): View / Collaborate / New device link… / Remove from thread. A "name they gave" tag on unconfirmed names (click → confirm-name popover). A muted "Join link · 6 days left" line. A muted "3 others ›" row for server/project-grant people, opening the "Others on this thread" dialog (Members list without levels; one group per project grant with levels; gear icons to People settings / project Sharing for managers only). Guests see rows without controls, "(you)", and "Leave this thread" at the bottom. Nothing shared: "Only members reach this thread."
Project: a "Sharing" section on the project settings page with "Share project…".
2. Share dialog ("Share thread" / "Share project", no description)
Name field, placeholder "What the agent and other people call them", no helper; matches existing people (button becomes "Share", no link, AC20).
"What they can do": View "Read the conversation, the diffs and the in-app browser. Cannot send anything to the agent." / Collaborate "Also message the agent, answer its prompts and drive the in-app browser." (disabled + "coming soon" until it ships).
Collaborate only: "What they are here for (optional)", placeholder "e.g. reviewing the migration plan with me", helper "The agent is told this. It can shape how the agent responds to your guest."; warning box "You are inviting Marco to talk to and control an AI agent on your device. Make sure you trust them. Anything the agent can do, Marco can ask it to do."
Always: note "Sharing a thread shares the agent's whole history, including any agents it spawned."
New person only: "Link expires in" (1 hour / 24 hours / 7 days default / 30 days), helper "It works once, on one device." → build request: the server accepts a chosen lifetime for both link kinds.
Buttons Cancel / "Make link" or "Share". From the People page the dialog gains a thread-or-project picker at the top.
3. Promotion to Collaborate (panel level menu, People page, join-link person): dialog "Let Sam collaborate?", name field (with the self-given tag and helper "From now on this name goes on their messages to the agent. Change it if it is wrong."), the optional "here for" line, the same warning, no history note, buttons Cancel / Save. Saving confirms the name then promotes. Confirm-name popover: "Confirm this name" / "Sam typed it when they joined. Once you confirm it, it goes on their messages to the agent and the tag is cleared." / Cancel, Confirm. On the People page a tagged person's level control is disabled with "Confirm their name first".
4. The link: last step of the same dialog, "Link for Marco", "Send this to Marco over a channel you trust. Whoever opens it becomes Marco on this server, on that one device.", upstream's route picker + QR reused, URL + Copy, "Works once. Expires in 7 days. View on .", buttons "New device link" / Done. Loopback-only: warning "Only this machine can reach this server. Marco will not be able to open the link from another computer. Turn on network access in Settings › Connections, or share over your tailnet.", no QR, link still made. Unused links stay on the People page under the person's devices with Copy/Revoke.
5. People page (Settings › People, right after Connections, two-person icon, needs access read): sections Guests (header buttons "Join link", "Share"), Join links, Members. Guest row expands to Projects / Threads (project icon, level control, small X "Remove") with "+ Add a project or thread…", and Devices (dot, "Desktop · Linux · Chrome", "Revoke" text button, "+ New device link…"). Guest "···": Rename…, Confirm name…, New device link…, Clear GitHub picture, Remove person…. Members: plain list, "You" chip, "Reaches everything on this server · devices in Connections". Guest devices deliberately appear both here and in Connections › Authorized clients (labelled with the guest's name). Removal wording must not say "immediately" for attachments.
6. Guest's first screens: named link → upstream's pairing page, "Joining as Marco R." / "You have been invited to in on ." / info "Pairing this browser. You will land on the thread in a moment." Join link → "Join a shared thread" + the same line + "You can read it and watch the agent work; you cannot send it anything.", field "Your name", button "Join", info "This link can be opened by several people. Each one joins on one device, and a member of the server can change your name or remove you." Dead link (one state): "This link does not work" / "It may have been used, expired or revoked. Ask whoever sent it for a new one." Landing: the granted thread (list when several), never the "/" draft. No grants: empty state "Nothing is shared with you" / "Ask a member of this server to share a thread or project with you. This device stays paired, so a new share will appear here on its own."
7. Cues and leaving: no header "view only" tag; the read-only composer's placeholder reads "You can read this thread, but not send anything to it." (one small composer edit, chosen over a banner). Leave: "Leave this thread" in the panel and "Leave thread" in the thread menu in Archive's place (Archive/Delete hidden for guests); confirm "Leave ? It disappears from your list. To get it back, ask a member to share it again." Cancel / Leave. Project: "Leave ?" and says every thread in it goes too.
Set aside → #542: mobile entirely (first version is web + desktop; a mobile guest only gets the read-only composer); naming the sharer on the join page; a project join link.
Addendum (2026-10-12), after the builder's note on the link lookup. The design already names no sharer; the join page line is "You have been invited to in on ." Two states the named-person link needs, now added to the design artifact (section 7):
Several grants. "Joining as Marco R." and the line "You have been invited to 3 threads and 1 project on openclaw.", followed by a short list (project icon and title per line, the project name after a thread), capped at five with "and 2 more". After pairing the guest lands on the list, as with any several-grant case.
No grants yet (the member made the link before granting anything). "Joining as Marco R." and the line "Nothing is shared with you on openclaw yet. Once you join, a member can share a thread or project with you and it will appear on its own." Pairing goes ahead; the first screen is the "Nothing is shared with you" empty state.
Also: a guest sees a project's real icon wherever a member does (served without revealing the folder), so the project icon stays in the sidebar, the thread header, the join page list and the People page rows.
Built and merged in #582, #591, #592, #594 and #596 (the Share dialog, the People page, a project's Sharing section, the thread's People chip and panel section, the pairing and join page, the guest's landing and leaving). Not built here and tracked elsewhere: profile pictures (#533), collaborating (#533), preview watching (#540), and sharing on mobile (new issue below).
Activity
Jacksondr5 commentedon Oct 11, 2026
From #536: a guest link, and so every session made from it, must carry the subject
j5:guest(GUEST_SESSION_SUBJECT), and the session's row inj5_a2a_person_sessionmust be written when the session is created. The subject is the second mark that makes the binding fail closed: a guest session with no row reaches nothing, where an unmarked session with no row is a member's own device.Jacksondr5 commentedon Oct 12, 2026
From the security review of #561 (2026-10-12). Requirements for the link:
access:write. MCP OAuth consent (auth/McpOAuth.ts) signs in throughauthenticateBrowserSession, which the guest gate does not wrap, and approves any session that holdsaccess:write. A guest with it could mint anmcp-clientsession with the full toolkit. Add a test that fails if a guest link is made with it, and consider refusing the consent route to aj5:guestsubject outright./oauth/tokento get a bearer session. A session made that way has a new id; unless it is bound to the person it is a guest with no grants (it fails closed, but the guest's second client would see nothing).GET /api/auth/sessionis ungated and reports a guest its real permissions. That is what tells the client it holds 'operate'; the client piece needs to account for it.Jacksondr5 commentedon Oct 12, 2026
To verify once a grant can be changed on a running server: over a real socket, a guest's open
subscribeThreadstops delivering when its grant is removed. #561 proves this with a stand-in handler only.Jacksondr5 commentedon Oct 12, 2026
Dependency: the Share action must not offer a project grant until #578 lands, or a project guest is refused the artifacts AC9 promises.
Jacksondr5 commentedon Oct 13, 2026
For the UI layer, from the panel on #581, #582 and #585 (2026-10-12):
apps/web/src/j5/artifacts/ArtifactsPage.tsxrefreshes on a change and does not handle the subscription ending. J5's own file: clear the page when the subscription is refused.packages/contracts/src/j5/sharing.ts:listPeople,createGuest,putGrant,removeGrant,removePerson,revokeDevice,createLink,revokeLink(being added),listOwnGrants,leaveGrant, and for the open linkcreateOpenLink,revokeOpenLink,confirmGuestName,listOpenLinks, withPOST /api/j5/sharing/joinfor the join page.Jacksondr5 commentedon Oct 13, 2026
UI design decisions (Jackson with the designer agent, 2026-10-12)
Full write-up with verbatim wording: J5 artifact
artifacts/share-links-ui-design.md; mockupsartifacts/share-links-ui-mockups.html(project "J5 Code"). The build should take wording from the artifact; this is the summary.1. Where Share lives
2. Share dialog ("Share thread" / "Share project", no description)
3. Promotion to Collaborate (panel level menu, People page, join-link person): dialog "Let Sam collaborate?", name field (with the self-given tag and helper "From now on this name goes on their messages to the agent. Change it if it is wrong."), the optional "here for" line, the same warning, no history note, buttons Cancel / Save. Saving confirms the name then promotes. Confirm-name popover: "Confirm this name" / "Sam typed it when they joined. Once you confirm it, it goes on their messages to the agent and the tag is cleared." / Cancel, Confirm. On the People page a tagged person's level control is disabled with "Confirm their name first".
4. The link: last step of the same dialog, "Link for Marco", "Send this to Marco over a channel you trust. Whoever opens it becomes Marco on this server, on that one device.", upstream's route picker + QR reused, URL + Copy, "Works once. Expires in 7 days. View on .", buttons "New device link" / Done. Loopback-only: warning "Only this machine can reach this server. Marco will not be able to open the link from another computer. Turn on network access in Settings › Connections, or share over your tailnet.", no QR, link still made. Unused links stay on the People page under the person's devices with Copy/Revoke.
5. People page (Settings › People, right after Connections, two-person icon, needs access read): sections Guests (header buttons "Join link", "Share"), Join links, Members. Guest row expands to Projects / Threads (project icon, level control, small X "Remove") with "+ Add a project or thread…", and Devices (dot, "Desktop · Linux · Chrome", "Revoke" text button, "+ New device link…"). Guest "···": Rename…, Confirm name…, New device link…, Clear GitHub picture, Remove person…. Members: plain list, "You" chip, "Reaches everything on this server · devices in Connections". Guest devices deliberately appear both here and in Connections › Authorized clients (labelled with the guest's name). Removal wording must not say "immediately" for attachments.
6. Guest's first screens: named link → upstream's pairing page, "Joining as Marco R." / "You have been invited to in on ." / info "Pairing this browser. You will land on the thread in a moment." Join link → "Join a shared thread" + the same line + "You can read it and watch the agent work; you cannot send it anything.", field "Your name", button "Join", info "This link can be opened by several people. Each one joins on one device, and a member of the server can change your name or remove you." Dead link (one state): "This link does not work" / "It may have been used, expired or revoked. Ask whoever sent it for a new one." Landing: the granted thread (list when several), never the "/" draft. No grants: empty state "Nothing is shared with you" / "Ask a member of this server to share a thread or project with you. This device stays paired, so a new share will appear here on its own."
7. Cues and leaving: no header "view only" tag; the read-only composer's placeholder reads "You can read this thread, but not send anything to it." (one small composer edit, chosen over a banner). Leave: "Leave this thread" in the panel and "Leave thread" in the thread menu in Archive's place (Archive/Delete hidden for guests); confirm "Leave ? It disappears from your list. To get it back, ask a member to share it again." Cancel / Leave. Project: "Leave ?" and says every thread in it goes too.
Set aside → #542: mobile entirely (first version is web + desktop; a mobile guest only gets the read-only composer); naming the sharer on the join page; a project join link.
Jacksondr5 commentedon Oct 13, 2026
Addendum (2026-10-12), after the builder's note on the link lookup. The design already names no sharer; the join page line is "You have been invited to in on ." Two states the named-person link needs, now added to the design artifact (section 7):
Also: a guest sees a project's real icon wherever a member does (served without revealing the folder), so the project icon stays in the sidebar, the thread header, the join page list and the People page rows.
6 remaining items
Jacksondr5 commentedon Oct 13, 2026
Built and merged in #582, #591, #592, #594 and #596 (the Share dialog, the People page, a project's Sharing section, the thread's People chip and panel section, the pairing and join page, the guest's landing and leaving). Not built here and tracked elsewhere: profile pictures (#533), collaborating (#533), preview watching (#540), and sharing on mobile (new issue below).