0e7e13f0 - Mark replies from visitors without an account and render them as plain text - #275
Conversation
Accept the optional via field on forum messages, show a via Nostr badge with a hint on the board and a plain badge on the public thread and quoted cards, and render such rows as plain text without auto-links or quoted-note embeds. Adds the expanded-nostr and nostr-reply screen variants with handbook and e2e coverage.
The seeded PNGs are copies of neighbouring states so the handbook image sync can start the e2e web server; the next commit replaces them with the Linux Chromium output of the visual jobs.
…y in its test Replaces the seeded PNGs with the Linux Chromium output of the four visual jobs. The via note test now clears the shared fetchPublicMessage mock before asserting that no quoted note is fetched.
…, quotes and the hidden list The visible badge copy no longer names the protocol (docs/ui.md principle 4). The social preview title of a visitor note is prefixed, the quoted-card link announces the visitor, and the moderators' hidden list shows the badge. Fixture names and the expanded-nostr needle follow the new copy; the eight baselines are refreshed in the next commit.
… in the hidden list
…idden list, rename the variants A note with a via value now gets fully generic preview metadata, so no visitor-chosen name or text reaches a link preview. The moderators' hidden list accepts any non-empty via and still shows the badge. The two new screen variants are renamed to expanded-visitor and visitor-reply so no label on the handbook screens page names the protocol, the generated variant catalog is committed, and docs/ui.md lists the hidden-list badge.
…r-reply needle Adds the /moderate/hidden visitor variant with its handbook entry, a behavioural and a visual e2e test, the regenerated variant catalog and seeded baselines that the next commit replaces with the Linux Chromium output. The visitor-reply needle is now the reply text the permalink visual test asserts.
Replaces the seeded PNGs with the Linux Chromium output. Badge lookups use an exact text match so the note text 'Hidden visitor note' cannot satisfy them.
A count-zero assertion with an exact name would miss a stray control whose name merely contains the word, so the two negative lookups match case-insensitively again; positive lookups stay exact.
eeedf2e to
38a9ff8
Compare
|
EN: DE: DetailsThe summary sentence names the api field. The rendered badge copy is "Visitor" and never names the protocol. What the passes changed
Decided, not changed
Checks at head
|
EN:
Replies written by someone without a 21.gifts account now carry a "Visitor" badge, so nobody can pose as a member or as the team. Their text renders as plain text: no auto-links, no quoted-note embeds, also after translation. Link previews of such a reply contain no visitor-chosen text at all. The api sends such rows only for people who sent bitcoin to a post; the new
viafield is optional, so this change is safe to merge before or after the api side (21gifts/api#198).DE:
Antworten von Personen ohne 21.gifts-Konto tragen jetzt das Abzeichen „Besucher“, damit sich niemand als Mitglied oder als Team ausgeben kann. Ihr Text erscheint als reiner Text: keine automatischen Links, keine eingebetteten Beitragszitate, auch nach der Übersetzung. Link-Vorschauen einer solchen Antwort enthalten keinerlei vom Besucher gewählten Text. Die api liefert solche Zeilen nur für Personen, die Bitcoin an einen Beitrag gesendet haben; das neue Feld
viaist optional, der Merge ist also vor oder nach der api-Seite (21gifts/api#198) sicher.Details
Schema
forumMessageSchemaaccepts the optional literalvia: 'nostr'. It is strict on purpose: the public feed fails closed, and the reply fetchers skip an invalid row.hiddenMessageSchemaaccepts any non-emptyvia, so an unexpected value can neither blank the moderators' list nor drop the marker.Badge
docs/ui.md, never colour-coded.docs/ui.md.ForumBoard(note and reply author line): a button that toggles the existing per-row hint state.forum.quotedNoteVisitor).Plain text
LinkedText,ForumNoteTextandNoteTranslategain an optionalplainprop (default off).viainstead ofForumQuotedBody; a/messages/<uuid>URL in such a row stays visible text.viarender the same DOM and classes as before.Link previews
publicMessageOgMetadatareturns fully generic metadata for a note withvia: fixed title, fixed description and the default image. Nothing from the note's name, text or photo reaches a preview.Screen variants
/welcomeexpanded-visitorand/messages/[id]visitor-reply, with handbook entries, needles,shotScreencalls, eight Linux baselines, the regenerated variant catalog and behavioural e2e tests (badge, hint, URL is not a link).Unchanged on purpose
payable(the api sendsfalsefor such rows).CI
welcome overlay-external-link, is red ondevelopitself and is fixed by af507305 - Unblocks develop: refresh the external-link overlay baselines #273. This branch needs a rebase once that is merged.