feat(devtools): unify notifications on the devframe Messages system#1025
Merged
Conversation
Route all Nuxt DevTools notifications through devframe's Messages subsystem so ephemeral toasts and persistent leveled notifications both surface in Vite DevTools' built-in Messages dock and toast overlay. - add a `devtools:notify` hook, a `notify` RPC function and `ctx.notify` that forward into the connected `ctx.messages` host (buffered pre-connect) - wire curated built-in sources (build analysis, module install/uninstall) - re-point the ephemeral `devtoolsUiShowNotification` toast onto the Messages system via the preserved provider seam; retire the bespoke NNotification toast (kept as a no-op shim) - expose `notify` on the injected client for custom tabs / host code
Deploying nuxt-devtools with
|
| Latest commit: |
9d3b4c9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1bcc15cc.nuxt-devtools.pages.dev |
| Branch Preview URL: | https://feat-messages-unification.nuxt-devtools.pages.dev |
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.
Summary
Implements plan 01 — Messages unification. All Nuxt DevTools notifications now flow through devframe's Messages subsystem, so ephemeral toasts and persistent, leveled notifications both surface in Vite DevTools' built-in Messages dock and its toast overlay. Nuxt's bespoke
devtoolsUiShowNotificationtoast is retired to a thin adapter.Built on the landed compat/deprecation foundation (#1021 / #1023) — reaches the connected context via the
onDevtoolsReadyhooks; no queue/plumbing rebuilt.What's included
Server — a notify path into
ctx.messagesdevtools:notifyNuxt hook, anotifyRPC function, andctx.notify, all forwarding to the connectedctx.messageshost. Calls emitted before the kit connects are buffered and replayed on connect.NuxtDevtoolsNotifyInput(a Nuxt-friendly subset of the devframe message entry input).Curated built-in sources (persisted + leveled)
Client — ephemeral toast re-pointed
devtoolsUiShowNotificationis re-implemented over the Messages system (toast-only:notify+autoDismiss+autoDelete, so no dock history), via the preserveddevtoolsUiProvideNotificationFnseam so the UI kit keeps no dependency on the client RPC.Retire the bespoke toast
<NNotification />unmounted; the component is kept as a no-op shim to avoid a hard break on external mounts.Public API
notify(...)exposed on the injected client (client.devtools.notify(...)) for custom tabs / host code.Tiering
level, building history in the Messages dock.Deliberate deviation
The plan floated a nostics soft-deprecation code for
devtoolsUiShowNotification. It was not added:deprecate()is server-side (needs aNuxtinstance) while this helper runs in the browser, and it remains the supported thin ephemeral-toast adapter, so there is no replacement to migrate to.Testing
pnpm build,pnpm typecheck,pnpm lint, andpnpm test:unitall pass.tab-piniaplayground dev server boots cleanly with the new wiring.This PR was created with the help of an agent.