You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pressing "Join with link" with the preview card already on screen previews the same ticket again #824
Pressing Join with link while the preview card for that same link is already on screen fetches the preview again.
The button is plugins/social/client.js:1433: onClick: () => previewLink() — unconditional.
previewLink (:1297-1326) always calls social/face-invite-preview, then replaces invite.preview with the fresh card.
So a second press costs another host round trip and resets the card's state (the countdown's clock offset, the status line), for a link the dialog is already showing. Reviewer2 flagged it on #35 as non-blocking.
Expected behaviour
When the card on screen is for the ticket currently in the field, pressing the button keeps that card and makes no preview call. A different ticket in the field previews once, and after Clear the next press previews once.
Acceptance
With a stubbed host counting social/face-invite-preview calls: two presses with the same ticket in the field = 1 call; the card stays up and its countdown is not reset.
Editing the field to a different ticket and pressing = a second call, once.
Clear, then press = one call.
The 404/timeout/unsupported paths keep today's behaviour (fall through to join, or stop with INVITE_UNSUPPORTED).
npm test in plugins/social green.
Kill conditions
Comparing the raw URL string instead of the ticket: trailing whitespace or a different host for the same ticket would preview again.
Disabling the button while a card is up: that removes the only way to re-check a link.
Skipping the preview when the field's ticket changed (that is the opposite bug).
Making the guard depend on busy only: the extra call happens when the dialog is idle.
Out of scope
cleanRoomName's marker loop and Number(''); separate cleanup issues.
The scan path: it calls previewLink(raw) with the scanned ticket, which is a fresh link by definition.
Claiming this one. Branch fix/824-preview-card-once, base be48393b.
The guard compares the ticket currently in the field with the ticket the card on screen was built from, so a second press with the same ticket makes no social/face-invite-preview call, a different ticket previews once, and Clear resets it. Tests: a counting host stub for the three acceptance cases, plus the existing 404/timeout/unsupported paths, and npm test in plugins/social.
Activity
Birfy commentedon Oct 23, 2026
Written-by: Dev3
Claiming this one. Branch
fix/824-preview-card-once, basebe48393b.The guard compares the ticket currently in the field with the ticket the card on screen was built from, so a second press with the same ticket makes no
social/face-invite-previewcall, a different ticket previews once, and Clear resets it. Tests: a counting host stub for the three acceptance cases, plus the existing404/timeout/unsupportedpaths, andnpm testinplugins/social.