Skip to content

Watch node shows values; Test-tab answer survives rail switches - #65

Merged
theUpsider merged 4 commits into
mainfrom
dev
Sep 26, 2026
Merged

theUpsider merged 4 commits into
mainfrom
dev

Conversation

@theUpsider

Copy link
Copy Markdown
Contributor

Summary

Two editor fixes from dev:

  • Watch node shows its value again, for every data type (fix(watch)). The graph runs on the server and the watch has no output slot, so its value never reached the editor and the node stayed empty. The watch now records its input as a trace row (executionDetails) with the detected type; useServerEvents hands that row back to the matching editor node (also inside blocks), which draws the type and the value in its body: string, number, boolean, message, image, [number], [string], [message], object, array, null, undefined, with length/size hints. The run trace now shows every output row's type as well. The value is transient (not in properties or the input label), so a run no longer changes the serialized workflow; old graphs drop the stale 0.000 label on load, and each new attempt clears all watches first.
  • Test-tab answer survives rail switches (fix(preview)). The answer lived in TaskView's local state and was lost whenever a canvas click opened the inspector. The editor now owns it per workflow through useAnswerDraft, mirrored to sessionStorage.

No schema, API or socket-contract changes; the watch reuses the existing nodeExecutionChanged.outputs payload.

Verification

  • Backend jest 622, frontend vitest 266 green on merged dev; yarn typecheck green; yarn lint:check green in an LF worktree.
  • New tests: src/utils/watchNode.test.ts (type detection, formatting, trace row, sizing, legacy label) and a watch case in useServerEvents.test.ts.
  • Watch rendering for all types checked on a canvas verify page with the real LGraphCanvas. Not checked end to end against the debug stack (Docker was unavailable).

🤖 Generated with Claude Code

theUpsider and others added 4 commits September 26, 2026 10:16
The answer lived in TaskView's local state, and the editor unmounts
TaskView whenever a canvas click opens the inspector (or the rail
closes on mobile). Typing an answer, running it and clicking the graph
wiped the text, so comparing assessments across edits meant retyping.

The editor now owns the answer per workflow through useAnswerDraft,
mirrored to sessionStorage so it also survives a trip to the workshop
overview. Only the participant clears it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The graph runs on the server and the watch has no output slot, so its value
never reached the editor and the node stayed empty. The watch now records its
input as a trace row (executionDetails) with the detected type; the editor
hands that row back to the matching watch node, which draws the type and the
value in its body. Strings, numbers, booleans, messages, images, lists and
objects all render; the run trace shows every row's type as well.

The value is kept transient instead of in properties or the input label, so a
run no longer changes the serialized workflow, and old graphs lose the stale
"0.000" label on load. A new attempt clears every watch first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@theUpsider
theUpsider merged commit 37e6740 into main Sep 26, 2026
3 checks passed
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