Repository navigation
Long-chat gate: measure every appearance setting or allowlist it with a reason - #17262
Conversation
… re-run on every scroll frame
… a reason Every appearance setting is read from source (DEFAULT_CUSTOMIZATION, its enum types, the persisted Glass settings, DEFAULT_ADJUSTMENTS, palettes, and <html> flags on rules with costly CSS) and must map to a gate mode or a reason; test_appearance_coverage.py fails on a new uncovered one. New measured modes, short length and variant areas only: solid/liquid-3d +custom (costliest customisation values), +wallpaper (a seeded chat wallpaper with blur), solid+palette (neon-cyberpunk, the palette with its own effect rules) and liquid-3d+strength-max. Each checks its setting reached <html> before measuring.
…f the live filter stays
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c97d29ed5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| def test_every_appearance_setting_is_measured_or_allowlisted(): | ||
| problems = cov.uncovered(MODES) | ||
| assert not problems, "\n".join(problems) |
There was a problem hiding this comment.
Wire appearance coverage checks into CI
The new coverage invariant is only enforced when this test file is explicitly run, but .github/workflows/studio-frontend-ci.yml still uses an explicit pytest file list in its “Dev-server lifecycle tests” step that includes test_area_matrix.py and omits this file. Repository-wide search also finds no call to cov.uncovered() in the browser gate, and default pytest discovery is limited to tests/security by pyproject.toml. Consequently, adding an unmeasured appearance setting or costly root flag still passes the existing CI gate, defeating the main protection this change introduces. Add this suite to the workflow's test list or invoke the coverage validation from the gate itself.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 53e51e0: Frontend CI now runs tests/studio/test_appearance_coverage.py in the same pytest step as test_area_matrix.py, and both coverage files are in the workflow's path filters (studio/frontend/** already triggers it for new settings).
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
… is on by default (#17395) ## Summary `Repo tests (CPU, studio)` is red on `main` since #17377 merged: ``` tests/studio/test_appearance_coverage.py::test_every_appearance_setting_is_measured_or_allowlisted E AssertionError: appearance setting reduceMotion='off' is not measured: set it in CUSTOM_MEASURED or list ('reduceMotion', 'off') in ENUM_ALLOW with a reason ``` #17377 turned Reduce motion on by default. The coverage guard from #17262 requires every appearance value to be the default, measured by the long-chat gate, or allowlisted with a reason. Until #17377 the default was `'off'` (forced motion), which every gate mode measured, so `reduceMotion` sat in `CUSTOM_ALLOW` on that basis. With the default now `'on'`, the costliest value, forced motion, is no longer measured anywhere. The guard is right and #17377 is right; the coverage table needs to follow the new default. ## Changes - `tests/studio/_appearance_coverage.py`: - `CUSTOM_MEASURED` gets `"reduceMotion": "off"`, so the `+custom` gate modes now run with forced motion, the setting's costliest value. - `CUSTOM_EXPECT` gets `force-motion`, the class the store puts on `<html>` for `'off'`, so a renamed key cannot silently measure nothing. - `reduceMotion` leaves `CUSTOM_ALLOW`, whose reason ("default 'off' is what every mode measures") is no longer true. No product code changes; default modes keep measuring the new default. ## Testing - `tests/studio/test_appearance_coverage.py`: 5 passed (fails on `main` as above). - `test_area_matrix.py`, `test_webkit_leg.py`, `test_firefox_leg.py`, `test_appearance_coverage.py`: 91 passed. - Not run here: the long-chat Playwright gate itself, where the `+custom` modes will now also check that `force-motion` reached `<html>`.
Stacked on #17253 (the wallpaper bake): this PR adds wallpaper modes to the long-chat gate, and without #17253 thread scroll with a wallpaper reads 3.0x to 4.6x the default look, over the gate's 4x. Merge #17253 first.
Problem
The long-chat gate measures every material and Glass lens it finds in the source, plus a few fixed variants (menus off, dark). Any other appearance setting was never measured, so a new slow look could ship the way Glass first did. Settings the gate did not reach:
appearance-custom-store.ts: contrast, outlines, cursors, font smoothing, code line numbers / wrap / ligatures, chat width, font sizes, fonts, colours, sidebar layout)data-chat-wallpaper-workspace-ready), plus the wallpaper's own blurneon-cyberpunkhas its own composer focus glow)Change
tests/studio/_appearance_coverage.pyreads the appearance settings from the source (theDEFAULT_CUSTOMIZATIONkeys and each value of their*Settingunions, the persisted Glass store keys, the wallpaper'sDEFAULT_ADJUSTMENTS, the palette ids) and scans every.cssfile forhtml/:rootattributes and classes on rules that setbackdrop-filter,filter, animations,will-change,mix-blend-mode, masks or box-shadows.tests/studio/test_appearance_coverage.pyfails, with a message saying what to add, when a new setting, value or costly root flag is neither.solid+customandliquid-3d+custom(the costliest customisation values),solid+wallpaperandliquid-3d+wallpaper(a generated wallpaper seeded into the app's IndexedDB, blur 20),solid+palette(neon-cyberpunk) andliquid-3d+strength-max.<html>, so a renamed key cannot silently measure the default look; the wallpaper modes also wait for Studio: bake the blurred chat wallpaper once instead of re-running the blur on every scroll frame #17253's baked artwork and report the page broken if the live filter stays.Results
html[data-sparkle-trail]rule with an animation, a newsparkleTrailsetting and a newchatWidthvalue each fail the coverage test with a clear message; main and this branch pass (37 tests intest_area_matrix.pyandtest_appearance_coverage.py).