Skip to content

JS-9795: Invitation flow rework#2291

Open
requilence wants to merge 7 commits into
developfrom
js-9795-invite-flow
Open

JS-9795: Invitation flow rework#2291
requilence wants to merge 7 commits into
developfrom
js-9795-invite-flow

Conversation

@requilence

Copy link
Copy Markdown
Contributor

Reworks the space invitation flow around the GO-7222 middleware changes (docs/InviteSharing.md).

Highlights

  • Request to join is the default. Every invite is generated as request-to-join; an anyone-can-join link defaults to Viewer.
  • Redesigned Members page. Header with search and Add members; an "Add members via link" toggle with Copy link / QR code / Manage link; and All / Requests / Editors / Viewers tabs over the member list.
  • New Manage invite link popup. Toggle auto-approval, pick the permission an anyone-can-join link grants, share the invite with the whole space (with confirmation), and reset the link.
  • New Add Members popup. Pick people you already share a space with and invite them directly at a chosen role.
  • Owner-only invite management. Creating and revoking the link is limited to the space owner; admins keep Add members and request approval.

Notes

  • The current invite is now cached in S.Common (inviteGet/inviteSet/inviteClear) so the page, popup, header, and menu read one source.
  • Adds U.Space predicates (canManageInvite, hasVisibleInvite, isInviteUnsafe) with unit coverage.
  • Depends on a middleware release carrying GO-7222 — middleware.version must be bumped before merge.

Design spec: docs/superpowers/specs/2026-07-14-invite-flow-design.md · Linear JS-9795

requilence and others added 7 commits July 14, 2026 20:43
…design

Integrates GO-7222 (anytype-heart docs/InviteSharing.md). The invite is now
kept in the owner's account instead of the workspace object, so members no
longer hold a link they can hand to anyone.

- SpaceInviteGenerate takes shareWithinSpace; InviteGetCurrent returns
  heldByOwner. A member gets a success response with an empty cid, so every
  Copy/QR affordance now goes through U.Space.hasVisibleInvite().
- Request-to-join is the default at all four generate call sites; an
  anyone-can-join invite defaults to Reader.
- Invite create/revoke is owner-only. Admins keep Add members and request
  approval, but never see or change the link.
- Members page redesign: link toggle, Copy/QR/Manage, All/Requests/Editors/
  Viewers tabs, search, Add members.
- New popups: Manage invite link (auto-approval, permissions, share-within-
  space with confirm, reset) and Add Members.
- Owners of a legacy shared anyone-can-join Writer invite are warned that any
  viewer can use it to become an editor, and offered a reset.

Verified end-to-end in web mode against a middleware built from
go-7222-invite-cleanup.
…rrect share-confirm copy

- When auto-approval is on and the role is Editor, add a note that any existing
  Viewer can use the link to upgrade themselves to Editor.
- The share confirm said "This cannot be undone" — sharing this exact link is
  irreversible, but the link can be reset to make a new private one, so say that.
Say the auto-approval link stays open until the owner resets it, and name
the invitation link explicitly in both notes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant