From e0edf34f49abfc3b36bad2f1f24b9e8763c73457 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 11 Aug 2026 01:14:47 +0000 Subject: [PATCH 1/4] feat(web): migrate semantic-warning banners onto --color-warning Twelve components used raw amber-* Tailwind utilities for genuinely semantic warning state (visibility/audience disclosures, sync-conflict banners, audit-retention notices, a "shown once" caution, a concentration-warning confirm) instead of resolving through --color-warning (#1533). Only the non-text roles (border, background tint, and one near-exact-value solid fill) are migrated here -- --color-warning is a single flat hex, unlike --color-danger's multi-role family, so it has no text-safe or dark-muted-surface variant; those roles and every decorative/selection use of amber are left alone (see PR description for the full excluded population). Contrast measured in a real Chromium canvas against this app's actual compiled theme (Tailwind v4 ships oklch, not hex, so amber-600 and --color-warning are close but not byte-identical): every migrated text-bearing site is unchanged or slightly improved (8.8-13.7:1), decorative border contrast (already below 3:1 pre-existing) moves by well under half a ratio point. Adds a guard test pinning the migrated sites so they cannot silently regress back onto raw amber. --- .../warning-token-migration.unit.spec.ts | 130 ++++++++++++++++++ apps/web/src/components/AudienceField.tsx | 2 +- .../web/src/components/EntityRevealDialog.tsx | 2 +- .../src/components/VisibleToPlayersBar.tsx | 4 +- apps/web/src/features/admin/AuditLogCard.tsx | 2 +- .../src/features/admin/CampaignAuditPage.tsx | 2 +- apps/web/src/features/admin/MembersPage.tsx | 2 +- .../src/features/admin/ResetRequestsCard.tsx | 2 +- .../src/features/dashboard/HandoutsCard.tsx | 2 +- .../encounters/EncounterWhisperComposer.tsx | 2 +- .../features/encounters/RunSessionPage.tsx | 6 +- .../features/encounters/SpellbookPanel.tsx | 4 +- apps/web/src/features/notes/InboxPage.tsx | 2 +- 13 files changed, 146 insertions(+), 16 deletions(-) create mode 100644 apps/web/e2e/tests/warning-token-migration.unit.spec.ts diff --git a/apps/web/e2e/tests/warning-token-migration.unit.spec.ts b/apps/web/e2e/tests/warning-token-migration.unit.spec.ts new file mode 100644 index 000000000..8550ab583 --- /dev/null +++ b/apps/web/e2e/tests/warning-token-migration.unit.spec.ts @@ -0,0 +1,130 @@ +/** + * Semantic-warning color token migration (issue #2161). + * + * #1533's PR defined `--color-warning: #d97706` but left every raw `amber-*` + * Tailwind utility that actually renders semantic warning state (a caution + * banner, a "shown once" disclosure, a disabled-feature notice, …) untouched. + * This suite pins the migrated sites so a future edit cannot silently drop + * them back onto a raw `amber-*` class. + * + * Scope (see the PR description for the full audit): `--color-warning` is a + * single flat hex, unlike `--color-danger`'s multi-role family + * (`--color-danger`, `--color-danger-solid*`, `--color-danger-border`, + * `--color-danger-focus`, `--color-danger-ghost-*`, `--color-danger-disabled-*`). + * Only the non-text roles (border, background tint, and one solid-fill site + * where source-level `amber-600` was already the closest Tailwind step to + * `--color-warning`) were migrated. Measured in a real Chromium canvas + * against this app's actual compiled theme (Tailwind v4 ships its palette as + * oklch, not hex) rather than assumed: `amber-600` resolves to rgb(225,113,0), + * `--color-warning` to rgb(217,119,6) — close but NOT byte-identical, so this + * is a small, deliberate, contrast-checked color move, not a no-op formalization + * (white-on-button contrast: 3.20:1 -> 3.19:1, both already below the 4.5:1 AA + * text threshold before this PR — pre-existing, not introduced or worsened here). + * Readable warning TEXT color, dark "muted surface" tints (`amber-950/*`), and + * decorative/selection uses of amber are deliberately left alone — see the + * PR description for the full excluded population and why. This guard + * therefore only covers the sites actually migrated, not every `amber-*` in + * the app: raw amber remains a legitimate decorative or not-yet-staged + * choice everywhere else. + */ +import { expect, test } from '@playwright/test'; +import { readFileSync } from 'node:fs'; +import { resolve } from 'node:path'; + +const ROOT = resolve(__dirname, '../../src'); +const READ = (relPath: string) => readFileSync(resolve(ROOT, relPath), 'utf8'); + +interface MigratedSite { + file: string; + /** Raw amber-* declarations that must never reappear at this site. */ + bannedPatterns: RegExp[]; + /** var(--color-warning) usages that must be present. */ + requiredPatterns: RegExp[]; +} + +const MIGRATED_SITES: MigratedSite[] = [ + { + file: 'features/encounters/SpellbookPanel.tsx', + bannedPatterns: [/border-amber-500\/50/, /bg-amber-600\b/], + requiredPatterns: [/border-\[var\(--color-warning\)\]\/50/, /bg-\[var\(--color-warning\)\]/], + }, + { + file: 'features/admin/MembersPage.tsx', + bannedPatterns: [/border-amber-600\/40/], + requiredPatterns: [/border-\[var\(--color-warning\)\]\/40/], + }, + { + file: 'features/notes/InboxPage.tsx', + bannedPatterns: [/border-amber-600\/40/], + requiredPatterns: [/border-\[var\(--color-warning\)\]\/40/], + }, + { + file: 'components/AudienceField.tsx', + bannedPatterns: [/border-amber-500\/30 bg-amber-500\/10/], + requiredPatterns: [/border-\[var\(--color-warning\)\]\/30 bg-\[var\(--color-warning\)\]\/10/], + }, + { + file: 'components/EntityRevealDialog.tsx', + bannedPatterns: [/border-amber-500\/30 bg-amber-500\/10/], + requiredPatterns: [/border-\[var\(--color-warning\)\]\/30 bg-\[var\(--color-warning\)\]\/10/], + }, + { + file: 'features/dashboard/HandoutsCard.tsx', + bannedPatterns: [/border-amber-500\/30 bg-amber-500\/10/], + requiredPatterns: [/border-\[var\(--color-warning\)\]\/30 bg-\[var\(--color-warning\)\]\/10/], + }, + { + file: 'components/VisibleToPlayersBar.tsx', + bannedPatterns: [/border-amber-500\/35 bg-amber-500\/10/g], + requiredPatterns: [/border-\[var\(--color-warning\)\]\/35 bg-\[var\(--color-warning\)\]\/10/g], + }, + { + file: 'features/encounters/RunSessionPage.tsx', + bannedPatterns: [/border-amber-500\/40 bg-amber-500\/10/g], + requiredPatterns: [/border-\[var\(--color-warning\)\]\/40 bg-\[var\(--color-warning\)\]\/10/g], + }, + { + file: 'features/encounters/EncounterWhisperComposer.tsx', + // Border only — the form also carries text-amber-300 (title) and + // focus:ring-amber-400 (textarea), deliberately left raw; see PR + // description ("no text-safe --color-warning role"). + bannedPatterns: [/rounded-lg border border-amber-500\/30 bg-neutral-900\/90/], + requiredPatterns: [/rounded-lg border border-\[var\(--color-warning\)\]\/30 bg-neutral-900\/90/], + }, + { + file: 'features/admin/CampaignAuditPage.tsx', + bannedPatterns: [/border-amber-500\/30 bg-amber-500\/5/], + requiredPatterns: [/border-\[var\(--color-warning\)\]\/30 bg-\[var\(--color-warning\)\]\/5/], + }, + { + file: 'features/admin/AuditLogCard.tsx', + bannedPatterns: [/border-amber-500\/30 bg-amber-500\/5/], + requiredPatterns: [/border-\[var\(--color-warning\)\]\/30 bg-\[var\(--color-warning\)\]\/5/], + }, + { + file: 'features/admin/ResetRequestsCard.tsx', + // Border only — the heading directly below stays text-amber-500 (raw); + // same "no text-safe role" reasoning as EncounterWhisperComposer above. + bannedPatterns: [/"border border-amber-500\/30 rounded p-2\.5 space-y-1"/], + requiredPatterns: [/"border border-\[var\(--color-warning\)\]\/30 rounded p-2\.5 space-y-1"/], + }, +]; + +test.describe('Semantic-warning token migration (#2161)', () => { + for (const site of MIGRATED_SITES) { + test(`${site.file} uses --color-warning, not raw amber, at its migrated site(s)`, () => { + const text = READ(site.file); + for (const pattern of site.bannedPatterns) { + expect(text, `${site.file} must not reintroduce ${pattern}`).not.toMatch(pattern); + } + for (const pattern of site.requiredPatterns) { + expect(text, `${site.file} must reference --color-warning via ${pattern}`).toMatch(pattern); + } + }); + } + + test('--color-warning token itself stays defined', () => { + const css = READ('index.css'); + expect(css).toMatch(/--color-warning:\s*#d97706/); + }); +}); diff --git a/apps/web/src/components/AudienceField.tsx b/apps/web/src/components/AudienceField.tsx index 655d0f29e..fe54cd98a 100644 --- a/apps/web/src/components/AudienceField.tsx +++ b/apps/web/src/components/AudienceField.tsx @@ -58,7 +58,7 @@ export function AudienceField({

Players will see this {entityLabel} as soon as you create it — including in lists, search, and shared links. You can hide it again right after if that was a mistake. diff --git a/apps/web/src/components/EntityRevealDialog.tsx b/apps/web/src/components/EntityRevealDialog.tsx index dbcf23407..317176802 100644 --- a/apps/web/src/components/EntityRevealDialog.tsx +++ b/apps/web/src/components/EntityRevealDialog.tsx @@ -61,7 +61,7 @@ export function EntityRevealDialog({ )} -

+

{t('secrecy.revealIrreversible')}

diff --git a/apps/web/src/components/VisibleToPlayersBar.tsx b/apps/web/src/components/VisibleToPlayersBar.tsx index 95a2cf021..b710df524 100644 --- a/apps/web/src/components/VisibleToPlayersBar.tsx +++ b/apps/web/src/components/VisibleToPlayersBar.tsx @@ -92,7 +92,7 @@ export function VisibleToPlayersBar({
Hidden from players @@ -110,7 +110,7 @@ export function VisibleToPlayersBar({
Visible to players diff --git a/apps/web/src/features/admin/AuditLogCard.tsx b/apps/web/src/features/admin/AuditLogCard.tsx index ea5b2af4c..8c6c5c4e4 100644 --- a/apps/web/src/features/admin/AuditLogCard.tsx +++ b/apps/web/src/features/admin/AuditLogCard.tsx @@ -170,7 +170,7 @@ export function AuditLogCard() {
{error &&

{error}

} {retention ? ( -
+

Audit retention policy

diff --git a/apps/web/src/features/admin/CampaignAuditPage.tsx b/apps/web/src/features/admin/CampaignAuditPage.tsx index 3d6bc29f8..ae821ce74 100644 --- a/apps/web/src/features/admin/CampaignAuditPage.tsx +++ b/apps/web/src/features/admin/CampaignAuditPage.tsx @@ -291,7 +291,7 @@ export default function CampaignAuditPage() {

- +

Audit retention disclosure

{retention diff --git a/apps/web/src/features/admin/MembersPage.tsx b/apps/web/src/features/admin/MembersPage.tsx index 210adc196..1e4a88928 100644 --- a/apps/web/src/features/admin/MembersPage.tsx +++ b/apps/web/src/features/admin/MembersPage.tsx @@ -480,7 +480,7 @@ function InviteCard({ campaignId }: { campaignId: number }) { {!invitesEnabled && (

Public invites are suspended — outstanding join links return as invalid until you re-enable them. diff --git a/apps/web/src/features/admin/ResetRequestsCard.tsx b/apps/web/src/features/admin/ResetRequestsCard.tsx index 89a082f6b..9ad464d72 100644 --- a/apps/web/src/features/admin/ResetRequestsCard.tsx +++ b/apps/web/src/features/admin/ResetRequestsCard.tsx @@ -114,7 +114,7 @@ export function ResetRequestsCard() {

{approval && resetUrl && ( -
+

One-time reset link — shown once, give it to {approval.request.username} now

diff --git a/apps/web/src/features/dashboard/HandoutsCard.tsx b/apps/web/src/features/dashboard/HandoutsCard.tsx index 59534d1e2..b98cd6fee 100644 --- a/apps/web/src/features/dashboard/HandoutsCard.tsx +++ b/apps/web/src/features/dashboard/HandoutsCard.tsx @@ -292,7 +292,7 @@ export function HandoutsCard({ campaignId }: { campaignId: number }) { {pendingReveal.filename}

-

+

Revealing a handout exposes the raw image or PDF to players. Encounter fog, hidden tokens, AoE filtering, and Cast player-safe projection do not protect this file. diff --git a/apps/web/src/features/encounters/EncounterWhisperComposer.tsx b/apps/web/src/features/encounters/EncounterWhisperComposer.tsx index a0484fb54..e297879f0 100644 --- a/apps/web/src/features/encounters/EncounterWhisperComposer.tsx +++ b/apps/web/src/features/encounters/EncounterWhisperComposer.tsx @@ -62,7 +62,7 @@ export function EncounterWhisperComposer({ return (

diff --git a/apps/web/src/features/encounters/RunSessionPage.tsx b/apps/web/src/features/encounters/RunSessionPage.tsx index 11c279493..4b9891626 100644 --- a/apps/web/src/features/encounters/RunSessionPage.tsx +++ b/apps/web/src/features/encounters/RunSessionPage.tsx @@ -4493,7 +4493,7 @@ export default function RunSessionPage() { aria-live="polite" data-testid="mutation-reconcile-banner" data-phase={reconcile.phase} - className="rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-sm" + className="rounded-lg border border-[var(--color-warning)]/40 bg-[var(--color-warning)]/10 px-3 py-2 text-sm" > {reconcile.phase === 'checking' ? t('encounters.reconcile.checking') @@ -4517,7 +4517,7 @@ export default function RunSessionPage() { role="status" aria-live="polite" data-testid="encounter-sync-override-prompt" - className="rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-sm flex items-center gap-2 flex-wrap" + className="rounded-lg border border-[var(--color-warning)]/40 bg-[var(--color-warning)]/10 px-3 py-2 text-sm flex items-center gap-2 flex-wrap" > {t('encounters.sync.overridePrompt')} {t('encounters.sync.ownOverridePrompt')} -
+

🔮 Concentration Warning

@@ -481,7 +481,7 @@ export function SpellbookPanel({ ', + 'MembersPage:483': + '
x
', + 'InboxPage:700': + '
x
', +}; + +/** A bare reference element carrying ONLY the color-affecting utility classes for the + * same site, with no `Card`/`cf-inset`/`.btn` wrapper class to compete with it. If the + * utility genuinely wins the cascade, the real site's computed color equals this + * reference's. Proves the utility class itself is correct even for sites where the + * real markup is currently overridden (diagnostic value, not just a pass/fail). */ +const REFERENCE_SITES: Record = { + 'CampaignAuditPage:294': + '
x
', + 'MembersPage:483': '
x
', + 'InboxPage:700': '
x
', + 'SpellbookPanel:484': '', +}; + +async function normalizedColor(page: import('@playwright/test').Page, cssColor: string): Promise { + return page.evaluate((c) => { + const canvas = document.createElement('canvas'); + canvas.width = 1; + canvas.height = 1; + const ctx = canvas.getContext('2d')!; + ctx.fillStyle = c; + ctx.fillRect(0, 0, 1, 1); + return Array.from(ctx.getImageData(0, 0, 1, 1).data).join(','); + }, cssColor); +} + +test.describe('warning-token migration: computed cascade (#2161)', () => { + test('measures every migrated site\'s ACTUAL painted color, not just its source class', async ({ page }) => { + const allHtml = [...Object.values(REAL_SITES), ...Object.values(REFERENCE_SITES)].join('\n'); + await renderCssFixture(page, `
${allHtml}
`); + + // Reference token/fallback colors, resolved the same way the real elements are — + // no hardcoded hex literals to go stale if the palette changes. + const tokens = await page.evaluate(() => { + const probe = document.createElement('div'); + document.body.appendChild(probe); + const read = (v: string) => { + probe.style.backgroundColor = `var(${v})`; + return getComputedStyle(probe).backgroundColor; + }; + const out = { divider: read('--color-divider'), cfCard: read('--cf-card'), cfSurface: read('--cf-surface') }; + probe.remove(); + return out; + }); + const noOpBorder = await normalizedColor(page, tokens.divider); + const noOpBg = await normalizedColor(page, tokens.cfCard); + // --cf-card and --cf-surface are the same value today (both alias --color-surface); + // assert that rather than assume it, since the no-op detection below depends on it. + expect(await normalizedColor(page, tokens.cfSurface)).toBe(noOpBg); + + for (const [site, html] of Object.entries(REAL_SITES)) { + void html; + const el = page.locator(`[data-site="${site}"]`); + const { border, bg } = await el.evaluate((node) => { + const cs = getComputedStyle(node); + return { border: cs.borderColor, bg: cs.backgroundColor }; + }); + const normBorder = await normalizedColor(page, border); + const normBg = await normalizedColor(page, bg); + + if (KNOWN_INERT.has(site)) { + // Documents the CURRENT bug precisely rather than hiding it. If this assertion + // starts failing, it means the site's color-effectiveness changed — update + // KNOWN_INERT (and this comment) as part of whatever change caused it, don't + // just delete the assertion. + const reference = REFERENCE_SITES[site]; + expect(reference, `${site} is in KNOWN_INERT but has no reference fixture`).toBeTruthy(); + const refEl = page.locator(`[data-site="ref:${site}"]`); + const refStyle = await refEl.evaluate((n) => { + const cs = getComputedStyle(n); + return { border: cs.borderColor, bg: cs.backgroundColor }; + }); + const refBorder = await normalizedColor(page, refStyle.border); + const refBg = await normalizedColor(page, refStyle.bg); + if (site === 'SpellbookPanel:484') { + // The button's background is fully transparent (unlayered `.btn { background: + // 0 0 }`), not the cf-card/cf-inset divider/surface fallback the other three + // KNOWN_INERT sites paint — different unlayered rule, same root cause. Only the + // background was migrated here (no border utility was touched), so only the + // reference's background is meaningful to check. + expect(normBg, `${site}: expected still-transparent (see file header)`).toBe(await normalizedColor(page, 'rgba(0,0,0,0)')); + expect(refBg, `${site}: the bare bg-[var(--color-warning)] utility must still resolve to the token`).not.toBe(noOpBg); + continue; + } else if (site === 'MembersPage:483' || site === 'InboxPage:700') { + // Border-only migration (cf-inset never carried a bg-* utility here) — only the + // border comparison is meaningful; the reference element has no bg-* class at + // all, so its (always-transparent) background proves nothing about this bug. + expect(normBorder, `${site}: expected still on --color-divider (see file header)`).toBe(noOpBorder); + expect(refBorder, `${site}: the bare border-[var(--color-warning)] utility must still resolve to the token`).not.toBe( + noOpBorder, + ); + continue; + } else { + // Only CampaignAuditPage:294 reaches here — migrated both border and background. + expect(normBorder, `${site}: expected still on --color-divider (see file header)`).toBe(noOpBorder); + expect(normBg, `${site}: expected still on --cf-card/--cf-surface (see file header)`).toBe(noOpBg); + // The bare utility classes DO resolve to the token — confirms the bug is the + // unlayered wrapper rule (cf-card), not the utility classes themselves. + expect(refBorder, `${site}: the bare utility classes must still resolve to --color-warning`).not.toBe(noOpBorder); + expect(refBg, `${site}: the bare utility classes must still resolve to --color-warning`).not.toBe(noOpBg); + } + } else { + expect(normBorder, `${site}: border must not have fallen back to --color-divider`).not.toBe(noOpBorder); + if (site !== 'ResetRequestsCard:117') { + // ResetRequestsCard:117 only migrated the border; it never had a background + // utility (transparent before and after), so there is no bg fallback to check. + expect(normBg, `${site}: background must not have fallen back to --cf-card/--cf-surface`).not.toBe(noOpBg); + } + } + } + }); +}); diff --git a/apps/web/e2e/tests/warning-token-migration.unit.spec.ts b/apps/web/e2e/tests/warning-token-migration.unit.spec.ts index 8550ab583..8b0ed8282 100644 --- a/apps/web/e2e/tests/warning-token-migration.unit.spec.ts +++ b/apps/web/e2e/tests/warning-token-migration.unit.spec.ts @@ -4,8 +4,22 @@ * #1533's PR defined `--color-warning: #d97706` but left every raw `amber-*` * Tailwind utility that actually renders semantic warning state (a caution * banner, a "shown once" disclosure, a disabled-feature notice, …) untouched. - * This suite pins the migrated sites so a future edit cannot silently drop - * them back onto a raw `amber-*` class. + * This suite pins the SOURCE at each migrated site so a future edit cannot + * silently drop it back onto a raw `amber-*` class. It is deliberately a + * cheap, fast smoke check, not the authoritative correctness check — + * `warning-token-cascade.spec.ts` (browser-backed) is that: this codebase's + * `index.css`/`nocturne.css` are imported unlayered, which always beats a + * layered Tailwind utility (including an arbitrary-value one) regardless of + * specificity or source order, so a source string can be byte-identical + * between a working migration and a completely inert one. Real measurement + * found FOUR of the sixteen sites below are exactly that trap — see + * `warning-token-cascade.spec.ts`'s file header for the full mechanism and + * the `KNOWN_INERT` list. This spec still asserts the source presence at + * every one of the 16 (necessary, not sufficient), and additionally asserts + * an exact PER-FILE occurrence COUNT for files with more than one migrated + * declaration (`VisibleToPlayersBar.tsx`: 2, `RunSessionPage.tsx`: 3) — + * matching only "at least one" would let one of several sites silently + * regress back to raw amber while the others keep the test green. * * Scope (see the PR description for the full audit): `--color-warning` is a * single flat hex, unlike `--color-danger`'s multi-role family @@ -17,9 +31,10 @@ * against this app's actual compiled theme (Tailwind v4 ships its palette as * oklch, not hex) rather than assumed: `amber-600` resolves to rgb(225,113,0), * `--color-warning` to rgb(217,119,6) — close but NOT byte-identical, so this - * is a small, deliberate, contrast-checked color move, not a no-op formalization - * (white-on-button contrast: 3.20:1 -> 3.19:1, both already below the 4.5:1 AA - * text threshold before this PR — pre-existing, not introduced or worsened here). + * is a small, deliberate, contrast-checked color move, not a no-op formalization. + * (The white-on-button contrast number reported for `SpellbookPanel.tsx:484` + * against this pairing was later found to describe a background that is + * never actually painted there — see `warning-token-cascade.spec.ts`.) * Readable warning TEXT color, dark "muted surface" tints (`amber-950/*`), and * decorative/selection uses of amber are deliberately left alone — see the * PR description for the full excluded population and why. This guard @@ -38,50 +53,62 @@ interface MigratedSite { file: string; /** Raw amber-* declarations that must never reappear at this site. */ bannedPatterns: RegExp[]; - /** var(--color-warning) usages that must be present. */ - requiredPatterns: RegExp[]; + /** + * var(--color-warning) usages that must be present, each with the EXACT number of + * occurrences expected in the file. A plain `toMatch` (at-least-one) check would pass + * for a file with N migrated call sites even if all but one regressed back to raw + * amber — VisibleToPlayersBar.tsx (2 sites) and RunSessionPage.tsx (3 sites) are + * exactly that shape today, and more will be as this migration continues. Counting + * exact occurrences catches a partial regression a presence-only check cannot. + */ + requiredPatterns: Array<{ pattern: RegExp; count: number }>; } const MIGRATED_SITES: MigratedSite[] = [ { file: 'features/encounters/SpellbookPanel.tsx', bannedPatterns: [/border-amber-500\/50/, /bg-amber-600\b/], - requiredPatterns: [/border-\[var\(--color-warning\)\]\/50/, /bg-\[var\(--color-warning\)\]/], + requiredPatterns: [ + { pattern: /border-\[var\(--color-warning\)\]\/50/g, count: 1 }, + { pattern: /bg-\[var\(--color-warning\)\]/g, count: 1 }, + ], }, { file: 'features/admin/MembersPage.tsx', bannedPatterns: [/border-amber-600\/40/], - requiredPatterns: [/border-\[var\(--color-warning\)\]\/40/], + requiredPatterns: [{ pattern: /border-\[var\(--color-warning\)\]\/40/g, count: 1 }], }, { file: 'features/notes/InboxPage.tsx', bannedPatterns: [/border-amber-600\/40/], - requiredPatterns: [/border-\[var\(--color-warning\)\]\/40/], + requiredPatterns: [{ pattern: /border-\[var\(--color-warning\)\]\/40/g, count: 1 }], }, { file: 'components/AudienceField.tsx', bannedPatterns: [/border-amber-500\/30 bg-amber-500\/10/], - requiredPatterns: [/border-\[var\(--color-warning\)\]\/30 bg-\[var\(--color-warning\)\]\/10/], + requiredPatterns: [{ pattern: /border-\[var\(--color-warning\)\]\/30 bg-\[var\(--color-warning\)\]\/10/g, count: 1 }], }, { file: 'components/EntityRevealDialog.tsx', bannedPatterns: [/border-amber-500\/30 bg-amber-500\/10/], - requiredPatterns: [/border-\[var\(--color-warning\)\]\/30 bg-\[var\(--color-warning\)\]\/10/], + requiredPatterns: [{ pattern: /border-\[var\(--color-warning\)\]\/30 bg-\[var\(--color-warning\)\]\/10/g, count: 1 }], }, { file: 'features/dashboard/HandoutsCard.tsx', bannedPatterns: [/border-amber-500\/30 bg-amber-500\/10/], - requiredPatterns: [/border-\[var\(--color-warning\)\]\/30 bg-\[var\(--color-warning\)\]\/10/], + requiredPatterns: [{ pattern: /border-\[var\(--color-warning\)\]\/30 bg-\[var\(--color-warning\)\]\/10/g, count: 1 }], }, { file: 'components/VisibleToPlayersBar.tsx', + // 2 migrated sites (:95 hidden-from-players, :113 visible-to-players). bannedPatterns: [/border-amber-500\/35 bg-amber-500\/10/g], - requiredPatterns: [/border-\[var\(--color-warning\)\]\/35 bg-\[var\(--color-warning\)\]\/10/g], + requiredPatterns: [{ pattern: /border-\[var\(--color-warning\)\]\/35 bg-\[var\(--color-warning\)\]\/10/g, count: 2 }], }, { file: 'features/encounters/RunSessionPage.tsx', + // 3 migrated sites (:4496 reconcile banner, :4520/:4551 sync-override prompts). bannedPatterns: [/border-amber-500\/40 bg-amber-500\/10/g], - requiredPatterns: [/border-\[var\(--color-warning\)\]\/40 bg-\[var\(--color-warning\)\]\/10/g], + requiredPatterns: [{ pattern: /border-\[var\(--color-warning\)\]\/40 bg-\[var\(--color-warning\)\]\/10/g, count: 3 }], }, { file: 'features/encounters/EncounterWhisperComposer.tsx', @@ -89,24 +116,24 @@ const MIGRATED_SITES: MigratedSite[] = [ // focus:ring-amber-400 (textarea), deliberately left raw; see PR // description ("no text-safe --color-warning role"). bannedPatterns: [/rounded-lg border border-amber-500\/30 bg-neutral-900\/90/], - requiredPatterns: [/rounded-lg border border-\[var\(--color-warning\)\]\/30 bg-neutral-900\/90/], + requiredPatterns: [{ pattern: /rounded-lg border border-\[var\(--color-warning\)\]\/30 bg-neutral-900\/90/g, count: 1 }], }, { file: 'features/admin/CampaignAuditPage.tsx', bannedPatterns: [/border-amber-500\/30 bg-amber-500\/5/], - requiredPatterns: [/border-\[var\(--color-warning\)\]\/30 bg-\[var\(--color-warning\)\]\/5/], + requiredPatterns: [{ pattern: /border-\[var\(--color-warning\)\]\/30 bg-\[var\(--color-warning\)\]\/5/g, count: 1 }], }, { file: 'features/admin/AuditLogCard.tsx', bannedPatterns: [/border-amber-500\/30 bg-amber-500\/5/], - requiredPatterns: [/border-\[var\(--color-warning\)\]\/30 bg-\[var\(--color-warning\)\]\/5/], + requiredPatterns: [{ pattern: /border-\[var\(--color-warning\)\]\/30 bg-\[var\(--color-warning\)\]\/5/g, count: 1 }], }, { file: 'features/admin/ResetRequestsCard.tsx', // Border only — the heading directly below stays text-amber-500 (raw); // same "no text-safe role" reasoning as EncounterWhisperComposer above. bannedPatterns: [/"border border-amber-500\/30 rounded p-2\.5 space-y-1"/], - requiredPatterns: [/"border border-\[var\(--color-warning\)\]\/30 rounded p-2\.5 space-y-1"/], + requiredPatterns: [{ pattern: /"border border-\[var\(--color-warning\)\]\/30 rounded p-2\.5 space-y-1"/g, count: 1 }], }, ]; @@ -117,8 +144,14 @@ test.describe('Semantic-warning token migration (#2161)', () => { for (const pattern of site.bannedPatterns) { expect(text, `${site.file} must not reintroduce ${pattern}`).not.toMatch(pattern); } - for (const pattern of site.requiredPatterns) { - expect(text, `${site.file} must reference --color-warning via ${pattern}`).toMatch(pattern); + for (const { pattern, count } of site.requiredPatterns) { + const matches = text.match(pattern); + const actual = matches ? matches.length : 0; + expect( + actual, + `${site.file} must reference --color-warning via ${pattern} exactly ${count} time(s), found ${actual} — ` + + 'a partial regression (some sites migrated, others reverted to raw amber) must fail here, not pass on "at least one"', + ).toBe(count); } }); } From efe6a92803f2a68e7f20732460ef2751e1e2b5f6 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 11 Aug 2026 12:25:43 +0000 Subject: [PATCH 3/4] fix(web): revert 4 cascade-inert warning-token sites, file follow-up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Coordinator decision on #2203's review: neither an `!important` escape nor a new unlayered semantic modifier class belongs in a color migration PR — both are real design decisions. Revert CampaignAuditPage.tsx:294, MembersPage.tsx:483, InboxPage.tsx:700, and SpellbookPanel.tsx:484 to their original raw-amber classes (all four render identically either way, since none of them were actually painting --color-warning in the first place) rather than ship source that claims the token while painting --color-divider/--cf-card/ transparent. Tracked in follow-up issue #2208 with the full computed-style table, root-cause per site, and fix options. Updates both guard tests to the 12 sites that remain migrated and are confirmed effective: - warning-token-migration.unit.spec.ts: removes the 4 reverted entries, corrects SpellbookPanel.tsx's entry to its one remaining migrated declaration (the modal border), and rewrites the docstring to describe what actually happened rather than a still-open question. - warning-token-cascade.spec.ts: drops KNOWN_INERT and the reference-fixture diagnostics (no longer needed once the inert sites are gone) and becomes a straightforward regression guard for the 12 sites that do paint the token. --- .../e2e/tests/warning-token-cascade.spec.ts | 155 ++++-------------- .../warning-token-migration.unit.spec.ts | 73 ++++----- .../src/features/admin/CampaignAuditPage.tsx | 2 +- apps/web/src/features/admin/MembersPage.tsx | 2 +- .../features/encounters/SpellbookPanel.tsx | 2 +- apps/web/src/features/notes/InboxPage.tsx | 2 +- 6 files changed, 70 insertions(+), 166 deletions(-) diff --git a/apps/web/e2e/tests/warning-token-cascade.spec.ts b/apps/web/e2e/tests/warning-token-cascade.spec.ts index 6c33ddacb..ac3ceb7f8 100644 --- a/apps/web/e2e/tests/warning-token-cascade.spec.ts +++ b/apps/web/e2e/tests/warning-token-cascade.spec.ts @@ -14,53 +14,32 @@ import { renderCssFixture } from '../lib/computedStyle'; * source-string scan is byte-identical for a working migration and a no-op * one, so it cannot see this at all — the exact trap `.hr`, nocturne's * `.btn` padding, and the duplicate `--space-*` definitions already caught - * elsewhere in this codebase (see AGENTS.md/this repo's own review history). + * elsewhere in this codebase. * * Real re-measurement (Chromium via `renderCssFixture` against the actual - * compiled `dist` CSS, not source inspection) found FOUR of the sixteen - * migrated declarations are exactly this trap — completely inert, still - * painting their pre-migration fallback color: + * compiled `dist` CSS, not source inspection) found FOUR of this PR's + * original sixteen candidate sites were exactly this trap — all inert, + * still painting their pre-migration fallback color despite correct source: + * `CampaignAuditPage.tsx:294` (renders through ``, whose `cf-card` + * class carries an unlayered `background`/`border` shorthand), + * `MembersPage.tsx:483` / `InboxPage.tsx:700` (both carry `cf-inset`, same + * unlayered shorthand), and `SpellbookPanel.tsx:484` (carries `.btn`, whose + * unlayered `background: 0 0` resets it to transparent before + * `.btn-primary` applies anything). Rather than paper over that with an + * `!important` escape or a new unlayered modifier class — both real design + * decisions, not mechanical fixes — those four sites were REVERTED to raw + * amber (see #2203's review) and filed as a follow-up issue for a proper + * warning-semantic variant of `.cf-card`/`.cf-inset`/`.btn`. * - * - `CampaignAuditPage.tsx:294` — renders through ``, whose `cf-card` - * class carries an unlayered `background: var(--cf-card); border: 1px - * solid var(--color-divider);` (index.css). Both win over the arbitrary - * utility outright. - * - `MembersPage.tsx:483` / `InboxPage.tsx:700` — both carry `cf-inset`, - * whose unlayered `background: var(--cf-surface); border: 1px solid - * var(--color-divider);` (index.css) does the same. - * - `SpellbookPanel.tsx:484` — the button carries `.btn`, and nocturne.css's - * unlayered `.btn { background: 0 0; border: 1px solid #0000; }` resets - * the background to fully transparent before `.btn-primary` (also - * unlayered) ever applies its own `border-color`. The base state paints - * transparent (showing the modal's `bg-neutral-900` through it), and - * `:hover`/`:active` paint an accent-tinted `color-mix()` overlay — never - * amber, never `--color-warning`, before or after this migration. This - * also means the contrast numbers reported for this button in the PR - * description's first pass (white text on a solid amber/warning fill) - * were measuring a background that was never actually painted. - * - * Tracked in the PR thread pending a design decision (a `!` important - * escape hatch mirroring the existing `MembersPage.tsx:1617` precedent, an - * unlayered semantic modifier class, or something else) — NOT fixed - * silently here. Until that lands, this suite documents the current, - * measured reality (12 sites effective, 4 known inert) so CI stays an - * honest, passing description of what the browser paints today rather than - * a red suite blocking unrelated work OR a green suite that certifies a - * no-op as done. `KNOWN_INERT` below is the complete list; any site not in - * it is asserted EFFECTIVE, and dropping a site from `KNOWN_INERT` without - * an accompanying code fix will fail loudly here. + * This suite now covers exactly the 12 sites that remain migrated, all + * confirmed by this same measurement to actually paint `--color-warning`. + * Its job going forward is regression protection: if a future edit moves + * one of these 12 onto a `Card`/`cf-inset`/`.btn`-style wrapper (or any + * other unlayered rule), this suite — not the source-scan unit spec — is + * what will catch it. */ -const KNOWN_INERT = new Set([ - 'CampaignAuditPage:294', - 'MembersPage:483', - 'InboxPage:700', - 'SpellbookPanel:484', -]); - -/** Real markup for each migrated site — matches what the actual component renders, - * including the wrapper classes (`card cf-card ...`, `cf-inset`, `.btn.btn-primary`) - * that decide whether the utility actually wins the cascade. */ +/** Real markup for each migrated site — matches what the actual component renders. */ const REAL_SITES: Record = { 'AudienceField:61': '

x

', @@ -80,33 +59,12 @@ const REAL_SITES: Record = { '
x
', 'EncounterWhisperComposer:65': '
x
', - 'CampaignAuditPage:294': - '
x
', 'AuditLogCard:173': '
x
', 'ResetRequestsCard:117': '
x
', 'SpellbookPanel:463': '
x
', - 'SpellbookPanel:484': - '', - 'MembersPage:483': - '
x
', - 'InboxPage:700': - '
x
', -}; - -/** A bare reference element carrying ONLY the color-affecting utility classes for the - * same site, with no `Card`/`cf-inset`/`.btn` wrapper class to compete with it. If the - * utility genuinely wins the cascade, the real site's computed color equals this - * reference's. Proves the utility class itself is correct even for sites where the - * real markup is currently overridden (diagnostic value, not just a pass/fail). */ -const REFERENCE_SITES: Record = { - 'CampaignAuditPage:294': - '
x
', - 'MembersPage:483': '
x
', - 'InboxPage:700': '
x
', - 'SpellbookPanel:484': '', }; async function normalizedColor(page: import('@playwright/test').Page, cssColor: string): Promise { @@ -122,12 +80,13 @@ async function normalizedColor(page: import('@playwright/test').Page, cssColor: } test.describe('warning-token migration: computed cascade (#2161)', () => { - test('measures every migrated site\'s ACTUAL painted color, not just its source class', async ({ page }) => { - const allHtml = [...Object.values(REAL_SITES), ...Object.values(REFERENCE_SITES)].join('\n'); + test('every migrated site ACTUALLY paints --color-warning, not just references it in source', async ({ page }) => { + const allHtml = Object.values(REAL_SITES).join('\n'); await renderCssFixture(page, `
${allHtml}
`); - // Reference token/fallback colors, resolved the same way the real elements are — - // no hardcoded hex literals to go stale if the palette changes. + // No-op fallback colors, resolved the same way the real elements are — no hardcoded + // hex literals to go stale if the palette changes. Any migrated site whose computed + // color still equals one of these has regressed onto an unlayered wrapper rule. const tokens = await page.evaluate(() => { const probe = document.createElement('div'); document.body.appendChild(probe); @@ -135,18 +94,14 @@ test.describe('warning-token migration: computed cascade (#2161)', () => { probe.style.backgroundColor = `var(${v})`; return getComputedStyle(probe).backgroundColor; }; - const out = { divider: read('--color-divider'), cfCard: read('--cf-card'), cfSurface: read('--cf-surface') }; + const out = { divider: read('--color-divider'), cfCard: read('--cf-card') }; probe.remove(); return out; }); const noOpBorder = await normalizedColor(page, tokens.divider); const noOpBg = await normalizedColor(page, tokens.cfCard); - // --cf-card and --cf-surface are the same value today (both alias --color-surface); - // assert that rather than assume it, since the no-op detection below depends on it. - expect(await normalizedColor(page, tokens.cfSurface)).toBe(noOpBg); - for (const [site, html] of Object.entries(REAL_SITES)) { - void html; + for (const site of Object.keys(REAL_SITES)) { const el = page.locator(`[data-site="${site}"]`); const { border, bg } = await el.evaluate((node) => { const cs = getComputedStyle(node); @@ -155,54 +110,12 @@ test.describe('warning-token migration: computed cascade (#2161)', () => { const normBorder = await normalizedColor(page, border); const normBg = await normalizedColor(page, bg); - if (KNOWN_INERT.has(site)) { - // Documents the CURRENT bug precisely rather than hiding it. If this assertion - // starts failing, it means the site's color-effectiveness changed — update - // KNOWN_INERT (and this comment) as part of whatever change caused it, don't - // just delete the assertion. - const reference = REFERENCE_SITES[site]; - expect(reference, `${site} is in KNOWN_INERT but has no reference fixture`).toBeTruthy(); - const refEl = page.locator(`[data-site="ref:${site}"]`); - const refStyle = await refEl.evaluate((n) => { - const cs = getComputedStyle(n); - return { border: cs.borderColor, bg: cs.backgroundColor }; - }); - const refBorder = await normalizedColor(page, refStyle.border); - const refBg = await normalizedColor(page, refStyle.bg); - if (site === 'SpellbookPanel:484') { - // The button's background is fully transparent (unlayered `.btn { background: - // 0 0 }`), not the cf-card/cf-inset divider/surface fallback the other three - // KNOWN_INERT sites paint — different unlayered rule, same root cause. Only the - // background was migrated here (no border utility was touched), so only the - // reference's background is meaningful to check. - expect(normBg, `${site}: expected still-transparent (see file header)`).toBe(await normalizedColor(page, 'rgba(0,0,0,0)')); - expect(refBg, `${site}: the bare bg-[var(--color-warning)] utility must still resolve to the token`).not.toBe(noOpBg); - continue; - } else if (site === 'MembersPage:483' || site === 'InboxPage:700') { - // Border-only migration (cf-inset never carried a bg-* utility here) — only the - // border comparison is meaningful; the reference element has no bg-* class at - // all, so its (always-transparent) background proves nothing about this bug. - expect(normBorder, `${site}: expected still on --color-divider (see file header)`).toBe(noOpBorder); - expect(refBorder, `${site}: the bare border-[var(--color-warning)] utility must still resolve to the token`).not.toBe( - noOpBorder, - ); - continue; - } else { - // Only CampaignAuditPage:294 reaches here — migrated both border and background. - expect(normBorder, `${site}: expected still on --color-divider (see file header)`).toBe(noOpBorder); - expect(normBg, `${site}: expected still on --cf-card/--cf-surface (see file header)`).toBe(noOpBg); - // The bare utility classes DO resolve to the token — confirms the bug is the - // unlayered wrapper rule (cf-card), not the utility classes themselves. - expect(refBorder, `${site}: the bare utility classes must still resolve to --color-warning`).not.toBe(noOpBorder); - expect(refBg, `${site}: the bare utility classes must still resolve to --color-warning`).not.toBe(noOpBg); - } - } else { - expect(normBorder, `${site}: border must not have fallen back to --color-divider`).not.toBe(noOpBorder); - if (site !== 'ResetRequestsCard:117') { - // ResetRequestsCard:117 only migrated the border; it never had a background - // utility (transparent before and after), so there is no bg fallback to check. - expect(normBg, `${site}: background must not have fallen back to --cf-card/--cf-surface`).not.toBe(noOpBg); - } + expect(normBorder, `${site}: border must not have fallen back to --color-divider`).not.toBe(noOpBorder); + if (site !== 'ResetRequestsCard:117' && site !== 'SpellbookPanel:463' && site !== 'EncounterWhisperComposer:65') { + // These three only migrated the border (never had a bg-[var(--color-warning)] + // utility — their background is a different, untouched value), so there is no + // bg fallback to check for them. + expect(normBg, `${site}: background must not have fallen back to --cf-card`).not.toBe(noOpBg); } } }); diff --git a/apps/web/e2e/tests/warning-token-migration.unit.spec.ts b/apps/web/e2e/tests/warning-token-migration.unit.spec.ts index 8b0ed8282..46d781b20 100644 --- a/apps/web/e2e/tests/warning-token-migration.unit.spec.ts +++ b/apps/web/e2e/tests/warning-token-migration.unit.spec.ts @@ -6,17 +6,31 @@ * banner, a "shown once" disclosure, a disabled-feature notice, …) untouched. * This suite pins the SOURCE at each migrated site so a future edit cannot * silently drop it back onto a raw `amber-*` class. It is deliberately a - * cheap, fast smoke check, not the authoritative correctness check — - * `warning-token-cascade.spec.ts` (browser-backed) is that: this codebase's - * `index.css`/`nocturne.css` are imported unlayered, which always beats a - * layered Tailwind utility (including an arbitrary-value one) regardless of - * specificity or source order, so a source string can be byte-identical - * between a working migration and a completely inert one. Real measurement - * found FOUR of the sixteen sites below are exactly that trap — see - * `warning-token-cascade.spec.ts`'s file header for the full mechanism and - * the `KNOWN_INERT` list. This spec still asserts the source presence at - * every one of the 16 (necessary, not sufficient), and additionally asserts - * an exact PER-FILE occurrence COUNT for files with more than one migrated + * cheap, fast smoke check, **necessary but not sufficient** — a source string + * can be byte-identical between a working migration and a completely inert + * one whenever the element renders through a component (``, `cf-inset`, + * `.btn`) carrying an unlayered `background`/`border` shorthand, since + * `index.css`/`nocturne.css` are imported unlayered and always beat a layered + * Tailwind utility (including an arbitrary-value one) regardless of + * specificity or source order. `warning-token-cascade.spec.ts` + * (browser-backed, real `getComputedStyle`) is the check that actually proves + * a site paints the right color; run it, don't just read this one, before + * trusting a "migrated" claim on this codebase's design-system classes. + * + * That trap caught 4 of this PR's original 16 candidate sites + * (`CampaignAuditPage.tsx:294` via ``'s `cf-card`, `MembersPage.tsx:483` + * and `InboxPage.tsx:700` via `cf-inset`, `SpellbookPanel.tsx:484` via + * `.btn`'s `background: 0 0` reset) — all four were reverted rather than + * shipped as source that claims `--color-warning` while painting + * `--color-divider`/`--cf-card`/transparent. Filed as a follow-up issue + * (warning-semantic variants for `.cf-card`/`.cf-inset`/`.btn`) rather than + * fixed here with an `!important` escape or a new unlayered modifier class — + * both are real design decisions, not mechanical fixes, and out of scope for + * a color migration. The 12 sites below are confirmed, by that same + * computed-style measurement, to actually paint `--color-warning`. + * + * This spec asserts source presence at each of the 12, with an exact + * PER-FILE occurrence COUNT for files with more than one migrated * declaration (`VisibleToPlayersBar.tsx`: 2, `RunSessionPage.tsx`: 3) — * matching only "at least one" would let one of several sites silently * regress back to raw amber while the others keep the test green. @@ -25,16 +39,7 @@ * single flat hex, unlike `--color-danger`'s multi-role family * (`--color-danger`, `--color-danger-solid*`, `--color-danger-border`, * `--color-danger-focus`, `--color-danger-ghost-*`, `--color-danger-disabled-*`). - * Only the non-text roles (border, background tint, and one solid-fill site - * where source-level `amber-600` was already the closest Tailwind step to - * `--color-warning`) were migrated. Measured in a real Chromium canvas - * against this app's actual compiled theme (Tailwind v4 ships its palette as - * oklch, not hex) rather than assumed: `amber-600` resolves to rgb(225,113,0), - * `--color-warning` to rgb(217,119,6) — close but NOT byte-identical, so this - * is a small, deliberate, contrast-checked color move, not a no-op formalization. - * (The white-on-button contrast number reported for `SpellbookPanel.tsx:484` - * against this pairing was later found to describe a background that is - * never actually painted there — see `warning-token-cascade.spec.ts`.) + * Only the non-text roles (border and background tint) were migrated. * Readable warning TEXT color, dark "muted surface" tints (`amber-950/*`), and * decorative/selection uses of amber are deliberately left alone — see the * PR description for the full excluded population and why. This guard @@ -67,21 +72,12 @@ interface MigratedSite { const MIGRATED_SITES: MigratedSite[] = [ { file: 'features/encounters/SpellbookPanel.tsx', - bannedPatterns: [/border-amber-500\/50/, /bg-amber-600\b/], - requiredPatterns: [ - { pattern: /border-\[var\(--color-warning\)\]\/50/g, count: 1 }, - { pattern: /bg-\[var\(--color-warning\)\]/g, count: 1 }, - ], - }, - { - file: 'features/admin/MembersPage.tsx', - bannedPatterns: [/border-amber-600\/40/], - requiredPatterns: [{ pattern: /border-\[var\(--color-warning\)\]\/40/g, count: 1 }], - }, - { - file: 'features/notes/InboxPage.tsx', - bannedPatterns: [/border-amber-600\/40/], - requiredPatterns: [{ pattern: /border-\[var\(--color-warning\)\]\/40/g, count: 1 }], + // Only the modal border (:463) is migrated. The confirm button's bg-amber-600 + // (:484) was reverted (#2203 review) — it renders through `.btn`, whose unlayered + // `background: 0 0` (nocturne.css) made bg-[var(--color-warning)] a no-op there; + // see the file header and the follow-up issue tracking a proper fix. + bannedPatterns: [/border-amber-500\/50/], + requiredPatterns: [{ pattern: /border-\[var\(--color-warning\)\]\/50/g, count: 1 }], }, { file: 'components/AudienceField.tsx', @@ -118,11 +114,6 @@ const MIGRATED_SITES: MigratedSite[] = [ bannedPatterns: [/rounded-lg border border-amber-500\/30 bg-neutral-900\/90/], requiredPatterns: [{ pattern: /rounded-lg border border-\[var\(--color-warning\)\]\/30 bg-neutral-900\/90/g, count: 1 }], }, - { - file: 'features/admin/CampaignAuditPage.tsx', - bannedPatterns: [/border-amber-500\/30 bg-amber-500\/5/], - requiredPatterns: [{ pattern: /border-\[var\(--color-warning\)\]\/30 bg-\[var\(--color-warning\)\]\/5/g, count: 1 }], - }, { file: 'features/admin/AuditLogCard.tsx', bannedPatterns: [/border-amber-500\/30 bg-amber-500\/5/], diff --git a/apps/web/src/features/admin/CampaignAuditPage.tsx b/apps/web/src/features/admin/CampaignAuditPage.tsx index ae821ce74..3d6bc29f8 100644 --- a/apps/web/src/features/admin/CampaignAuditPage.tsx +++ b/apps/web/src/features/admin/CampaignAuditPage.tsx @@ -291,7 +291,7 @@ export default function CampaignAuditPage() {
- +

Audit retention disclosure

{retention diff --git a/apps/web/src/features/admin/MembersPage.tsx b/apps/web/src/features/admin/MembersPage.tsx index 1e4a88928..210adc196 100644 --- a/apps/web/src/features/admin/MembersPage.tsx +++ b/apps/web/src/features/admin/MembersPage.tsx @@ -480,7 +480,7 @@ function InviteCard({ campaignId }: { campaignId: number }) { {!invitesEnabled && (

Public invites are suspended — outstanding join links return as invalid until you re-enable them. diff --git a/apps/web/src/features/encounters/SpellbookPanel.tsx b/apps/web/src/features/encounters/SpellbookPanel.tsx index db8acbfb6..ef7e27539 100644 --- a/apps/web/src/features/encounters/SpellbookPanel.tsx +++ b/apps/web/src/features/encounters/SpellbookPanel.tsx @@ -481,7 +481,7 @@ export function SpellbookPanel({