Implement Error Toasts#357
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a stacked Toaster notification system, adds zoom and tool Controls to the Atlas editor, updates the Button component to support multiple sizes, and introduces several new icons and color tokens. Feedback on these changes highlights critical issues: in toaster.tsx, the container height calculation when collapsed creates an invisible pointer-blocking area, and the heights state suffers from a memory leak as dismissed toast heights are never cleaned up. Additionally, in atlas.tsx, a CSS variable is incorrectly used for canvas rendering where static RGB values are required, and in button.tsx, making the new size prop required introduces a breaking change that should be resolved by making it optional with a default value.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
b1b8ab3 to
936ad05
Compare
nick-nlb
left a comment
There was a problem hiding this comment.
We can discuss the bigger comment and keep it for another PR, but otherwise the one smaller behavioral comment.
Do you mind also taking some screenshots and including them in the description here, and then pinging miss-o-soup to have a look (in case this is completely new UI/UX). Alternatively, since we're meeting tomorrow anyway, you could give it a demo then.
| } | ||
|
|
||
| /** Singleton store instance used to manage toasts across the app. */ | ||
| export const TOAST_STORE = new ToastStore(); |
There was a problem hiding this comment.
While this currently looks safe as it is because it only ever gets used on the client side, it feels fragile to rely on module state. If toast is ever called accidentally during a server-side render, we could get cross-request contamination.
There's no case of that now, but thinking forward both in terms of this app, but also in terms of reuse of the toast library later (where it might be more of an issue).
What do you think of moving the toast functionality to a React context and completely decoupling it from the server? (This would be a fairly big refactor and so could be a separate PR). In the meantime we could put a guard that prevents toasts from being added if window isn't present.
There was a problem hiding this comment.
I considered using a React context but actually ended up choosing this path to match closer to Sonner's implementation + general DX improvements over needing hook. Happy to put in a guard to prevent toasts being added if window isn't present in the meantime.
Happy to review / move towards context later if it becomes an issue?
Overview
Adds a lightweight in-house toaster (foundations/toaster) based on Sonner.
type-headlinemixin, and a$z-index-toastertokenScreenshots