feat(account): remove the email change flow #337

Sammanfogat
supernaut sammanfogade 3 incheckningar från feat/remove-email-change in i main 2026-10-10 16:53:27 +00:00
Ägare

What changed

Stacked on the account console split (#312). Keycloak owns the address, so the email change loop is removed.

  • Removed /api/email-change, /auth/confirm-email, src/lib/email-change*, their tests, the two mail templates, the emailChange rate limit and the panel notice strings.
  • Dropped the email_change_requests table: migration 0011 (DROP TABLE). Purge job and its tests no longer target it.
  • Removed now-unused setUserAttrs, userEmailInUse and the profile reconcile reason.
  • Privacy policy retention line now names invite codes only (sv, en).
  • Version 1.31.0.

Deploy note

The migration deletes any pending email change requests. Links already sent stop working.

How verified

pnpm check, pnpm lint, pnpm test (566 passed), pnpm build, pnpm lang-check: all pass. Migration generated with pnpm db:generate, not applied to any database.

Closes #313

## What changed Stacked on the account console split (#312). Keycloak owns the address, so the email change loop is removed. - Removed `/api/email-change`, `/auth/confirm-email`, `src/lib/email-change*`, their tests, the two mail templates, the `emailChange` rate limit and the panel notice strings. - Dropped the `email_change_requests` table: migration `0011` (`DROP TABLE`). Purge job and its tests no longer target it. - Removed now-unused `setUserAttrs`, `userEmailInUse` and the `profile` reconcile reason. - Privacy policy retention line now names invite codes only (sv, en). - Version 1.31.0. ## Deploy note The migration deletes any pending email change requests. Links already sent stop working. ## How verified `pnpm check`, `pnpm lint`, `pnpm test` (566 passed), `pnpm build`, `pnpm lang-check`: all pass. Migration generated with `pnpm db:generate`, not applied to any database. Closes #313
supernaut lade till 2 incheckningar 2026-10-10 16:32:59 +00:00
Keycloak owns the address, so the portal no longer sends confirmation
links. Remove the endpoint, confirm page, token helpers, mail templates,
rate limit and strings. Drop the email_change_requests table. Remove the
unused setUserAttrs helper and the profile reconcile reason.

Closes #313
refactor(keycloak): remove the unused email lookup
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m4s
d861c38e40
supernaut ändrade målgrenen från feat/account-console-split till main2026-10-10 16:35:56 +00:00
supernaut lade till 1 incheckning 2026-10-10 16:41:25 +00:00
refactor(web): share locale page pairs as components (#338)
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m50s
f2359ba406
## What

Merge the per-locale page pairs (`src/pages/*.astro` and `src/pages/en/*.astro`) into shared components that take `lang`. Each page is now a thin wrapper.

Stacked on the #312 and #313 branches. Merge those first, then rebase this onto main.

## Shared components

All in `src/components/pages/`:

- `legal-page` (about, contact, privacy, terms, trial-terms, security)
- `home-page`, `not-found-page`
- `docs-index-page`, `faq-page`, `guide-page`
- `news-index-page`, `news-post-page`
- `account-page`, `signup-page`, `welcome-page`, `checkout-return-page`

Pages keep what Astro needs at page level: response headers and status, redirects and rewrites, `Astro.cache.set(false)`, and the `[slug]` entry lookup (so the 404 rewrite still works).

## Left split

`pricing` stays as two files. The two versions carry different prose and tables, so a shared component would only be a `lang` ternary around two copies.

## Verification

URLs and the English-URL rule are unchanged. No content change.

- Built the base commit and this branch, served both with `node dist/server/entry.mjs`.
- Fetched 50 routes from each (sv and en: all static pages, every guide and news post, FAQ with a topic, checkout return with and without token and `cancelled`, unknown paths and unknown slugs).
- Compared status, headers and HTML.
- Ignored per-build values: scoped-style ids, asset hashes, server-island tokens, logo gradient ids, the captcha CSS nonce, and the CSP header (its style hashes follow the CSS bundle).
- Ran twice: with auth configured (account redirects to login), and without auth plus `SIGNUPS_OPEN=false` (account 404 rewrite, signup redirect).
- Result: 0 differences in markup and 0 in CSS content. Component CSS chunks can appear in a different order inside the head, so CSS was compared as a sorted set.

One bug caught by this: `getRelativeLocaleUrl` adds a trailing slash, which changed the `return_to` value on the account login redirect. The literal `/account` and `/en/account` are kept.

`pnpm check`, `pnpm lint`, `pnpm test`, `pnpm build` pass.

Version bumped to 1.31.1.

Reviewed-on: #338
supernaut tvångsskickade feat/remove-email-change från f2359ba406
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m50s
till b67efd9985
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m59s
2026-10-10 16:48:20 +00:00
Jämför
supernaut sammanfogade incheckning 39078bfbed till main 2026-10-10 16:53:27 +00:00
supernaut tog bort grenen feat/remove-email-change 2026-10-10 16:53:27 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-10 16:53: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!337
Ingen beskrivning angiven.