Repository navigation
feat: the selection's path, traced across group frames - #109
Merged
Merged
Conversation
Selecting a node draws every path through it: what leads to it in green, what it leads to in blue, the rest faded. After mlir-viewer's trace highlighter, ported onto Dialogram's model: - The walk goes port to port, both ways. A boundary port on a group's frame is passed through without counting the group as a node, so a path follows a cut edge out of one group and into another at any depth, every piece and boundary port of it drawn. - On a cycle, where reachability would light the whole diagram, the trace is cut to the node's direct neighbours. - A selected edge draws all its pieces and its two ends; a selected container, what feeds it and what it feeds across its frame, leaving its members as they are. - A container is never faded: its opacity would fade every member. Opt-in with `clientBehavior.selectionTrace`. The classes go on as GLSP feedback, as published node states do, so the dispatcher re-applies them to every model and a relayout keeps the trace. The listener and command are bound in the base module, so every container has them, the headless one included. `scripts/render-svg --select <id>` selects an element as a click would (the diagram's id or the producer's), to render a trace and look at it. Claude-Session: https://claude.ai/code/session_01E8WfqKknDNN6xpNVcJL5K8
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.
Selecting a node draws every path through it: what leads to it in green, what it leads to in blue, and the rest fades. It is mlir-viewer's trace highlighter (
packages/client/src/trace-highlighter.ts) ported onto Dialogram's model, opt-in withclientBehavior.selectionTrace.How it walks
port:group-boundary, wheresplitEdgesAtGroupscuts an edge) is passed through, so the group never counts as a node on the path. A path follows a cut edge out of one group and into another at any depth, and every piece and boundary port of it is drawn.How it draws
execution-states.ts), so the dispatcher re-applies them to every model and a relayout or an edit keeps the trace.color: its line and arrowhead usecurrentColor, so a product's dash pattern per edge type stays.Tooling.
scripts/render-svg --select <id>selects an element as a click would, by the diagram's id or the producer's (wf:graphNodeId), so a trace can be rendered and looked at.Tests.
selection-trace.test.tshas 13 tests. The nested cases build their models with the server's ownsplitEdgesAtGroups, so the pieces and boundary ports are the ones the client receives. The parity baseline gains exactly the three new registrations.Checked visually with the renderer
20-behavior/trap.md, grouped by layer, withTRAP-CAUSE-001selected: its whole upstream cone across the L2 to L1 frames is green andTRAP-001→PIPE-FSM-001is blue.VER-TRAP-001,trap_haltandPRM-CATCH-001, which touch the path only atTRAP-001, fade.gluegolden with inputaselected: the path througha & b,u_bufand the mux toloandy; the rest fades.Gates.
npm run buildandcheck:neutralitypass. Every test passes except the two known load-flaky ones (session-manager, and the variant wizard's 5 s timeout), which pass when run alone.https://claude.ai/code/session_01E8WfqKknDNN6xpNVcJL5K8