From f043ad81e3ecdef89ac1c957cf367f73c25f4ade Mon Sep 17 00:00:00 2001 From: "@permadeath.com" Date: Mon, 10 Aug 2026 22:40:30 -0400 Subject: [PATCH] feat(web): link the flare notice to the board on userinput.app The dialog said reports post publicly; now the board it means is a click away, before and not only after sending. --- suramadu/web/flare.css | 7 +++++++ suramadu/web/flare.js | 23 +++++++++++++++++------ tests/shell/test-flare-ui.sh | 6 ++++++ 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/suramadu/web/flare.css b/suramadu/web/flare.css index becda6a..57607d3 100644 --- a/suramadu/web/flare.css +++ b/suramadu/web/flare.css @@ -107,6 +107,13 @@ color: var(--lb-muted); } +/* The link to the board keeps the notice's muted colour but stays a link: + underlined, and the game page's own anchor styles never reach in here. */ +:root .lb-flare-notice a { + color: inherit; + text-decoration: underline; +} + :root .lb-flare-status { margin: 0; min-height: 1em; diff --git a/suramadu/web/flare.js b/suramadu/web/flare.js index eca3acc..a596939 100644 --- a/suramadu/web/flare.js +++ b/suramadu/web/flare.js @@ -20,6 +20,11 @@ (function (window, document) { "use strict"; + // The board flares land on, as userinput.app serves it. The at:// form + // of the same space is headquarters' FLARE_SPACE; a report filed here + // shows up on this page. + var BOARD_URL = "https://userinput.app/s/did:plc:a2j2g42ai6v65qpbvb6hmubi/3msr5yrvtq22g"; + // The lexicon caps an attached image blob at 1,000,000 bytes and the // server re-encodes at the same size, so the target leaves headroom. var IMAGE_BYTE_TARGET = 900000; @@ -197,12 +202,18 @@ preview.hidden = !tick.checked || !screenshot; }); - // The one thing the player must know before pressing send. - dialog.appendChild(el( - "p", - "lb-flare-notice", - "This posts publicly to the lance.blue feedback board, from your own account." - )); + // The one thing the player must know before pressing send — with the + // board itself a click away, so "publicly" is a place they can look + // at rather than a word. + var notice = el("p", "lb-flare-notice"); + notice.appendChild(document.createTextNode("This posts publicly to the ")); + var board = el("a", null, "lance.blue feedback board"); + board.href = BOARD_URL; + board.target = "_blank"; + board.rel = "noopener"; + notice.appendChild(board); + notice.appendChild(document.createTextNode(", from your own account.")); + dialog.appendChild(notice); var status = el("p", "lb-flare-status"); dialog.appendChild(status); diff --git a/tests/shell/test-flare-ui.sh b/tests/shell/test-flare-ui.sh index 6dafefe..da35d09 100755 --- a/tests/shell/test-flare-ui.sh +++ b/tests/shell/test-flare-ui.sh @@ -90,6 +90,12 @@ check "the one fetch is the same-origin /api/flare" bash -c ' check "the dialog says a flare posts publicly" \ grep -q "posts publicly" "$JS" +# "Publicly" is a place, not just a word: the notice links the board page +# (userinput.app's /s/ form of headquarters' FLARE_SPACE) so a player can +# look before they post. +check "the notice links the board itself" \ + grep -q "userinput.app/s/" "$JS" + # The page's CSP allows img-src data: but not blob:, so an object URL in the # preview renders as a broken image. It shipped that way once. check "the preview never uses an object URL" \ -- 2.51.2