Skip to content

Studio: give toast notifications the composer's shadow - #12800

Merged
shimmyshimmer merged 2 commits into
mainfrom
studio-toast-composer-shadow
Oct 6, 2026
Merged

shimmyshimmer merged 2 commits into
mainfrom
studio-toast-composer-shadow

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Toast notifications now use the same shadow as the main chat composer in light mode, dark mode and the Neon Cyberpunk palette, read from one shared variable.

Changes

  • One shadow variable: --composer-shadow is set in :root (light), .dark, and both Neon Cyberpunk modes. .chat-composer-surface, .unsloth-composer-surface and styled toasts all read it, so the duplicated dark mode shadow lines are gone.
    • Light: 0 2px 8px -2px rgba(0, 0, 0, 0.16). Toasts previously had their own heavier two-layer shadow (0 1px 2px at 4% plus 0 8px 24px -6px at 14%).
    • Dark: the page-coloured 0 4px 20px 4px var(--background), which toasts already used.
    • Neon Cyberpunk: the yellow (light) and cyan (dark) edge glows now show on toasts as well as the composer.
  • Composer focus glows stay composer only. The Neon Cyberpunk :focus-within glows and the docked composer's none are unchanged, since toasts never take focus.
  • Test: toast-composer-shadow.test.ts checks that every composer and toast shadow (other than focus and dock states) reads var(--composer-shadow), and that the variable is set for light, dark and both Neon Cyberpunk modes. A future palette override cannot skip toasts without failing it.

Testing

  • toast-composer-shadow.test.ts passes. The full npm test suite passed on the first commit (10577 tests).
  • Checked in Chrome on the chat page, comparing the composer's and a styled toast's computed box-shadow. They match in light, dark, Neon Cyberpunk light and Neon Cyberpunk dark.
  • The composer's own values are unchanged in all four modes, including its focused Neon Cyberpunk glow.

Light toasts used their own two-layer shadow. They now cast the composer's
(0 2px 8px -2px at 16% black), matching dark mode, where toasts already share
the composer's page-coloured shadow. A test keeps the two in step.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

This comment has been minimized.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

--composer-shadow is set for light, dark and both Neon Cyberpunk modes, and
the composer and toasts read it, so toasts pick up palette glows too. The
composer's focus glows stay composer-only. The test now checks that every
composer and toast shadow reads the variable.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: c0d9013d48

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

@shimmyshimmer
shimmyshimmer merged commit 7ccf3fc into main Oct 6, 2026
@shimmyshimmer
shimmyshimmer deleted the studio-toast-composer-shadow branch October 6, 2026 01:46
danielhanchen added a commit that referenced this pull request Oct 6, 2026
… left them (#12810)

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