Skip to content

Long-chat gate: measure every appearance setting or allowlist it with a reason - #17262

Merged
danielhanchen merged 8 commits into
mainfrom
studio-gate-appearance-coverage
Nov 9, 2026
Merged

danielhanchen merged 8 commits into
mainfrom
studio-gate-appearance-coverage

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

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:

  • the 22 custom appearance settings (appearance-custom-store.ts: contrast, outlines, cursors, font smoothing, code line numbers / wrap / ligatures, chat width, font sizes, fonts, colours, sidebar layout)
  • Glass strength, which scales the blur up to 2x
  • the chat wallpaper, which about 70 Glass rules depend on (data-chat-wallpaper-workspace-ready), plus the wallpaper's own blur
  • palettes (neon-cyberpunk has its own composer focus glow)

Change

  • tests/studio/_appearance_coverage.py reads the appearance settings from the source (the DEFAULT_CUSTOMIZATION keys and each value of their *Setting unions, the persisted Glass store keys, the wallpaper's DEFAULT_ADJUSTMENTS, the palette ids) and scans every .css file for html / :root attributes and classes on rules that set backdrop-filter, filter, animations, will-change, mix-blend-mode, masks or box-shadows.
  • Each item must map to a gate mode or to an allowlist entry with a reason. tests/studio/test_appearance_coverage.py fails, with a message saying what to add, when a new setting, value or costly root flag is neither.
  • Six new gate modes at 40 turns on the 8 setting-sensitive areas: solid+custom and liquid-3d+custom (the costliest customisation values), solid+wallpaper and liquid-3d+wallpaper (a generated wallpaper seeded into the app's IndexedDB, blur 20), solid+palette (neon-cyberpunk) and liquid-3d+strength-max.
  • Every new mode first checks that its setting reached <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

  • A synthetic html[data-sparkle-trail] rule with an animation, a new sparkleTrail setting and a new chatWidth value each fail the coverage test with a clear message; main and this branch pass (37 tests in test_area_matrix.py and test_appearance_coverage.py).
  • Local gate run of the new modes on this branch (2 runs): thread scroll with a wallpaper 1.5x and 1.6x the default look (3.2x to 4.6x without Studio: bake the blurred chat wallpaper once instead of re-running the blur on every scroll frame #17253), every new cell under its limit.
  • CI cost: about 6 extra pages at 40 turns, roughly 60 to 75 s on top of the gate's ~300 s.
  • Not covered: settings that only exist on WebKit or in the desktop shell are listed as such (the gate runs Chromium).

… 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.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T16:14:29.850658Z 53e51e0 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +16 to +18
def test_every_appearance_setting_is_measured_or_allowlisted():
problems = cov.uncovered(MODES)
assert not problems, "\n".join(problems)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 53e51e0e43

ℹ️ 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".

Base automatically changed from studio-wallpaper-bake to main November 9, 2026 17:09
@danielhanchen
danielhanchen merged commit 655b309 into main Nov 9, 2026
@danielhanchen
danielhanchen deleted the studio-gate-appearance-coverage branch November 9, 2026 20:04
danielhanchen added a commit that referenced this pull request Nov 10, 2026
… 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>`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant