fix(prd-261): theme uploads refuse the first paint the browser would drop #1378
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.45) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 425 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.362
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #1378"
general
weight: 0.35
claude[bot]
Why
Candy 1.0.0 shipped broken on SaaS. Core's upload checks accepted prepaint values, and a look schema, that core's own browser boot code then drops:
roundness, made every look fail with an unknown field.The author only found out on SaaS.
What changes
These checks are upload only, in the new
services/themes/first_paint.py, called by the package reader. The per-boot re-check inserve.theme_prepaintis unchanged, so installs that already exist keep booting.-
color-mix,linear-gradient,radial-gradient,opacity,blur,drop-shadowand_;- the 200-character cap, now one named constant (
contract.PREPAINT_VALUE_MAX).css_value.pyandcss-value.ts.boot-sanitize.tsandmobile_tokens.pynow use it.- The new
frontend/lib/theme-host/first-paint.tsmirrorsfirst_paint.pyusing the browser's ownsanitizePrepaintandlookSpecOf.- The parity test therefore checks the server's rules against what the browser actually does.
- a new
firstPaintsection (8 cases with pinned sentences);-
prepaintDrops(12 cases);- 3 new package cases;
- fixtures re-tabled so hello paints all its knobs.
theme-hostdocs are updated.Live themes
I ran core's real reader on the released packages:
Test plan (CI)
test_prd261_first_paint.py, the theme_package corpus, and mobile_package, boot_files_cache, review_stage and theme_files with their fixtures.validator-parity.test.ts(the firstPaint and prepaintDrops sections),boot.test.ts,publish-theme.test.tsx.The Design Kit's PR applies the same rules to its own
check, the harness and its review job. The kit re-vendorscss-value.tson its next core re-pin.<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Theme packages now receive first-paint checks for values and knob names that the browser would drop, defaults that do not fit, and mismatches between painted knobs and the look schema.
Validation reports specific errors for these cases. Mobile themes using look-based defaults are also checked against the prepaint table.
Documentation
* Updated theme package, mobile, and security guidance to explain first-paint validation and the conditions that cause content to be rejected.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->