Skip to content

feat(moderation): list and revoke invite links - #3910

Merged
wpfleger96 merged 10 commits into
mainfrom
hayt/invite-list-revoke
Nov 20, 2026
Merged

wpfleger96 merged 10 commits into
mainfrom
hayt/invite-list-revoke

Conversation

@wpfleger96

@wpfleger96 wpfleger96 commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Adds invite-link management to community Membership settings.

  • Links tab for owners and admins: each invite with its status, uses and expiry, a Revoke button on every row (with confirmation), paging, and a Refresh that keeps pages already loaded. A Revoke a link field takes a pasted invite link for this community and revokes it by its code. People who already joined stay in.
  • Revoke results come from the relay's receipt, so a revoked row shows Revoked even when a later list read fails. A failed revoke keeps the confirmation open with a readable error and Retry; after a timeout, Refresh shows what the relay holds. A revoke still in flight, success or failure, still shows when the admin goes Back to Members and Forward again. After a row is revoked, focus moves to the list.
  • Links without an expiry read "Never expires" in the list.
  • Both hosts (browser broker and native relay_http) support a signed GET /api/invites, which accepts only the relay's opaque before cursor, and POST /api/invites/revoke. Request shapes are normalized in admin-protocol.ts.

Minting is unchanged from main.

Stack: #3910 → #4120

Related: buzz#9680

@wpfleger96

Copy link
Copy Markdown
Member Author

🤖 Gurney: cropped browser evidence at 78472415b976f3ef0f31d8c4732fb1e569b4066d, against a fresh relay built from block/buzz#9690 at 05dc7ae6d3a353ee21528732c6a023e20e4ab3dc.

Chromium and WebKit owner journeys, plus a Chromium admin journey, passed finite/permanent mint, list metadata, confirmation cancellation, row revocation and pasted-link revocation. Fresh claimants joined before revocation and received 403 invite_invalid afterward. A plain member had no Membership/Links entry; direct broker list, mint and revoke attempts received 403. The expiry selector submits mutually exclusive request shapes, so no conflicting-expiry request is reachable through these controls; a separately signed conflicting request received the relay's expected 400.

The production browser broker and real relay were used with disposable identities. The sandbox maps secure relay origins to loopback HTTP/WebSocket at the injected transport boundary; this does not establish TLS, native signing/IPC, Keychain, or native-webview acceptance. Native Tauri app acceptance was not run and remains outstanding. These are browser screenshots, not native screenshots or shipping clearance.

All links shown below were revoked before publication. No production source was changed.

Expiry menu includes Never expires

Light Dark
Light expiry-menu Dark expiry-menu

Permanent link selected and minted

Light Dark
Light never-expires-selected Dark never-expires-selected

Finite and permanent links with creator, creation time and usage

Light Dark
Light active-links Dark active-links

Row confirmation names the specific link

Light Dark
Light revoke-confirmation Dark revoke-confirmation

Wrong-community paste is refused and associated with its field

Light Dark
Light wrong-community Dark wrong-community

Revoked status and successful completion

Light Dark
Light revoked-links Dark revoked-links

@wpfleger96 wpfleger96 changed the title feat(moderation): list and revoke invite links, mint never-expiring links feat(moderation): list and revoke invite links Nov 20, 2026
@wpfleger96

wpfleger96 commented Nov 20, 2026 •

Copy link
Copy Markdown
Member Author

🤖 Gurney — refreshed light/dark screenshots of #3910 at 2ea471ee723b33a3568189b29cca9813500ab817, from my own worktree pinned to that commit. These replace the earlier captures in this comment.

The mounted Membership → Links UI and production browser broker used a real throwaway local relay at a79dff50561bfbfacf02225e46ad30e6991b1123, with separate Postgres, Redis and S3/MinIO. For the permanent-link fixture, only the disposable database received ALTER TABLE relay_invites ALTER COLUMN expires_at DROP NOT NULL, followed by a directly inserted NULL-expiry row. No #4120 UI or permanent-link minting was used.

Observed in headless Chromium:

  • A real 404 invite_not_found keeps the confirmation open with “No invite link in this community matches that link.” and Retry. Retry sends another real request; Cancel restores focus to the initiating pasted-link Revoke button.
  • The relay returns expires_at: null, and the list renders Never expires alongside a finite-expiry control.
  • A real successful row revoke marks the row Revoked, removes its Revoke action, shows the completion notice and moves focus to the list. An explicit Refresh preserves that state.
  • No page exceptions. The only browser resource-console errors are the two intentionally refused 404 requests in the final capture journey.

Scope: targeted rendered/browser evidence, not native Tauri/IPC/Keychain acceptance, TLS verification, full race/pagination review, human acceptance or PR approval. No production source was changed.

