Skip to content

The group strip mints a new invite link every time instead of showing the room's live one #1019

Closed

Description

@Birfy

Owner: Dev4

The dock strip added for #998 (social-group-strip, plugins/social/client.js) mints an invite when Invite by link is clicked, but it never looks at the links that room already has. The Members card does the opposite: it reads room-invite first and shows the live links, and only the button mints a new one (#876/#878).

So leaving the group and coming back with nothing said yet (the strip is back, blank is still true) and clicking Invite by link again mints another ticket. Nothing breaks — #878 says a room may hold several live invites — but the list grows on every click, and a person who came back to copy the link they already sent has no way to see that link again: the strip shows only the one minted in this mount.

Reproduce: create a group, click Invite by link in the strip, copy the URL; enter another chat and come back to the group before sending anything; the strip is there again, and Invite by link mints a second URL instead of showing the first. GET room-invite still lists both.

Options, both one-place changes in GroupStrip:

  1. on mount, read room-invite (the endpoint the Members card uses) and show the live link when there is one, minting only when there is none — the same shape as the card;
  2. keep minting per click but render the links the room already has under the button, so the first one stays reachable.

Found while reviewing PR #1017 (non-blocking there: the accumulation is bounded by how often someone opens a brand-new group).

Activity

  1. added
    enhancementNew feature or request
    area:socialFriends, invites, grants, Bot Social
    area:uiWeb/desktop UI and copy
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 24, 2026
  2. Birfy commented on Oct 24, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Triage

    Triage at main db56b817: confirmed on the code, not only in the report.

    • plugins/social/client.js:2150 GroupStrip keeps the link in component state (:2152 useState(null)) and only mints — :2160 → host('room-invite-mint', ...). No room-invite read on mount, so returning to a still-blank group starts from null again and the button mints a second ticket.
    • The Members card does it the other way: :1144 reads host('room-invite'), :1150 re-reads on a poll, :1171/:1177 revoke by ticket. Two shapes for the same room, which is the inconsistency to remove.

    Expected = option 1, the card's shape: on mount read room-invite, show the live link when the room already has one, and mint only when it has none (and when the button is clicked on a room that has none). Do not render a growing list of links — that keeps the "which one did I send?" problem. Option 2 is acceptable only if the list does not grow per click.

    Acceptance:

    1. Create a group → strip → Invite by link → copy; leave the chat and come back while still blank; the strip shows the same URL and GET room-invite count does not grow.
    2. A room with no live link still mints on click (the fresh path must not regress).
    3. An expired/withdrawn link is not shown as live; minting then produces a new one.
    4. Knife: remove the mount read → case 1 goes red; keep the read but never mint → case 2 goes red.
      No changelog.d/ fragment? It is a user-visible behaviour change (the link stays reachable) — add one fixed fragment. agent-ready, Owner: Dev4.
  3. added
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 24, 2026
  4. removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:socialFriends, invites, grants, Bot Socialarea:uiWeb/desktop UI and copyenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions