feat: renewal card, withdrawal log lines, sign-out hint check, content sweep #404

Sammanfogat
supernaut sammanfogade 6 incheckningar från feat/withdrawal-logs-card-signout-sweep in i main 2026-10-19 22:53:27 +00:00
Ägare

Closes #303. Refs #326 (web part), #321 (partial) and #398 (partial).

Changes

  • #326: failure and stale lines are fixed strings, exported as LOG_REFUND_FAILED and LOG_REQUEST_ENDED in src/lib/withdrawal.ts and asserted in tests.
    • [withdraw] refund failed, settle by hand sub=<sub>
    • [withdraw] request stale or invalid, settle by hand sub=<sub> reason=<stale|invalid>
    • Match on the fixed prefix up to settle by hand.
  • #303: the subscription panel shows the card (brand and last four) for an auto-renewing subscription. Nothing shows without a card, for a one-time year, or when the subscription is set to end. Strings in en and sv.
  • #398: the logout hint is dropped unless the id token names the configured issuer and client.
  • #321: em dashes removed from src/content/** by rewriting the sentences.
  • Version 1.45.0.

Not done

  • #326: stale requests are only logged when the user retries. A request nobody retries is never detected. A scan of rows with neither withdrawn_at nor rejection older than the retry limit is missing. The runbook entry and the Loki alert are in other repos.
  • #398: the likely cause is a stale sid (the Keycloak SSO session ended while the 8 h portal session lives). Not provable from code.
  • #321: the roadmap link is not on the site, so there is nothing to fix. The header is not sticky (position: relative), so no scroll-padding-top is needed. Heading order and alt text need no change (no <img> in templates).

Operator steps

  • #398 on staging: sign in, wait past the Keycloak SSO idle time, sign out. Compare the sid claim of the gb_id_token cookie with the session in the KEYCLOAK_SESSION cookie. Confirm that post_logout_redirect_uri https://www.stg.bitborg.se/ is registered on the bitborg-web client. If the sid is stale, decide on a shorter portal session or a stored refresh token.
  • #326: force a failed refund in a non-prod stack and check the alert fires (needs the infra alert branch).
  • #321 manual WCAG checks: contrast in light and dark, keyboard order and focus visibility on every main page, zoom to 200 percent and 400 percent reflow, narrow widths for the main navigation, screen reader pass on forms, link purpose for the target="_blank" links.
  • Decide the roadmap link target (org Roadmap board on git.bitborg.se, if it is public).
Closes #303. Refs #326 (web part), #321 (partial) and #398 (partial). ## Changes - #326: failure and stale lines are fixed strings, exported as `LOG_REFUND_FAILED` and `LOG_REQUEST_ENDED` in `src/lib/withdrawal.ts` and asserted in tests. - `[withdraw] refund failed, settle by hand sub=<sub>` - `[withdraw] request stale or invalid, settle by hand sub=<sub> reason=<stale|invalid>` - Match on the fixed prefix up to `settle by hand`. - #303: the subscription panel shows the card (brand and last four) for an auto-renewing subscription. Nothing shows without a card, for a one-time year, or when the subscription is set to end. Strings in en and sv. - #398: the logout hint is dropped unless the id token names the configured issuer and client. - #321: em dashes removed from `src/content/**` by rewriting the sentences. - Version 1.45.0. ## Not done - #326: stale requests are only logged when the user retries. A request nobody retries is never detected. A scan of rows with neither `withdrawn_at` nor `rejection` older than the retry limit is missing. The runbook entry and the Loki alert are in other repos. - #398: the likely cause is a stale `sid` (the Keycloak SSO session ended while the 8 h portal session lives). Not provable from code. - #321: the roadmap link is not on the site, so there is nothing to fix. The header is not sticky (`position: relative`), so no `scroll-padding-top` is needed. Heading order and alt text need no change (no `<img>` in templates). ## Operator steps - [ ] #398 on staging: sign in, wait past the Keycloak SSO idle time, sign out. Compare the `sid` claim of the `gb_id_token` cookie with the session in the `KEYCLOAK_SESSION` cookie. Confirm that `post_logout_redirect_uri` `https://www.stg.bitborg.se/` is registered on the `bitborg-web` client. If the sid is stale, decide on a shorter portal session or a stored refresh token. - [ ] #326: force a failed refund in a non-prod stack and check the alert fires (needs the infra alert branch). - [ ] #321 manual WCAG checks: contrast in light and dark, keyboard order and focus visibility on every main page, zoom to 200 percent and 400 percent reflow, narrow widths for the main navigation, screen reader pass on forms, link purpose for the `target="_blank"` links. - [ ] Decide the roadmap link target (org Roadmap board on git.bitborg.se, if it is public).
supernaut lade till 6 incheckningar 2026-10-19 19:11:09 +00:00
A log alert matches these lines. Refs #326
Refs #303
Keycloak ignores an id_token_hint that is not for the client_id in the request and asks
the user to confirm. The likelier cause, a hint whose sid no longer matches the browser's
Keycloak session, needs a check on staging. Refs #398
Refs #321
fix(content): grammar, comma splice and card label from review
Alla kontroller lyckades
ci / ci (pull_request) Successful in 4m19s
99a401d231
"Renews on" read wrong next to the renewal date and for a past-due plan.
supernaut sammanfogade incheckning 0b7d8ab9d2 till main 2026-10-19 22:53:27 +00:00
supernaut tog bort grenen feat/withdrawal-logs-card-signout-sweep 2026-10-19 22:53:27 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-25 19:34:27 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-web!404
Ingen beskrivning angiven.