Skip to content

Chat link sharing: chat wording and partial access - #1591

Closed
baxen wants to merge 10 commits into
mainfrom
mbot/chat-link-sharing-wording
Closed

baxen wants to merge 10 commits into
mainfrom
mbot/chat-link-sharing-wording

Conversation

@baxen

@baxen baxen commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #1529 for Morgan to pull in.

What changes

Wording. #1529 added "session" names for what is a chat link. They now use chat terms:

  • useSessionLinkSharing → useChatLinkSharing
  • session-link-sharing.test.tsx → chat-link-sharing.test.tsx
  • the session wording in docs/solo/sharing.md

Partial access instead of all-or-nothing. grantSoloChatAccess now tries every member and returns who it couldn't add ({ key, error }[]) instead of throwing on the first failure.

  • Composer "Share and send": the message sends, and a toast names who didn't get access ("Couldn’t give A, B and 2 more access to the chat."). If nobody new could be added to a chat, the dialog keeps its error and Retry, as before.
  • Share dialog (useSoloShare): the same rule.
  • Some failures still stop the whole share rather than skipping a person. This happens when the viewer can no longer add anyone, or when the dialog or draft was cancelled.

Grants are still one kind 9000 per member. The batch kind 9000 from the relay work goes in a follow-up once the relay supports it.

Not renamed: the buzz.shared-session.v1 topic and the agents' shared_sessions tool, because they are wire and agent contracts. Client-only names from before #1529 (separateSessionCards, SharedSessions.tsx, …) are renamed in a separate PR off main.

Includes a merge of main

The branch merges origin/main (20da7ecd0) because #1446 moved the Share dialog logic into useSoloShare.ts. Without the merge, the change would not apply to the current code. If #1529 merges main itself, this diff shrinks to the two commits on top.

Validation

  • New tests fail on the old code and pass now:
    • share.test.ts: per-person failures are returned; stops once the viewer can't add anyone.
    • chat-link-sharing.test.tsx: a partial share sends and reports who was missed.
    • ChannelMembersDialog.solo.test.tsx: a partial channel share posts and reports who was missed.
  • tsc is clean.
  • Full vitest run at 4d837c5ef: one failure, store-system-discovery.test.ts, in relay code this PR doesn't touch. It passes when run alone.
  • Not yet exercised in the app.

🤖 Generated with Claude Code

morgmart and others added 10 commits October 21, 2026 19:31
Sending a staged Solo chat card into a stream or forum channel (or one of
its threads) now asks Share and send or Send link only. Share grants the
channel's current members access to the chat before the original message
is queued; link-only leaves access unchanged.

Extracted from #1444 without Start and share here.

Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Capture the destination audience when the prompt opens so it can say
who gets access, and share exactly that audience. Add tests for DM
destinations and for a draft that changes while the prompt is open,
and give oversized channels an actionable error.

Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Capture the channel audience before asking. If every member is already
in the chat, or no one else is in the channel, send without the prompt.

Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Check the captured draft after each access grant so a change in another
window stops the next addition, not only the final send.

Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
…irst

The share prompt now counts captured members missing from the chat, and
Share grants only them. Checks that can't pass (no share rights, more than
100 people needing access) show before consent with link-only as the only
action, and Retry appears only after a real attempt. A changed draft now
stops a grant just before it is dispatched, not only after it lands.

Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Co-authored-by: mbot <3754f8729004d95654c46dbab3129e4ab9ef05cc2534e2a3fbfc155983bd637b@buzz.block.builderlab.xyz>

* origin/main:
  feat(builderlab): let local agents create, deploy, share and open Builderlab apps (#1340)
  Unify chat and channel access, tidy the Solo chat menu (#1446)

Signed-off-by: Bradley Axen <baxen@squareup.com>
Solo chats are chats, not sessions. Rename the link-sharing hook and its
tests to useChatLinkSharing / chat-link-sharing, and say "chat card" in
the sharing doc.

Co-authored-by: mbot <3754f8729004d95654c46dbab3129e4ab9ef05cc2534e2a3fbfc155983bd637b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Bradley Axen <baxen@squareup.com>
One member who can't be added no longer stops a share. grantSoloChatAccess
tries everyone and returns per-person failures instead of throwing; abort,
a changed draft and losing the right to add anyone still stop it.

When at least one grant succeeds, Share and send sends the message and the
Share dialog posts its link, and a toast names who couldn't get access.
When none succeeds, the dialog keeps its error and Retry as before.

Co-authored-by: mbot <3754f8729004d95654c46dbab3129e4ab9ef05cc2534e2a3fbfc155983bd637b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Bradley Axen <baxen@squareup.com>
Base automatically changed from morganm/share-and-send-chat-links to main October 24, 2026 17:15
@baxen baxen closed this Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants