Skip to content

One editor per workflow hierarchy: nested workflows in any file open in place - #64

Merged
endrix merged 1 commit into
mainfrom
feat/in-place-nested-navigation
Oct 2, 2026
Merged

endrix merged 1 commit into
mainfrom
feat/in-place-nested-navigation

Conversation

@endrix

@endrix endrix commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Phases 1 and 2 of docs/proposals/single-editor-hierarchy.md (#63).

A diagram whose nested workflows live in other files opened a new editor for every one you drilled into: a tab per level, each with its own chat, a Run button that ran the workflow on screen, and its own layout.

The profile flag clientBehavior.nestedNavigation: 'in-place' | 'new-editor' controls this. The default is 'new-editor', so other products are unchanged. With 'in-place', every nested workflow in any file is a view inside the editor of the root (the file opened).

Navigation (client)

  • Drill-down and the breadcrumb send a RequestModelAction for the defining file to the same editor, with the trail from the root.
  • The navigation stack is keyed by the editor's root (stackKey).
  • "Used By" goes in place to an ancestor already in the trail, or to a workflow of the editor's own document. A caller in another file opens as a new root with no trail, as decided in the proposal.
  • New node menu item Open in Its Own Editor (server + client handler) opens a nested workflow's file as a root of its own.

Refresh (host)

  • The refresh context is keyed by the editor the request came from (getDocumentUriForClientId), not the file requested, and it remembers shownSourceUri.
  • Saves, external changes and live preview refresh the view that is shown. For another file the view reloads from disk, because live-preview content is the root's text.
  • The refresh during and after a run reloads the editor's current view (file, workflow, trail) instead of jumping back to the root.

Root anchoring

  • __calDiagramContext gains rootSourceUri, rootWorkflowName and trail. rootOfStack returns the first crumb in place, otherwise the first crumb in the editor's own file.
  • ▶ Run, ⟲ and "Rerun from Here" use the root. Inside a nested view, "Rerun from Here" reruns the root-level instance the view is in (rerunActorFor), since the trace only has root-level steps.
  • The chat panel sends the view's trail with the selection and each message. The turn context names the nested view and the file defining it (viewContextText).

Not in this PR

  • The GLSP-MCP root/view split.
  • Phases 3 to 5: secondary documents saved after undo/redo, the root watching every file in its trail, per-instance layout, and the hierarchy export with the outline.

The container-parity baseline gains the one new handler, dialogram.openInOwnEditor.

Tests

  • in-place drill-down vs. a new editor (mouse listener);
  • refresh of the shown file with its trail, from disk, and as before for the editor's own document;
  • the root of a hierarchy in both modes, the rerun target, and the rerun handler from a nested view;
  • Open in Its Own Editor (handler and menu: offered only for another file's workflow instance);
  • the chat view context.

All workspaces pass, with neutrality 5/5 and typecheck 5/5. wfpy-ide turns the flag on in a separate PR.

https://claude.ai/code/session_015VK7fH1c4aKbexnq2QcuKU

…in place

A diagram whose nested workflows live in other files opened a new editor
for every one drilled into -- a tab per level, each with its own chat, a
Run button running the workflow on screen, and its own layout. With the
profile's `nestedNavigation: 'in-place'` (default `'new-editor'`, so other
products are unchanged), a drill-down or breadcrumb into any file shows
that workflow in the same editor, as a view of the editor's root:

- the client keys its navigation stack by the editor's root, and "Used By"
  goes in place to an ancestor, or opens a caller in another file as a new
  root with no trail;
- the host keys the refresh context by the editor the request came from
  and remembers the shown file, so saves, external changes and live
  preview refresh the view shown (another file from disk);
- the root runs: ▶ Run, ⟲ and "Rerun from Here" use the root, the latter
  rerunning the root-level instance a nested view is in, and a refresh
  during a run keeps the view rather than jumping to the root;
- the chat stays the root's, and its turn context now names the nested
  view on screen and the file defining it;
- "Open in Its Own Editor" on a nested workflow opens its file as a root
  of its own.

Phases 1 and 2 of docs/proposals/single-editor-hierarchy.md.

Claude-Session: https://claude.ai/code/session_015VK7fH1c4aKbexnq2QcuKU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant