A workflow hierarchy is read from one cached export, and navigated from an outline - #67
Merged
Merged
Conversation
…om an outline Navigating a hierarchy in one editor ran the runtime's plan for every view drilled into -- a process per level, each nested workflow elaborated standalone rather than as its parent's instance -- and the only way down was one double-click per level. A product that can export a whole hierarchy (`cliHierarchyArgs`) now has every view, root or nested, read from one export per root, kept while every file it came from is unchanged on disk (`hierarchy-cache.ts`); an instance that did not elaborate, or unsaved text being previewed, still gets a plan of its own. The export's tree, without its graphs, reaches the root model as `wf:hierarchy`, and a hierarchy outline modelled on mlir-viewer's shows it: a toggle (and O), a filter that keeps the ancestors of a match, a single click that selects and centers an instance in the view containing it, a double click that opens its view at the trail a drill-down would give, and the current view's row highlighted. Phase 5 of docs/proposals/single-editor-hierarchy.md. Claude-Session: https://claude.ai/code/session_015VK7fH1c4aKbexnq2QcuKU
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.
Phase 5 of
docs/proposals/single-editor-hierarchy.md. The runtime side is huawei-csl/wfpy#45 (wfpy plan --format graph --hierarchy).Navigating a hierarchy in one editor ran the runtime's plan for every view you drilled into. That was a process per level, and each nested workflow was elaborated standalone rather than as its parent's instance. The only way down was one double-click per level.
One cached export per root
cliHierarchyArgs(file, rootWorkflow).CliGraphModelSource.viewFromHierarchythen reads every view, root or nested, from one export per root. The root comes from the trail's first crumb; the view is the instance at the trail's instance path.HierarchyCachekeeps an export while every file it came from (the root's and each nested definition's) has the same content hash, and exports again once any changes.The outline, modelled on mlir-viewer's
outlineOf), reaches the root model aswf:hierarchy(newGraphDocument.hierarchy/HierarchyOutlineEntryin shared).HierarchyOutlinePanelis a model-root listener, shown only when navigating in place and a hierarchy is present.hierarchy-outline-tree.ts, tested headlessly.Not yet: a run's state (running / done / failed) on the rows.
Container parity: the baseline gains exactly the panel's two bindings (self, and as an
IGModelRootListener). I diffed the composition before accepting them.Tests: hierarchy cache and view reading (8), outline helpers and node lookup (8),
wf:hierarchyon the root (2). I also checked the shape of a realwfpy plan --hierarchyexport against what the cache reads. All workspaces pass, with neutrality 5/5 and typecheck 5/5.wfpy-ide supplies
cliHierarchyArgsin a separate PR.https://claude.ai/code/session_015VK7fH1c4aKbexnq2QcuKU