fix(frontend): style the paywall header and guard undefined class names
Independent Staging Quality Gate / validate (push) Successful in 10m8s
Independent Staging Quality Gate / publish (push) Successful in 9m39s

The onboarding paywall wrote `dialog-header`, a class no stylesheet
defines, so its close button stacked under the title instead of sitting
beside it. The session-delete confirm buttons had the same problem, and a
`message-entry` wrapper added in August had quietly killed the
`.message + .message` spacing rule in the main chat.

Fixes all three against the patterns already in the codebase, then adds a
contract test so the next undefined class fails instead of shipping: it
scopes itself to our own class families so Tailwind utilities stay out,
strips CSS comments before deciding what counts as defined, and carries
an allowlist of the fifteen deliberate no-op modifiers that must shrink
rather than grow.

Also collapses the paywall's duplicate display heading into the intro
sentence, leaving one heading in the dialog.

BUG-434, BUG-435, BUG-436.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0155nFCgCHtoA7jhSDGmZmMu
This commit is contained in:
Jesse_Chen
2026-08-29 05:40:29 +00:00
parent c960691ee5
commit 0044d4f358
6 changed files with 227 additions and 13 deletions
@@ -84,18 +84,15 @@ export function OnboardingRedeemPaywall({
else keepFocusWithin(event.nativeEvent, event.currentTarget);
}}
>
<div className="dialog-header">
<header className="account-modal-header">
<h2 id="onboarding-paywall-title"></h2>
<button className="dialog-close" aria-label="关闭" type="button" onClick={close} disabled={pending}>
<X aria-hidden="true" />
</button>
</div>
</header>
<div className="paywall-intro">
<span className="paywall-mark" aria-hidden="true"><Gift /></span>
<div>
<b></b>
<p></p>
</div>
<p><b></b></p>
</div>
<div className="redeem-balance">
<span></span>