feat(workbench): application explorer — shell, Application tree, route workspace, one invocation API, page cuts (#600 PR 1) - #629
Merged
Conversation
…envelope, URL model, tree/backend/workspace types)
…ench and the test surface share it
PR 1 deletes hash pages; point the browser pool at pathnames, the compiled Application tree, and a testid contract so acceptance is ready when the shell lands.
…00-pr1-shell # Conflicts: # LANE-NOTES.md
# Conflicts: # packages/workbench/tests/examples-real.e2e.test.ts
# Conflicts: # website/docs/en/examples/mcp-app.mdx # website/docs/en/examples/skills-starter.mdx # website/docs/en/guide/development/workbench.mdx # website/docs/en/guide/start/quick-start.mdx # website/docs/en/reference/runtime-environment.mdx
…Artifact Overview, Routes, Hooks, Lifecycles, and Playground pages go away; Comparisons folds into the Evals Compare tab. Host diagnostics and Artifact keep only the facts the Advanced section still shows.
…pr1-shell # Conflicts: # packages/workbench/tests/artifacts-page.test.ts # packages/workbench/tests/hooks-page.test.ts # rstest.integration-tests.ts
Translate the 19 English pages from the docs-en lane into existing Simplified Chinese voice so locale parity can pass once integration registers AB8231–AB8235.
# Conflicts: # LANE-NOTES.md
… (PR 1 minimal), Advanced, thin main.tsx - shell/workbench-router.ts: History-API router over WorkbenchLocation (popstate, replace-on-same) - shell/workbench-shell.tsx + shell.css: rail Application · Trace · Problems · Advanced, header project · build/epoch · failure badge → /problems · connection; ApplicationArea (320px tree column) - shell/build-status-model.ts + shell-status.tsx absorb overview-model.ts (deleted); Problems model - problems/problems-page.tsx: aggregated diagnostics with route deep links and the Repair (rebuild) flow - trace/trace-page.tsx: this session's invocations from backend history/subscribe, /trace/<id> - advanced/advanced-page.tsx: Evals[Runs|Compare] · Artifact · Protocol · Host diagnostics · Raw logs - main.tsx rewritten thin: no hash routing, pages, or screens; backends + tree + router + shell - workbench-capabilities.ts: pages/pagesFor/WorkbenchPage removed; routes manifest + features - workbench-screen.tsx (dead) deleted; tests added/moved
Move foldAgentDocumentEvents and the node renderers out of
runtime/agent-document-stage.tsx into application/rendered-document.tsx
(RenderedAgentDocument({ events, emptyLabel? })), delete the stage and move
its tests. Extend workspace-contracts.ts with event codec result tabs, the
timings inspector tab, RouteInputFixture, RouteInvocationDraft and
RouteInvocationController.
RouteWorkspace dispatches on leaf.execution to the executable, event, app, skill, or document workspace. Executable routes get the schema-driven input editor (form / raw JSON / CLI args / fixtures / last input), Run with Ctrl/Cmd+Enter, a status line, diagnostics linked to /problems, result tabs (Rendered default, Structured, Raw AgentDocument, MCP and CLI projections, Trace) and a closed-by-default inspector drawer. Event routes add the host selector and codec tabs; app routes embed the MCP App preview beside the bound tool editor.
…t-atoms — no production importer after the route workspace
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
🦋 Changeset detectedLatest commit: 81d84b0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
…ess tree Finding 1: `dist/route-invocation-child.js` was never emitted, so the packed `agent-bundle dev` failed every rendered invocation with "Unable to locate the route invocation render child." Declare it as a private Rslib entry beside `lifecycle-render-child`; the packed test proves the file is in the tarball and renders a tool route from an installed consumer. Finding 3: `renderInChild` dropped the child after its IPC reply, so route or provider code that kept an event-loop handle leaked one process per invocation, and abort only SIGKILLed the immediate child. The child is now forked into its own process group and, after every reply, error, timeout, or close, terminated through `services/process-tree.ts` (SIGTERM, SIGKILL after a grace period) and awaited before the invocation settles, so `RouteInvocationService.close()` drains the children with the pending invocations. Unit tests render a fixture route that sets an interval and forks a descendant and prove both pids are gone after success, timeout, and close.
Drop restated comments, reuse isProcessGone, and narrow recorded pids without non-null assertions.
ScriptedAlchemy
enabled auto-merge (squash)
September 5, 2026 14:41
14 tasks
ScriptedAlchemy
added a commit
that referenced
this pull request
Sep 5, 2026
This was referenced Sep 5, 2026
Closed
ScriptedAlchemy
added a commit
that referenced
this pull request
Sep 5, 2026
…to feat/592-authoritative-manifest
This was referenced Sep 5, 2026
9 tasks
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.
PR 1 of 3 for #600: the Workbench becomes an application explorer. New shell and navigation, the Application tree from the compiled route catalog, a route workspace that renders every route as an Agent Document by default through one invocation abstraction, URL-addressable views, and every cut the issue's audit lists. PR 2 (unified live trace) and PR 3 (embedded host sessions) follow.
Navigation and IA
Primary rail: Application · Trace · Problems · Advanced (Sessions arrives in PR 3). Header: project name · build state and epoch · failure badge (links to Problems) · foreground connection.
The foreground server answers these paths with the shell (
dev/workbench-shell-paths.tsis shared by server and client), so every view is a real URL with history.One invocation abstraction
POST /api/routes/invocationsrenders any compiled route — MCP tool/resource/prompt, CLI route, script, event route (canonical or Claude/Codex/Cursor payload) — through the production RSC runtime in a forked child (route-invocation-child.ts, the same seam asagent-bundle/test'srenderRouteEvents) and returns the render-event stream, final Agent Document, structured result, request context, providers, timings, and MCP/CLI/host projections.GET /api/routes/invocations[/<id>]lists and replays; every completion is aroute.invocationproject event. Plainmain()scripts run through the existingScriptPlaygroundServiceand surface stdout as a text document. Diagnostics:AB8231,AB8232,AB8236–AB8238.The Workbench talks to it through
InvocationBackendwith two implementations:createDevServerBackend(every project) andcreateRuntimeBackend(projects that declaredevRuntime; run history, HMR-aware). The former Runtime Playground's Flight→AgentDocument renderer is extracted toapplication/rendered-document.tsxand is the default result view; the MCP App preview and session controller undermcp/**are reused via import (adapted to the #601 bridge /createAppClient), not forked.Public surface (
agent-bundle, changesetminor)/api/routes/invocationsroutes androute.invocationevent; shell deep-link paths.agent-bundle/test:inspectWorkbenchSurface()returnsapplication(theApplicationTree, withworkbenchLeafPath(leaf)) andadvancedinstead ofpages;WorkbenchPageName/workbenchPageLabelremoved.packages/workbenchis private and not named in the changeset.Deletion ledger
Workbench pages and their models/CSS/tests, deleted — replaced by the Application tree and route workspace:
overview-page.tsx,overview-model.ts,workbench-screen.tsx,skills-page.tsxroutes/routes-page.tsx+ cssroutes-model.tskept for input drafts/validation)hooks/hooks-page.tsx,hooks-model.ts+ cssevent-route-workspace.tsx)lifecycles/lifecycles-page.tsx,lifecycles-model.ts+ cssplayground/playground-{page,model,client}.ts(x)+ css/api/playground/*server routes stay (used by agent-bundle tests and scripts)runtime-playground.tsx,runtime-stage.tsx,runtime-inspector.tsx,runtime-evidence.tsx,runtime/agent-document-stage.tsx,runtime/agent-document-atoms.tsrendered-document.tsx+runtime-backend.ts(engine kept asruntime-controller.ts)mcp/runtime-consent-dialog.tsx,runtime-consent-queue.ts,runtime-mcp-handoff.tscomparisons/**evals/evals-compare*.ts(x))/advanced/hostscut to Host diagnostics (installed / version / path / plugin attach / errors / one MCP handshake); Artifact → path+size tree with hash/mode/provenance behind Detailsrstest.evidence.config.ts, its CI job and script) whose only journey was the Runtime Playground capture; two skipped "legacy Runtime Playground" e2e casesNet: 231 files, +13,970 / −20,395.
Not preserved, and why
#runtime-*): unknown paths resolve to/.Docs
website/docs/en/**andwebsite/docs/zh/**rewritten for the new IA (workbench guide, testing, evaluations, quick start, authoring pages, the four example walkthroughs, references);docs/diagnostics.mdregisters the new codes.pnpm docs:site:buildgreen (0 broken links, parity ok).Browser acceptance
Real Chrome at 1440×900 against
examples/audiobook-curator(audiobook-curator.acceptance.e2e.test.ts) plusskills-starter,mcp-app,hooks-and-scripts(examples-real.e2e.test.ts): populated Application tree, tool run with rendered document, Trace, Problems in the stale-diagnostic state and after Repair, Advanced sections. No capture while a loading/building state is visible. Acceptance surfaced and fixed two dev-server bugs:.js → .tsxspecifier resolution and the react-server/JSX-runtime mismatch in the invocation child; plain scripts routed to the Agent renderer.Gate
pnpm build && pnpm typecheck && pnpm lint && pnpm test:unit(4053 tests),pnpm test:integration:run(1128 passed, 4 skipped pre-existing),pnpm docs:site:build, all on the branch merged withorigin/mainat8b0a6b9c0.Deslop
Deslop: gpt-5.6-sol-medium + cursor-grok-4.6-high-fast, 47 edits (15 on the integrated lanes: duplicated App host context consolidated into
workbenchMcpAppHostContext,as unknown asevent narrowing removed, lane narration comments dropped, responsive CSS removed, pre-integrationworkbench-surfacetest shim deleted in favour of the public test surface; 21 on the e2e remediation: two dead skipped suites −1,231 lines, orphaned imports, restating comments; 11 on the self-review fixes:isProcessGonereused fromtests/support/bin-process.ts,!pid assertions → early throws, restating comments). Integrator follow-up: three modules with no production importer deleted (hooks-model,lifecycles-model,agent-document-atoms).Self-review
Reviewer: gpt-5.6-sol-medium (
change-risk-reviewer), two rounds againstorigin/main.Round 1:
route-invocation-childwas not an Rslib entry, so the packedagent-bundle devcould not fork the renderer. Fixed: private entry besidelifecycle-render-childinrslib.config.ts;dev-workbench-packaging.test.tsnow installs the tarballs into a clean consumer, starts the dev server from the installed package, and renders a tool route.dev/coordinator.tspublish callback,workbench-server.ts); the current source revision still drivesstate: 'stale'. Test inroute-invocation-dev-server.test.ts.SIGKILLonly to the immediate child). Fixed: child forked detached in its own process group,terminateProcessTree+waitForProcessTreeExit(existingservices/process-tree.ts) after every reply/error/abort/close in afinally. Tests: fixture route keeps an interval and forks a descendant; both pids gone after success, timeout, andclose().Round 2 (after fixes; 1 and 3 confirmed closed, plus the
configdeclaration chain confirmed peer-free indist/):4. Warning — stale invocations executed unpublished source (the child imports route modules from source while the pinned manifest is displayed). Fixed: while source is newer than the published epoch, or no epoch is published, every invocation kind answers
409 AB8232("rebuild to run"); the route workspace renders that diagnostic with an Open in Problems link instead of a route crash. The coordinator rebuilds on every change, so the gate only bites while a build is failing or in flight.5. Warning — the initial failed build was treated as published (
latestPublishedPreparedProjectseeded from the pre-build snapshot at startup). Fixed: seeded only from a recovered active epoch whose revision matches; otherwiseunavailableuntil the first publish. Tests: initial failure → 409 → fix → publishes; restart with recovered epoch + failing source stays on the recovered epoch.CI (Release gates / packed pool) also caught: the
configentry's.d.tsgraph reached@agent-bundle/runtimethroughdev/types.ts → route-invocation.ts— split the peer-typed result types intodev/routes/route-invocation-result.ts; and two packed tests still waiting for the deleted "Bundle dashboard" heading — repointed to the new shell.pnpm test:packed: 35 passed, 1 skipped (pre-existing). Requiring a published build also surfaced that three dev-server test fixtures imported@agent-bundle/runtime/React/Zod without declaring them (AB7100provenance) — fixtures now declare their dependencies; no product change.Flake noted, not caused here:
cli.test.ts :: answers --version…failed once under full-pool load (Node stderr noise before the JSON diagnostic), passes alone and in every other run.