Skip to content

feat(web): a member shares a thread from the app, with a link for a new person - #592

Merged
Jacksondr5 merged 15 commits into
j5code/share-3d-project-faviconfrom
j5code/share-ui-1-share-dialog
Oct 13, 2026
Merged

Jacksondr5 merged 15 commits into
j5code/share-3d-project-faviconfrom
j5code/share-ui-1-share-dialog

Conversation

@Jacksondr5

@Jacksondr5 Jacksondr5 commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Problem

A member can bring a guest into a thread only through the server's requests: nothing in the app makes a share link (#535) or a join link (#541). This is the first of three UI layers; the design is Jackson's of 2026-10-12 (artifacts/share-links-ui-design.md, summarised on #535 and #541).

What changed

  • Share dialog (apps/web/src/j5/sharing/ShareDialog.tsx): a name, View or Collaborate, what sharing gives away, and how long the link lasts. A new person gets a guest, a grant and a link, shown as the dialog's last step. Typing part of the name of someone already on the server offers them; choosing them gives the access and makes no link (AC20).
  • The link step (ShareLinkPanel.tsx): the route the link travels by, the address with Copy, and a QR code for a route another device can reach. When only this machine can reach the server it says so and still makes the link; nothing is opened (AC22).
  • Join link dialog (JoinLinkDialog.tsx): make a view-only link for a thread; while one is in force, see it, who joined through it, and revoke it after a confirmation.
  • The owner's name (OwnerNameDialog.tsx): a member who manages access is asked once at startup, "What should people and agents on this server call you?", when the server has no name for its owner; "Not now" puts it off until the client is next opened. Sharing asks the same question as its first step while it is unanswered, and the server refuses to bring anyone in until it is set. With several servers connected the dialog names the server. It reads the answer every connection already asks for, so it costs no request and holds nothing up.
  • Ways in: "Share thread…" after "Copy" in the thread menu (header and sidebar row), and "Share thread", "Share project" and "Make a join link" in the command palette. A connection without Manage access sees them disabled, the palette entries through the command's permissionAtom, the menu item by reading the connection's "Manage access" permission when the menu is built (upstream builds that menu outside a render); the server stays the authority.

Built differently from the design, each for a stated reason:

Design Built Why
Lifetime select: 1 hour, 24 hours, 7 days, 30 days As designed: the choice is sent, and the default is 7 days The server takes a lifetime for both kinds of link.
View: "Read the conversation, the diffs and the in-app browser. Cannot send anything to the agent." "Read the conversation and the changes each turn made. Cannot send anything to the agent." Wording changed for accuracy (build lead, 2026-10-13). A View guest reads each turn's changes, seen live, but is not served the checkout's local diffs, the host's files, or the in-app browser (#540). The browser can return to the sentence when it opens to guests. The Collaborate line still says "drive the in-app browser"; it is not offered yet.
Collaborate Listed, disabled, "coming soon" As designed: nothing lets a guest send yet. The purpose field and the warning are built and appear with it.
Copy on a link at any later time Only in the browser that made the link, until the page is closed The server keeps a hash of a link's secret, not the secret. This is what upstream's Connections page does. Elsewhere the join-link dialog offers "Make a new link".
A thread picker in the join-link dialog The thread shown as text The dialog is only opened from a thread in this layer; the picker comes with the People page.
Divided rows in the View / Collaborate list One box, no divider Upstream's radio primitive owns its spacing; a divider would need a new variant in components/ui/radio-group.tsx, and it is cosmetic. Left out on the build lead's ruling.
An open dialog notices someone joining It reads people and links each time it opens The server has no people-changed signal yet.

The join link's address is upstream's pairing address with the link's token where the credential goes; the page that opens it is layer 3. Every share link's address carries J5's own mark in the fragment (#token=…&j5share=1), which upstream's pairing code ignores, so that page can tell a share link that no longer works from a pairing token. Known and fixed in layer 3's branch: on a desktop whose route allows the hosted app, this layer offers the hosted-app form of the address for a join link too, which the hosted app cannot open.

UI changes

Before After
Thread menu (header): "Share thread…" after Copy Thread menu (header): "Share thread…" after Copy, before Thread menu (header): "Share thread…" after Copy, after
Command palette, searching "share" Command palette, searching "share", before Command palette, searching "share", after
Share dialog, nothing typed yet new Share dialog, nothing typed yet, after
Typing a name that matches someone already a guest new Typing a name that matches someone already a guest, after
Last step for a new person, on a server only this machine can reach (token masked) new Last step for a new person, on a server only this machine can reach (token masked), after
Join link: making one new Join link: making one, after
Join link: active, in the browser that made it (token masked) new Join link: active, in the browser that made it (token masked), after
The same, dark new The same, dark, after
Join link: active, opened in a browser that did not make it new Join link: active, opened in a browser that did not make it, after
At startup, on a server whose owner has no name new At startup, on a server whose owner has no name, after
The same question as the first step of sharing (Cancel in place of Not now) new The same question as the first step of sharing (Cancel in place of Not now), after
A name that is someone else's on this server new A name that is someone else's on this server, after
A name with a character that is not allowed (a zero-width space) new A name with a character that is not allowed (a zero-width space), after

Same seeded test home, 1280x800, light unless marked. Not captured: the multi-route picker and QR code (they need the desktop app or a server reached over a network address, neither available on the test host); a server's refusal shown in the dialog (I found no input the server refuses that the fields let through); the disabled entries for a connection without Manage access.

After review

Before the Share or join-link dialog asks for the owner's name, and when the name is shown to be changed, the list of people is read: what a connection was told at connect time can be stale, and a name set on another client is used, not written over. Seen live with two member clients: one set the name, and the other's Share dialog went straight to the share form.

Live testing

Report: test-reports/j5code-share-ui-1-share-dialog.md (a peer agent, isolated j5-live-test server, no flags, commit 321a9e5e8e: this PR's web code before it was rebased onto #591, which is server-only, and before the two commits listed under "Since the test").

Verdict: the sharing flows pass; two findings against the design, one fixed and one a recorded scope choice.

Ran live, member in one browser profile and guests in others:

  • "Share thread…" from the header menu, the sidebar row menu and the palette, each on the right thread; every string in the Share dialog and the link step checked against the design.
  • A new person paired from the copied link and saw only the shared thread. A second thread shared with them by picking their name appeared without pairing again, with no link step. Sharing the project showed them its threads.
  • Cancel, Escape and X make nothing. A 90-character name is cut to 80; spaces alone keep the button disabled; a double click on "Make link" made one person.
  • Join link: made, joined through the join route, listed with "name they gave", revoked with a confirmation; a later join was refused (404) and the person who joined kept access.
  • A connection without Manage access: the menu item and all three palette entries are disabled and make nothing.
  • The server stopped while the dialog was open: "That name was refused. openclaw is not connected." inline, and the button recovers.
  • Light and dark at 400px wide: nothing overflows.
  • One real turn on Claude Haiku in a new thread, then shared: the guest's browser showed the next reply arrive.
  • restart at rest: the grant, the guest's access and the active join link were still there.

Findings:

  1. The Join link dialog shows its thread as text where the design has a picker. Scope choice, in the table above: this layer only opens the dialog from a thread; the picker is in feat(web): Settings › People lists guests, their access and devices, and join links #594, where the People page opens it without one.
  2. After a reload the dialog said the link "was made on another device". Fixed in b03dfbb077: it now says an address is shown only on the page that made it. The screenshot of that state above predates the rewording.

Since the test, seen in a browser by the builder and not re-run by the peer: the menu icon; finding 2's rewording; the chosen link lifetime (a 1-hour link reads "Expires in 1 hour"); the mark on a share link's address; and the owner's-name dialog (at startup, "Not now", as the first step of sharing and then continuing into the Share dialog, a name already in use, a name with a zero-width space).

Not exercised live:

  • The desktop app's route picker and QR code. By hand: in an isolated desktop install, share a thread, check "Reach this server via" lists the routes, switch routes and check the address changes, scan the QR code from a second device, and paste each Copy result to check it matches the address shown.
  • Remote, relay and tunnel connections; mobile; a packaged build.
  • What Copy puts on the clipboard was not read back.
  • A member's browser opening a guest's link (unchanged server behaviour, not retested).
  • The owner's-name dialog with several servers connected, and for a connection without Manage access (by test: it is never asked).

Upstream impact

FORK.md case 71; register D33 gains a consequence line. Approved by Jackson on 2026-10-12, each an import and one or two lines:

File Edit
apps/web/src/hooks/useThreadActionMenu.ts 1 import, 2 calls: the built list passes through withSharingMenuItems, and runSharingMenuAction takes J5's id back out before upstream's switch
apps/web/src/hooks/useThreadActionMenu.test.ts 2 cases at the end
apps/web/src/components/Sidebar.tsx 1 import, the builder wrapped where the row's menu is built, 1 call after it closes
apps/web/src/components/CommandPalette.tsx 1 import, 1 hook call, 1 append
apps/web/src/routes/__root.tsx 1 import, 1 mount beside upstream's own dialog hosts
apps/web/src/contextMenuFallback.ts 1 entry, users, in the menu's icon table, so the item lines up with its neighbours

The link step copies four small helpers that are private to upstream's ConnectionsSettings.tsx into j5/sharing/shareLink.logic.ts rather than exporting them; the file and FORK.md say which, for the next advance.

Checklist

  • One concern: the description has no "also"
  • Tests cover the changed behavior (backend changes ship with focused tests)
  • UI changes: before/after screenshots above, and a video for motion or interaction (no motion in this change)
  • Live testing: the section above says what ran live and what did not
  • Upstream-owned files: each one is recorded in FORK.md (case text and file-table row) in this PR
  • Upstream product: any change to what upstream's product does has a human decision linked above and a register entry in docs/j5/product/upstream.md
  • Surfaces: entry points (thread header menu, sidebar row menu, palette; Settings comes with layer 2), clients (web and desktop; mobile set aside on Sharing v2: what was set aside #542), providers and contracts (none touched), reverse states (Cancel, Revoke link; removing a person and cancelling an unused link come with the People page in layer 2), connection modes (see Live testing)
  • Docs: definitions under docs/j5/product/ and user docs rewritten where this changes them — no user doc yet; it is written with layer 3, when a guest can use what this makes

Claude Opus 5.5, Claude Code harness in J5 Code.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Oct 13, 2026 7:24am UTC

Request Review

@Jacksondr5
Jacksondr5 added this pull request to stack #583 October 13, 2026 03:44
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ effective changed lines (test files excluded in mixed PRs). labels Oct 13, 2026
Jacksondr5 added a commit that referenced this pull request Oct 13, 2026
Jacksondr5 added a commit that referenced this pull request Oct 13, 2026
@Jacksondr5
Jacksondr5 force-pushed the j5code/share-ui-1-share-dialog branch from b03dfbb to 76a508c Compare October 13, 2026 04:33
@Jacksondr5
Jacksondr5 force-pushed the j5code/share-ui-1-share-dialog branch from c451c26 to 2280047 Compare October 13, 2026 04:58
@Jacksondr5
Jacksondr5 force-pushed the j5code/share-ui-1-share-dialog branch from 2280047 to 215be97 Compare October 13, 2026 04:59
Jacksondr5 added a commit that referenced this pull request Oct 13, 2026
Jacksondr5 and others added 11 commits October 13, 2026 01:53
The palette entries are found by their titles, the lifetime select fits its
row, and FORK.md case 71 and register D33 record the thread menu's item.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ad menu

The root mounts the host that draws sharing's dialogs. FORK.md case 71 and
register D33 record the four upstream files that carry a line or two.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream's menu icon table gains one entry, so the item lines up with its
neighbours.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…her device

A reload of the page that made the link loses its address too, so the line
says where an address is shown and how to get one here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…it is sent

The Share and Join link dialogs send the lifetime picked (1 hour, 24 hours,
7 days, 30 days). A name the contract would refuse gets a plain message, and
a name that is someone else's gets one wording.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The page that opens a link can then tell a share link that no longer works
from a pairing token, without the server saying more. Upstream's pairing code
reads only the token beside it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… share

A member who manages access is asked at startup what people and agents on the
server should call them, when the server has no name for its owner. The same
question is the first step of sharing while it is unanswered. Not now puts it
off until the client is next opened.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The store is replaced on each change, so a reader never keeps an old answer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d today

A guest reads a turn's changes in the conversation, and is not served the
right panel's diffs or the in-app browser, which the design's line promised.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…sks for one

Review fixes for the Share layer. What a connection was told of the owner's
name is as old as the connection, so before the Share or join-link dialog asks
for a name, and when the name is shown to be changed, the list of people is
read: a name set on another client is used, not written over. Also: the
palette no longer asks about a server that is not there, an unused helper is
gone, and FORK.md and D33 count case 71's files correctly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Jacksondr5
Jacksondr5 removed this pull request from stack #583 October 13, 2026 15:20
@Jacksondr5
Jacksondr5 added this pull request to stack #605 October 13, 2026 15:20
@Jacksondr5
Jacksondr5 marked this pull request as ready for review October 13, 2026 20:39
@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 25 billable files and costs up to $6.25.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 21 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 61 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 81b52d60-deb3-4a08-81e1-88928427acd5
📥 Commits

Reviewing files that changed from the base of the PR and between 0fbe8b0 and 04da366.

📒 Files selected for processing: 25
  • FORK.md
  • apps/web/src/components/CommandPalette.tsx
  • apps/web/src/components/Sidebar.tsx
  • apps/web/src/contextMenuFallback.ts
  • apps/web/src/hooks/useThreadActionMenu.test.ts
  • apps/web/src/hooks/useThreadActionMenu.ts
  • apps/web/src/j5/sharing/JoinLinkDialog.tsx
  • apps/web/src/j5/sharing/LinkLifetimeRow.tsx
  • apps/web/src/j5/sharing/OwnerNameDialog.tsx
  • apps/web/src/j5/sharing/ShareDialog.tsx
  • apps/web/src/j5/sharing/ShareLinkPanel.tsx
  • apps/web/src/j5/sharing/SharingDialogHost.tsx
  • apps/web/src/j5/sharing/ownerName.logic.test.ts
  • apps/web/src/j5/sharing/ownerName.logic.ts
  • apps/web/src/j5/sharing/ownerName.ts
  • apps/web/src/j5/sharing/shareLink.logic.test.ts
  • apps/web/src/j5/sharing/shareLink.logic.ts
  • apps/web/src/j5/sharing/sharingDialogs.ts
  • apps/web/src/j5/sharing/sharingManage.ts
  • apps/web/src/j5/sharing/sharingMenu.test.ts
  • apps/web/src/j5/sharing/sharingMenu.ts
  • apps/web/src/j5/sharing/sharingPalette.tsx
  • apps/web/src/routes/__root.tsx
  • docs/j5/product/upstream.md
  • packages/client-runtime/src/j5/sharing.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@Jacksondr5
Jacksondr5 merged commit 9400625 into j5/main Oct 13, 2026
42 checks passed
@Jacksondr5
Jacksondr5 deleted the j5code/share-ui-1-share-dialog branch October 13, 2026 20:40
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026

This branch was successfully deployed

1 active deployment
Preview — 04da366d Deployed Oct 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ effective changed lines (test files excluded in mixed PRs). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant