Skip to content

Frontend tests: read the composer shadow and palette seeds where #12800 left them - #12810

Merged
danielhanchen merged 1 commit into
mainfrom
ci-composer-shadow-tests
Oct 6, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-composer-shadow-tests

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Since #12800 merged, Frontend build + bundle sanity and Frontend unit tests (Windows) fail on main (for example #12800's own run, and #12782's) with two frontend unit tests:

not ok - flavor accents used as text meet the accent-text floor
  error: 'neon-cyberpunk light seeds'
not ok - light mode is the chatbox's background, under a slightly heavier shadow
  error: 'box-shadow is not in the shape this test reads'

Both reproduce on main (6f268e6cc5).

Which side is wrong

The tests. #12800 moved the composer's shadow into a --composer-shadow variable so toasts can share it, set once in :root and overridden for dark mode and the Neon Cyberpunk palettes. The light value is unchanged (0 2px 8px -2px rgba(0, 0, 0, 0.16)), and so is what the composer paints. The two tests read the stylesheet in a shape that no longer holds:

  • find-in-page.test.ts read a literal box-shadow out of .unsloth-composer-surface, which is now var(--composer-shadow).
  • color-themes.test.ts read only the first block opening :root[data-palette="neon-cyberpunk"]:not(.dark) {. Neon Cyberpunk now opens that selector twice, and the new --composer-shadow block comes before the one holding the palette's seeds.

Change

  • find-in-page.test.ts: when a rule's box-shadow is a var(--name), the test reads that variable's value from the light :root block, so it still compares the composer's real light shadow with the find bar's.
  • color-themes.test.ts: reads every block the palette opens with that selector, not only the first.

No product change.

Verification

  • node --experimental-strip-types --test tests/color-themes.test.ts tests/find-in-page.test.ts tests/toast-composer-shadow.test.ts: 2 failures on main, 173 passed on this branch.
  • With the fix in place, each test still fails on what it guards:
    • widening the light --composer-shadow blur to 30px fails the find bar test (its 14px blur is no longer wider than the composer's);
    • setting Neon Cyberpunk light's --th-accent to its page colour (in the second block, which the old test never reached) fails the accent floor test with 1.00:1.

… left them

#12800 moved the composer's shadow into --composer-shadow, set per mode and per
palette. Two frontend unit tests read the stylesheet in a shape that no longer
holds:

- find-in-page compared the composer's literal box-shadow with the find bar's;
  the composer now reads var(--composer-shadow). The test resolves a variable
  to its light :root value, which is what the composer paints in light mode.
- color-themes read the first block opening :root[data-palette=...]:not(.dark),
  and Neon Cyberpunk now opens it twice (the --composer-shadow block comes
  first). The test reads every block the palette opens.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T02:56:06.720729Z 1fb789b 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

Copy link
Copy Markdown

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

Reviewed commit: 1fb789b155

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

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