Refused revoke: readable message and Retry stay inside the confirmation

Light Dark
Light refused-revoke-retry Dark refused-revoke-retry

Directly seeded NULL expiry: “Never expires” beside a finite control

Light Dark
Light never-expires Dark never-expires

Successful row revoke: Revoked status, no row action, completion notice

Light Dark
Light successful-row-revoke Dark successful-row-revoke

@wpfleger96
wpfleger96 marked this pull request as ready for review November 20, 2026 20:48
@wpfleger96
wpfleger96 requested a review from a team as a code owner November 20, 2026 20:48

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Star Lord — Changes needed at 82292dd. The inline comments cover revoke recovery and compatibility with the relay’s nullable expiry contract. The reported Chromium/WebKit run covers this head. Native app acceptance is outstanding.

Product scope — #348 established Membership as the owner of community invite controls. Please confirm that the new Links tab belongs in the default-enabled Membership plugin before shipping it.

All four commits lack the Signed-off-by trailer required by AGENTS.md. The hosted DCO check passed.

Comment thread src/bundled/moderation/InviteLinks.tsx Resolved
Comment thread src/bundled/moderation/InviteLinks.tsx Resolved
Comment thread src/bundled/moderation/InviteLinks.tsx Resolved

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Two additional UI findings: readable revoke errors and stable focus restoration. Pagination reset is already covered by discussion_r4647650404.

Comment thread src/bundled/moderation/InviteLinks.tsx Resolved
Comment thread src/bundled/moderation/InviteLinks.tsx Resolved

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Add UI regression coverage for pagination and failed revoke recovery.

@wpfleger96
wpfleger96 force-pushed the hayt/invite-list-revoke branch from 82292dd to 2ea471e Compare November 20, 2026 21:13

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Three remaining findings concern failed revoke recovery and retained-tab regression coverage.

Comment thread src/bundled/moderation/InviteLinks.tsx Resolved
Comment thread src/bundled/moderation/InviteLinks.tsx Resolved

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Approved after re-reviewing the latest fixes at 0e8f671. No actionable findings remain.

The previously reported issues are addressed:

  • Failed revokes completed while Links is hidden retain their error and restore the confirmation on return; keyboard Retry succeeds.
  • The confirmation action preserves focus while loading and after refusal, while repeated activation does not submit duplicate requests.
  • Lifecycle tests now detect regressions in panel hiding, unsent-confirmation dismissal, failure retention, and loading-focus behavior.

Chromium and WebKit checks also confirmed pagination across same-second boundaries, refresh failure/recovery, stale-read receipt handling, and navigation behavior. The targeted component/protocol tests passed (32/32).

Browser checks used modeled invite routes; native-host behavior, a live relay, and runtime demotion were not exercised. Required CI must pass before merge.

wpfleger96 and others added 10 commits November 20, 2026 17:02
…inks

Adds a Links tab to community Membership settings for owners and admins:
the community's invite links with status, uses and expiry, a Revoke
button per row, and a field that revokes a pasted link by its code.
The Invite tab gains a Never expires option that mints with
never_expires: true, and a never-expiring link reads Never expires.

Both hosts gain the relay's new routes: GET /api/invites (signed, with
only the relay's opaque before cursor) and POST /api/invites/revoke,
through shared request normalizers in admin-protocol.ts.

Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
- Broker and native tests drive list and revoke through the production
  dispatch: method, full URL with before, NIP-98 u/method binding, no
  payload on the GET, payload binding on revoke, rejected paths/queries,
  and a code-bearing refusal that is not echoed.
- Native relay_http's signing decision is a named fn the test exercises.
- The list cursor uses the canonical UUID pattern revoke ids use.
- Rows and the revoke confirmation show a short id and creation time.
- The paste field's error is tied to the input (aria-describedby/invalid).

Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
…ord broker method

Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
Mint UI and request validation match main again; the Links list shows
only finite expiries.

Signed-off-by: Will Pfleger <wpfleger@block.xyz>
…anges

