Repository navigation
feat(agent): show_view opens the user's App Builder or canvas beside the chat - #3349
Merged
Merged
Conversation
useChatMessages takes an optional `controller` and returns the one it drives. A passed controller is the caller's: the hook makes none and never stops it, so a chat drawn again by a layout change keeps its running turn. Without one the hook behaves as before. The controller also holds the composer's unsent text, and ChatInputField starts from it and writes to it when its `turn` has a `draft`, so a half-typed message survives the redraw too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An open conversation now has one AgentSession, kept in a module map by id. Every tab of it, and a tab a layout change draws again, gets that instance and shows its one chat: the first tab's useChatMessages makes the TurnController and the session adopts it; later tabs pass it back. The session runs the chat's request, saves the rows when the chat goes idle, and closes only when the host says the chat is really gone (AgentHost.onChatClosed): it stops a running turn, saves the rows after the stop, and leaves the map. A reopen waits for those saves before it reads the file. attach, detach and the mount count go. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rocket-ui host implements onChatClosed. It watches Documents and calls back once when the conversation's tab document is gone (its last tab closed) or Documents was destroyed (a team switch). A tab a layout change draws again keeps its document, so a split or a moved tab no longer stops the agent's turn. It checks once at subscribe, which catches a tab closed while the session loaded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A dev session joined the change bus only after its batch read, so a file written during the read was never adopted: the preview and check_app kept the old text until the next write to that file. The session now joins the bus before it reads the tree, holds what arrives until the models exist, then adopts it. Adopting re-reads the file and leaves a model that already matches alone. A failed open still keeps no subscription. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The builder read its stage pref once, so a write from outside the screen did nothing to an open builder. It now reads the pref again when it subscribes and on every change, through a new optional IAppBuilderHost.subscribePrefs that rocket-ui's web host implements over its prefs store. STAGE_PREF_KEY is exported so the agent can write the same key. VS Code has no subscribePrefs and keeps today's read-once behavior. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
showBeside puts the user's App Builder or pipeline canvas beside a chat using only Documents' existing verbs. A view already showing in another group comes to the front there, so a canvas never gets a duplicate. Otherwise it goes to the chat's layout neighbour, or to a new group split off to the right when the chat's group is the only one; a view in the chat's own group moves out rather than opening twice. The chat is shown and its group made active last. It throws when a team switch tore the editor area down mid-open or the view did not open. host.ts gains the UserView union the placement and show_view share. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
show_view takes one path, as list_workspace gives it: an app's folder (apps/<folder>) or a pipeline file. It resolves the path to a UserView, refusing every other spelling with its fix, and hands it to the host. rocket-ui's host switches an app's builder to Design through its stage pref, then places the view beside the turn's chat. The tool is mounted only on a host with showView, and it is free: it changes only what is on screen. writePaths now holds the app or pipeline a show_view names, and the app a check_app names, so same-step edits, views and checks of one app run in the order the model lists them. A check by id or name orders against nothing, as before. The WORDS text waits for Dylan's approval (TODO marker on the constant). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AppBuilderProvider made its prefs mirror in useMemo and disposed it in an effect cleanup. In dev, StrictMode replays that effect, so the builder kept a mirror that was already disposed before its first snapshot arrived: it never saw a stored stage or show_view's switch to Design, and each open left one subscription behind. It now reads the app's partition through appPrefsStore, the realm hub's one mirror, which the dev-tool strip and the agent already use. Nothing is disposed per mount, and the builder sees the agent's write at once. This also drops the provider's deep shell import. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
show_view teaches the model apps/<folder>, and the model carried it over: check_app apps/daybook-ui failed with "No app" and cost a step. findApp now drops one leading apps/ before it matches a folder, so check_app, deploy_app, publish_app and use_app all take that form. An id or a name still matches only as given. The loop keys use_app and check_app on the same spelling, so the ordering key stays apps/<folder>, never apps/apps/<folder>. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A split draws the chat's group again, so MessageList mounts anew. It smooth-scrolled to its end on mount, but Allotment sizes a new split pane only after mount: the scroll aimed at the end of a wider list and stopped short of the narrower one's, and its own scroll events had already unpinned it. A waiting approval card could sit out of view. On mount the list now jumps to its latest row before paint, and while pinned it keeps it when its pane is resized. New rows still scroll in smoothly, and a user who scrolled up is left where they are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The agent opened the builder on its own for app work but only opened the canvas when asked. Naming an app's screens and a pipeline as things the user can see covers both. Dylan approved the wording, so the TODO(Dylan) marker goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dylan-savage
requested review from
Amitabh1998,
Rod-Christensen,
jmaionchi and
stepmikhaylov
as code owners
November 18, 2026 19:27
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review: 2
Please check the settings in the CodeRabbit UI or the
|
6 of 9 tasks
Contributor
🤖 Internal: Discord sync markerAuto-managed by the Discord notification workflow. Stores the linked Discord message ID and forum thread ID. Do not edit or delete. |
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
The agent now shows its work. When it changes an app or a pipeline, it first calls
show_view, and the user's own App Builder (on Design) or pipeline canvas opens beside the chat. Each change appears there as the agent saves it. Until nowshow_viewwas an unmounted stub on this branch.Opening a view beside the chat splits the editor area, and a split used to stop the running turn. The chat remounted and its hook stopped the turn on unmount. Now the conversation owns its live chat, and a tab only shows it.
This PR merges into
feat/rocket-agent-browser, notdevelop.show_view {path}takesapps/<folder>orpipelines/<name>.pipe. It is mounted only when the host hasshowView. A view that is already open comes to the front. Otherwise it opens in the group beside the chat, splitting the area if there is one group. The chat never moves and keeps focus.AgentSessionowns theTurnController, anduseChatMessagestakes an optionalcontrollerthat it never creates or stops. A split, a dragged tab, or a closed neighbour keeps the messages, the queue, waiting approval cards, Stop, and the half-typed message. Closing the chat tab or switching teams still stops the turn.show_viewswitches an open builder to Design without reloading it.AppBuilderProvider's prefs mirror, so stage changes never reached the builder. It now reads the realm hub's store for the app.check_appanduse_appalso takeapps/<folder>.Type
Feature
Scope
node_previewwaits for custom nodes.PipelineEditor.tsxhas the same StrictMode prefs bug. It is not fixed here.dispose()removes them from the live set. The cause is not traced.Blast radius
The shell chat changes reach every chat:
useChatMessages,TurnController,ChatInputField, andMessageList. The new options are optional, and a caller that passes no controller works as before../builder shell:checkpasses with no contract change. Rod's App Builder gets the stage follow, through an optionalsubscribePrefson its host, and the two fixes above.Testing
apps/vscode(both configs),apps/shared,apps/rocket-ui, andpackages/shell.apps/aparavi-uihas the same 2 errors as the base. Eslint adds nothing new on the changed files.show_viewon its own, before its first edit, 5 times out of 5.show_view's split, a drag to split, Split Right, and Close group. Closing the chat tab stopped it, and reopening read it back.check_appright aftershow_viewbuilt in the user's preview../builder testin full: not run.Checklist
Linked Issue
None.
🤖 Generated with Claude Code