Repository navigation
feat: a status source, node states from a report drawn with the run overlay - #101
Merged
Merged
Conversation
…verlay A product whose diagram is a specification wants to paint the report its tool makes about it (which requirements are covered, which are not) the way a run paints its progress. The platform had half of that: the execution overlay's `publish(sourceUri, states)` and a `states` field on its webview payload. But nothing sent published states to a diagram, nothing drew them, and the only way to reach the overlay was a run driver, which assumes a workflow runtime's run, stream and artifacts. - Published states are drawn. Each change goes to the webview as the whole set, over the ungated path the events use, and again when an editor registers for the source. The client puts the run overlay's own classes on the nodes (`running` the ring, `succeeded` green, `failed` red) with a GLSP feedback command that matches against each model it is applied to, so the states outlive a save and a relayout and follow a view change in place. The registry keys states through the replay window's URI canonicalization. - A state finds its node by the producer's id: every node now keeps the id its graph document gave it as `wf:graphNodeId`, since the diagram names a node after its label. - `DiagramProfile.statusSource`: a label, a show and a clear command, and `collect(file)` returning `ExecutionNodeState[]`. The platform registers the commands, offers "Show <label>" and "Clear <label>" on the canvas's context menu (derived into `clientBehavior.statusSource`), and publishes what `collect` answers into the overlay a run driver gets as `DiagramRunHost.overlay`. A failure is reported and changes nothing; a Clear wins over a Show still collecting. - `SidecarProfileInput.statusSource`: the same, with `collect(file, cli)`, where `cli(args)` runs the configured CLI in the file's folder with the graph-load deadline and resolves to its JSON whatever the exit code. Claude-Session: https://claude.ai/code/session_01E8WfqKknDNN6xpNVcJL5K8
3 of 4 tasks
Review of #101: Clear took the run classes off every node a state named, even one a live run had marked with the same class, and that run state was gone until the next model. The states now remember which classes they added (per element) and taking them off removes only those. 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.
Summary
A product whose diagram is a specification wants to paint the report its tool makes about it (which requirements are covered, which are not) the way a run paints its progress. The platform had half of it: the execution overlay's
publish(sourceUri, states)and astatesfield on its webview payload. Nothing sent published states to a diagram, nothing drew them, and the only way to reach the overlay was a run driver, which assumes a workflow runtime's run, stream and artifacts.runningthe turning ring,succeededgreen,failedred,idlenothing) with a GLSP feedback command that matches against each model it is applied to, so the states outlive a save and a relayout and follow a view change in place. The registry keys states through the replay window's URI canonicalization.wf:graphNodeId. The diagram names a node after its label, so a state naming the producer's id matched nothing: every node now keeps the id its graph document gave it, and a state may name either. (feat/panel-linksadds the same constant and line for its#<id>links; whichever merges second resolves a one-line overlap.)DiagramProfile.statusSource: a label, a show and a clear command, andcollect(file)returningExecutionNodeState[]. The platform registers the commands (they take the diagram's URI, as an editor-title menu passes it, or act on the active diagram), offers "Show " and "Clear " on the canvas's context menu (derived intoclientBehavior.statusSource, likechatBackend), and publishes whatcollectanswers into the overlay a run driver gets asDiagramRunHost.overlay. No run driver is needed. A failure is reported and changes nothing; a Clear wins over a Show still collecting; two Shows share one collect.SidecarProfileInput.statusSource: the same withcollect(file, cli), wherecli(args)runs the configured CLI in the file's folder with the graph-load deadline and resolves to its stdout parsed as JSON, whatever the exit code (a CLI that speaks JSON reports its own failures there).status-source.test.ts(12),execution-overlay-states.test.ts(5),diagram-editor-provider-status-source.test.ts(2),execution-states.test.ts(10),status-source-menu.test.ts(6),graph-node-id.test.ts(2),cli-status-source.test.ts(8, against a real child process). The container-parity baseline gains the menu provider, its action handler and the feedback command. CHANGELOG and README entries.Plan item N8 of the ndf-ide plan (phase 4, the coverage overlay). Independent of #90–#99: based on
main, and needs none of them. The ndf-ide shell mapsndf report coverageonto it. Drawn headlessly on a real specification (PicoRV32,trap.md): the unverified contract red, the verified one green, a TBD question with the ring.Test plan
npm run typecheck,npm run check:neutralityvariant-node-create-wizardcases, which take 4 to 5 s of a 5 s budget and import nothing this changes, timed out intermittently; green on the final run.https://claude.ai/code/session_01E8WfqKknDNN6xpNVcJL5K8