feat(vue,journeys): downstream feedback — plugin-typed manifests, runtime.discard, template-idiomatic host outlet - #91
Conversation
…time.discard, template-idiomatic host outlet A second consumer feedback round (Vue + Nuxt), triaged critically: some items were already solved and only needed verification/docs; the rest are focused, backward-compatible changes. - installModularApp (@modular-vue/nuxt) and createModularApp (@modular-vue/runtime) no longer erase plugin-extension types. They inferred over ModuleRegistry<…, any> and returned ApplicationManifest<TSlots, TNavItem>, collapsing manifest.journeys to `unknown` and forcing a cast. They now infer the extension map from the registry's resolve() return (the plugin tuple hides behind PluginRuntimesOf and isn't invertible; the extensions ride plainly on ApplicationManifest's third arg), so a journeysPlugin() registry yields manifest.journeys: JourneyRuntime with no cast. Plugin-less callers unaffected. - New JourneyRuntime.discard(id, reason?): end(force) + forget in one call, so a Cancel button drops the persisted blob without re-deriving keyFor(input). Names the "throw it away" intent — the counterpart to a soft close that keeps the blob by not ending the instance. Runs onAbandon and forces the outcome terminal. - <JourneyHost> slot `outlet` is now a stable functional component (was a raw VNode), so the documented `<component :is="outlet" />` actually renders and patches — not remounts — across steps. Slot also exposes `runtime`, enabling the idiomatic `<JourneyOutlet :instance-id :runtime />` alternative. - Verified (no code change): inline `buildInput` entries authored directly inside defineModule (no defineEntry wrapper) now flow buildInput presence into typeof mod, so StepSpec.input goes optional — the behavior a consumer flagged to re-check post-#83. Locked in with regression tests. - Docs + nuxt-modal-journey example: close-vs-cancel contract with runtime.discard recipe, functional-component outlet, appProvides auto-threading (provideJourney- Runtime unnecessary in the plugin path), and the defineNuxtPlugin TS7022 annotation footgun. Example gains a "Cancel (discard)" button + e2e case. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TuYsjBFX8hKizbY5Yep1Bm
|
Warning Review limit reached
Next review available in: 1 minute Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (20)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…gistry, doc precision
- Consolidate the duplicated `InstallableRegistry` helper type: export it once
from `@modular-vue/runtime` and import it in `@modular-vue/nuxt` instead of
re-declaring an identical copy. Drops the now-unused RegistryPlugin /
ModuleRegistry / ResolveOptions imports from the Nuxt installer.
- Clarify `JourneyRuntime.discard` docstring: the force-end cascades to (and
removes the blob of) an active child, but `forget` drops only the target
record — a cascaded child is left as a terminal record for normal terminal
cleanup, exactly as a plain `end` leaves it.
- Fix `keyFor(frameId)` → `keyFor(input)` in the nuxt-modal-journey example so
it matches the canonical `persistence.keyFor({ journeyId, input })` signature
used everywhere else.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Hy8mBdWa8GpEg5bmV8NZE
A second consumer feedback round (Vue + Nuxt), triaged critically: some items
were already solved and only needed verification/docs; the rest are focused,
backward-compatible changes.
installModularApp (@modular-vue/nuxt) and createModularApp (@modular-vue/runtime)
no longer erase plugin-extension types. They inferred over ModuleRegistry<…, any>
and returned ApplicationManifest<TSlots, TNavItem>, collapsing manifest.journeys
to
unknownand forcing a cast. They now infer the extension map from theregistry's resolve() return (the plugin tuple hides behind PluginRuntimesOf and
isn't invertible; the extensions ride plainly on ApplicationManifest's third
arg), so a journeysPlugin() registry yields manifest.journeys: JourneyRuntime
with no cast. Plugin-less callers unaffected.
New JourneyRuntime.discard(id, reason?): end(force) + forget in one call, so a
Cancel button drops the persisted blob without re-deriving keyFor(input). Names
the "throw it away" intent — the counterpart to a soft close that keeps the blob
by not ending the instance. Runs onAbandon and forces the outcome terminal.
slot
outletis now a stable functional component (was a rawVNode), so the documented
<component :is="outlet" />actually renders andpatches — not remounts — across steps. Slot also exposes
runtime, enabling theidiomatic
<JourneyOutlet :instance-id :runtime />alternative.Verified (no code change): inline
buildInputentries authored directly insidedefineModule (no defineEntry wrapper) now flow buildInput presence into
typeof mod, so StepSpec.input goes optional — the behavior a consumer flagged
to re-check post-feat(journeys,core): fix defineModule + derive step ordering/progress (feedback items 3 & 4) #83. Locked in with regression tests.
Docs + nuxt-modal-journey example: close-vs-cancel contract with runtime.discard
recipe, functional-component outlet, appProvides auto-threading (provideJourney-
Runtime unnecessary in the plugin path), and the defineNuxtPlugin TS7022
annotation footgun. Example gains a "Cancel (discard)" button + e2e case.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01TuYsjBFX8hKizbY5Yep1Bm