Skip to content

feat(studio): toasts show as a centred pill that rises in - #7714

Merged
miguel-heygen merged 2 commits into
mainfrom
dosstoast/notice-toast
Nov 14, 2026
Merged

miguel-heygen merged 2 commits into
mainfrom
dosstoast/notice-toast

Conversation

@miguel-heygen

@miguel-heygen miguel-heygen commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

What

Studio's toasts become one centred pill that rises in: an inverted fill (dark pill on the light theme, light pill on the dark one), 14px medium text, a 24px radius, and a round Dismiss button on the toasts that stay. They stack at the bottom centre instead of the bottom-right corner.

Why

The old toast was a small bordered card in the corner with 12px text, easy to miss beside the timeline, and an error read only as red text on the same card. The pill is the notice style we want across HyperFrames: one shape for every message, readable at a glance, out of the way of the panels.

Related work

None.

How

  • StudioToast: the pill (bg-text-0 / text-bg-0, so it inverts with the theme), max 680px wide, long messages wrap. A click anywhere on an info toast dismisses it. Error toasts persist until dismissed, so a click on one does nothing (its text stays selectable for copying); they get a 36px round Dismiss button, and Escape works while it has focus.
  • toastPersists(tone) in useToast owns the "errors persist" rule; the hook and the pill both read it.
  • Stack: StudioOverlays centres the toasts in the room the feedback card leaves, so the two never cover each other. Up to 3 toasts, newest at the bottom, as before.
  • Motion: rises 8px from 0.98 scale over 200ms on cubic-bezier(0.32, 0.72, 0, 1); it leaves at once, with no exit animation. Reduced motion: no animation.
  • Timings unchanged: info toasts go after 4s, errors stay until dismissed.
  • New --shadow-notice token in theme.css (colour literals stay in the token file). The feedback card keeps its own look; its surface helper moved into its file, its only user.

Behaviour changes: an info toast has no Dismiss button any more (a click on it dismisses it), and a dismissed toast goes at once instead of after a 160ms fade.

Test plan

  • Unit tests added/updated: StudioToast.test.tsx (info toast dismisses on click and has no button; a click on an error toast keeps it up; its Dismiss dismisses it once). Mutations: dropping the info click, showing the button for every tone, hiding it for errors, and letting a click dismiss an error each fail the test that guards it.
  • src/styles suite (token gate, hex ratchet, theme), useBlockHandlers.test.tsx, tsc --noEmit, oxlint, oxfmt: green.
  • Manual testing performed: the real Studio dev server on a fixture project, headless Chromium, toasts shown through Studio's own showToast, at 1440x900 (dark and light) and 900x600 (dark; light was shot too), plus enter frames and reduced motion.
  • Documentation updated (if applicable): not needed.
  • Comments follow CONTRIBUTING.md "Comments".

Before

Dark, 1440: an info toast, a long error and a short error.

Before, dark, 1440

Light, 1440 (crop):

Before, light, 1440

Dark, 900x600:

Before, dark, 900

Enter, frames at 0, 40, 80, 120, 160 and 200ms:

Before, enter frames

After

Dark, 1440: the same three toasts.

After, dark, 1440

Light, 1440 (crop):

After, light, 1440

Dark, 900x600:

After, dark, 900

Enter, frames at 0, 40, 80, 120, 160 and 200ms:

After, enter frames

Reduced motion, the first frame (fully shown, no rise):

After, reduced motion

The notice style it matches, light and dark:

Reference, light
Reference, dark

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 267 (base branch 267), smooth 119 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (8)

Unstable (3)

  • seqrotatenudge-none-pct-r0-root-z100: tracking 0.03, pressJump 0, drop 0, reload 3.03, render 0.04, renderKey -, undo false, teleport true / tracking 0.03, pressJump 0, drop 0, reload 0, render 0.08, renderKey -, undo true, teleport true / tracking 0.03, pressJump 0, drop 0, reload 0, render 0.08, renderKey -, undo true, teleport true
  • seqrepeat-none-center-r0-root-z100: tracking 0.05, pressJump 0, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true / tracking 0.05, pressJump 0, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true / tracking 0.05, pressJump 0, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true
  • seqfastkeys-none-px-r0-root-z100: tracking 0.06, pressJump 0.05, drop 0, reload 0, render 0.02, renderKey -, undo false, teleport true / tracking 0.07, pressJump 0.05, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true / tracking 0.06, pressJump 0.05, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: REQUEST CHANGES · 2 blocker · 1 important · 0 nits · head 863f18a9

  • blocker — required Studio and player captures is red: "more than 12 capture links; attach fewer, longer clips". The body has 13 (5 Before, 6 After, 2 Reference). Drop one or merge two, for example the two Reference shots, then edit the body to re-run the check.
  • blocker — Comments ratchet is red on StudioToast.tsx (2/39 = 5.1% against 1/51 at the base). ↓ inline
Scope

Read all 7 files at the head. The hf-toast-* keyframes are still used by StudioFeedbackCard, so the CSS relabel is right. --shadow-notice is in the @theme block, and theme.css is outside the hex ratchet. AppToast.tone was already required, so making the prop required is safe. Timer cleanup in useToast is intact now that the exit timer is gone. This is a feat PR, so no 'fails without the fix' line is needed. The CI workflow was still queued at review time.

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: APPROVE — 3 resolved, 0 open, 0 new · 863f18a → 1e7e03f

@miguel-heygen
miguel-heygen added this pull request to the merge queue Nov 14, 2026
Merged via the queue into main with commit 690b07e Nov 14, 2026
124 of 125 checks passed
@miguel-heygen
miguel-heygen deleted the dosstoast/notice-toast branch November 14, 2026 04:26
@heygengenesis heygengenesis Bot mentioned this pull request Nov 14, 2026
1 of 2 tasks
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