Apply the revoke receipt to the loaded row so a failed follow-up read
cannot leave it Active, keep a Refresh/Retry independent of the write
that preserves older pages, keep the confirmation open with its error
and a retry when revoke fails, keep the Links panel mounted after its
first visit so an in-flight revoke lands across Back/Forward, and show
listed links without an expiry as never expiring.

Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
Map the relay's revoke refusal codes to plain messages in the
confirmation, move focus to the invite list once a revoked row loses its
Revoke button, and assert the paging cursor.

Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
Refresh walks the relay's cursors over as many pages as are shown and
replaces the list only when every read succeeds, instead of merging page
one into older pages by whole-second timestamps. Rows are deduplicated by
id and confirmed revoke receipts still win over stale reads.

Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
Leaving the Links tab now drops only a confirmation that was never sent,
so a revoke that fails while Members is shown still shows its error and
Retry on return. Tests cover the hidden panel, a dismissed unsent
confirmation, and a failure that arrives while hidden.

Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
The confirm action is no longer disabled while loading; loading alone
blocks a second submit and keeps it focusable, so Enter can retry after
a refusal.

Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
@wpfleger96
wpfleger96 force-pushed the hayt/invite-list-revoke branch from 0e8f671 to bb43b2f Compare November 20, 2026 22:05
@wpfleger96
wpfleger96 merged commit 27a83bb into main Nov 20, 2026
68 checks passed
@wpfleger96
wpfleger96 deleted the hayt/invite-list-revoke branch November 20, 2026 22:18
joahg added a commit to joahg/buzz-app that referenced this pull request Nov 20, 2026
* origin/main: (55 commits)
  feat(moderation): list and revoke invite links (block#3910)
  Truncate long relayed channel names (block#4130)
  Show a plugin icon on install links (block#4115)
  fix(relay): show saved avatars in the restored session before connecting (block#4085)
  Restore saved channels only after a complete channel list (block#4129)
  Keep the newest channels when restoring saved heads (block#4119)
  fix(agents): review fixes for Goose and Pi turns, Goose usage, Solo worktrees, and Trust (block#3903)
  fix(agents): tell Claude Code, Goose and Pi sessions what they are (block#3901)
  fix(settings): show default base instruction text (block#3887)
  feat(plugins): give Pi turns the notes plugins leave, and say which harnesses do (block#3834)
  feat(plugins): give Goose and Pi conversations their own folder (block#3833)
  feat(plugins): let a plugin replace base prompt sections for Goose and Pi agents (block#3831)
  feat(plugins): let a plugin replace base prompt sections in a conversation it manages (block#3816)
  Scope agent activity updates by channel (block#4033)
  Reduce work on composer keystrokes (block#4036)
  Only dot "also sent to channel" replies in your own threads (block#3938)
  feat(statuses): read bylines' statuses with their profiles (block#4116)
  feat(statuses): save statuses with profiles so bylines show them at once (block#4114)
  feat(settings): clear cached data and show its size from Local settings (block#4086)
  feat(media): save relay images on disk across launches (block#4081)
  ...
wpfleger96 added a commit that referenced this pull request Nov 20, 2026
* origin/main:
  feat(search): send people, mention and membership facts to the rerank (#3989)
  feat(usage): group cost by the timer or watch that started it (#3522)
  fix(messages): relayed row follow-ups: avatar padding, screen-reader dates, DM "from" (#4100)
  feat(design-system): add a popout accordion variant (#4125)
  Expose invocation subthreads to plugins (#3730)
  feat(moderation): list and revoke invite links (#3910)
  Truncate long relayed channel names (#4130)
  Show a plugin icon on install links (#4115)
  fix(relay): show saved avatars in the restored session before connecting (#4085)

# Conflicts:
#	src/features/agent-harness/acp/agent-sessions.ts
morgmart added a commit that referenced this pull request Nov 21, 2026
* origin/main: (39 commits)
  docs(agents): build new features as directory plugins first (#4022)
  Reduce frozen tag scans on relay reads (#4162)
  feat(agents): let a plugin harness show its sessions in the host transcript viewer (#4153)
  Expose confirmed owner send evidence (#4133)
  Keep the sidebar steady when a channel disappears (#4000)
  feat(unread): list a channel's unread messages from evidence (#3996)
  fix(panels): keep the board still while a profile panel opens (#3130)
  Keep the sidebar stable during refresh (#3997)
  Let a region channel group render under its Team sidebar row (#4099)
  Sign agent invocation intent in thread replies (#3876)
  feat(search): send people, mention and membership facts to the rerank (#3989)
  feat(usage): group cost by the timer or watch that started it (#3522)
  fix(messages): relayed row follow-ups: avatar padding, screen-reader dates, DM "from" (#4100)
  feat(design-system): add a popout accordion variant (#4125)
  Expose invocation subthreads to plugins (#3730)
  feat(moderation): list and revoke invite links (#3910)
  Truncate long relayed channel names (#4130)
  Show a plugin icon on install links (#4115)
  fix(relay): show saved avatars in the restored session before connecting (#4085)
  Restore saved channels only after a complete channel list (#4129)
  ...

Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>

# Conflicts:
#	docs/unread.md
#	src/bundled/channels/ChannelSidebarItem.tsx
#	src/bundled/channels/ChannelSidebarRow.tsx
#	src/bundled/channels/SidebarUnread.tsx
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.

3 participants