feat(hub): launcher command-binding, terminal digest & session-navigation#109
Merged
Merged
Conversation
…tion Promote the downstream "process-control launcher" pattern into the hub's own DevframeViewLauncher, keeping docks/terminals/commands a hub concern: - Launcher gains optional command / terminalSessionId / digest fields, and onLaunch becomes optional. command is the serializable launch path (a viewer dispatches it over hub:commands:execute since a function is dropped when the entry is projected into devframe:docks); terminalSessionId powers a first-class "view in terminal" affordance via hub:docks:activate; digest carries the latest progress line for inline display. - Child-process sessions now keep status live: running -> stopped on a clean exit, error on a non-zero exit or spawn failure, with terminal:session:updated emitted on each transition (terminate()/restart() and signal kills read as deliberate stops, not errors). Previously status was frozen at spawn time. - Every hub client-callable RPC (hub:docks:activate, hub:commands:execute, hub:messages:*, hub:terminals:*) is declared on DevframeRpcServerFunctions, so rpc.call(...) type-checks them and the as-any casts drop out. Docs and tests updated; API export snapshots unchanged (only interface members were added). Created with the help of an agent.
✅ Deploy Preview for devfra ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
antfu
approved these changes
Jul 17, 2026
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
Vite DevTools built a "process-control launcher" downstream (vitejs/devtools#435): a launcher that binds a command, streams a one-line terminal digest, and offers to jump to its terminal session. By devframe's own boundary (docks/terminals/commands are hub concerns) these belong in
@devframes/hub'sDevframeViewLauncher, not as a kit-side superset — mirroring the #431 → #103 precedent (interim Vite-side shim, then absorbed upstream).What
DevframeViewLauncher.launchergains optionalcommand/terminalSessionId/digest, andonLaunchbecomes optional.command— bound command id; the launch button, palette entry, and keybinding share one handler. It is the serializable launch path: a viewer running out of process dispatches it overhub:commands:execute, since a function (onLaunch) is dropped when the entry is projected into thedevframe:docksshared state.terminalSessionId— the tracked session, powering a first-class "view in terminal" action that callshub:docks:activatewith{ sessionId }.digest— latest progress line, author-set viadocks.update(), for inline display.startChildProcesssessions now keepstatusin step with the process:running→stoppedon a clean exit,erroron a non-zero exit or spawn failure, emittingterminal:session:updatedon each transition.terminate()/restart()and signal kills read as deliberate stops, not errors. (Previouslystatuswas frozen at spawn time — a latent bug.) Consumers map session status +getResult().exitCodeontolauncher.status/error.hub:docks:activate,hub:commands:execute,hub:messages:*,hub:terminals:*— is now declared onDevframeRpcServerFunctions, sorpc.call(...)type-checks arguments and return values and theas anycasts inhost.ts/messages.tsdrop out.Notes
createLineDigesthelper and the node-side observe-output API were scoped out of this PR;digeststays a plain author-set field.tsnapisnapshots don't track.DevToolsLauncherExtras) and its client-sidehub:docks:activatedeclaration.Created with the help of an agent.