unsloth/studio/frontend/src/lib
Michael Han c4908b7929
studio: fix toast close-button click and light-mode hover (#5597)
Two related issues on the chat toasts:

1. Close X did nothing. The lib/toast.ts wrapper defaulted every toast
   to `dismissible: false` (originally to keep swipe capture from
   stealing text selection). In sonner v2, `dismissible: false` makes
   the close-button onClick a no-op, so the X looked clickable but
   never dismissed the toast. The Toaster already sets
   `swipeDirections={[]}` in components/ui/sonner.tsx, so the
   per-toast swipe workaround is unnecessary and harmful. Replace the
   wrapper with a thin re-export of sonner.

2. Close X hover collapsed to a near-black circle in light mode.
   Sonner's default close-button styling uses fixed gray-scale tokens
   (--gray2 hover, --gray12 text) that ignore the theme attribute.
   Once the Toaster's inline style overrides --normal-bg with
   var(--popover), the base background follows the app theme but the
   hover state does not, so the hover bg lands on a color that has no
   contrast with the X glyph. Pin both base and hover to theme tokens
   (--popover, --muted, --popover-foreground, --border) so contrast
   stays visible in both light and dark modes.

Repro: open chat, load any cached model, hover the X on the
"<name> loaded" toast in light mode -- before this change the circle
turned dark and the click did nothing; after, the circle stays light
and the click dismisses the toast.
2026-05-19 00:55:55 -07:00
..
api-base.ts Harden Tauri release flow (#5341) 2026-05-12 20:30:20 -07:00
audio-utils.ts Update license headers 2026-03-12 17:23:10 +00:00
copy-to-clipboard.ts fix: prefer mainstream clipboard copy over deprecated one (#5109) 2026-04-20 23:18:18 +04:00
format-fastapi-error.ts studio/frontend: wire logout, singleflight refresh, shared 422 helper, current-password input (#5490) 2026-05-18 00:03:03 -07:00
hf-cache.ts fix: throttle and cache HuggingFace modelInfo API calls (#4696) 2026-03-31 02:21:17 -07:00
latex.ts Studio: stop currency escape from breaking inline LaTeX (#5170) 2026-04-24 09:06:01 -07:00
native-notifications.ts Add Tauri native notifications (#5273) 2026-05-05 00:09:48 -07:00
open-link.ts Add tauri (#5144) 2026-04-23 04:50:10 -07:00
tauri-diagnostics.ts Fix Studio desktop tray installer and titlebar and bux fixes (#5179) 2026-04-30 08:40:39 -07:00
toast.ts studio: fix toast close-button click and light-mode hover (#5597) 2026-05-19 00:55:55 -07:00
utils.ts Update license headers 2026-03-12 17:23:10 +00:00
vram.ts feat(studio): add Continued Pretraining (CPT) as a training method (#4677) 2026-05-06 13:38:35 +04:00