feat(core): render message actions as buttons on toast notifications - #526
Open
dvcolomban wants to merge 4 commits into
Open
feat(core): render message actions as buttons on toast notifications#526dvcolomban wants to merge 4 commits into
dvcolomban wants to merge 4 commits into
Conversation
Toasts only exposed the dismiss ✕ button; an entry's own `actions` (e.g. an `activate` action that focuses a dock) were only rendered in the messages panel's detail view. Render them as buttons in the toast's `#actions` slot too, dispatching the same way the messages panel does: `switchEntry(action.activate.dockId)`, the local counterpart of the `hub:docks:activate` RPC our shell already handles in `context.ts`.
`switchEntry('devframes-plugin-messages')` (hyphens) never matched the
actual mounted dock id, `devframes_plugin_messages` (`PLUGIN_ID` in
`@devframes/plugin-messages`'s `constants.ts`) — a typo introduced by
the devframe 0.6 migration (vitejs#396). Clicking a toast to open the
messages panel silently no-op'd; same typo had just been copied into
the new `WithAction` story added alongside toast action buttons.
Manual coverage for the new toast action buttons (previous commit): "Toast: With Action" fires a message with a `view` action that focuses the messages dock, exercising `ToastOverlay`'s new `#actions` rendering and `dispatchAction` end to end alongside the existing Quick Actions.
@vitejs/devtools
@vitejs/devtools-kit
@vitejs/devtools-oxc
@vitejs/devtools-rolldown
@vitejs/devtools-vite
@vitejs/devtools-vitest
commit: |
dvcolomban
marked this pull request as ready for review
August 10, 2026 15:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Toasts only ever showed the dismiss ✕ — an entry's own
actions(e.g. theactivatekind, which focuses a dock) only rendered in the messages panel's detail view, not on the toast that actually announced it.What changed
entry.actionsas buttons in the toast's own#actionsslot, dispatching the same way the messages panel does:switchEntry(action.activate.dockId).switchEntry('devframes-plugin-messages')(hyphens) never matched the dock's real mounted id,devframes_plugin_messages(underscores,PLUGIN_IDin@devframes/plugin-messages'sconstants.ts) — a typo from the devframe 0.6 migration (feat!: migrate to devframe 0.6 — official plugins, crossws + OTP auth #396) that's been silently breaking "click a toast to open messages" ever since.Linked Issues
Additional context
Verified by hand against the playground: firing the new demo toast and clicking its action button focuses the messages dock. Full gate (
pnpm build/test/typecheck/lint) green — 381 tests passing.