Skip to content

fix: the run overlay holds steady through a run; the eye takes the tokens and sizes off - #111

Merged
endrix merged 49 commits into
mainfrom
fix/run-overlay-flicker
Nov 4, 2026
Merged

endrix merged 49 commits into
mainfrom
fix/run-overlay-flicker

Conversation

@endrix

@endrix endrix commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Two things Endri saw in wfpy-ide: the running ring and the token/queue-size badges appearing and disappearing while a run is on, and the eye on the palette doing nothing when switched off.

Why it blinked. wfpy writes run.wf-viewer.live.json at every firing (with Path.write_text, which truncates first) and the server re-reads it every 400ms. A read that lands mid-write does not parse; readOverlayFromPath returned undefined, and tryLoadLatestViewerOverlay fell through to run-log.jsonl, i.e. the previous run: running=false (ring off), that run's run.wf-queues.json (its sizes on). The next read put things back. At the end of a run the live file was deleted before the run's record was appended to the log, so the previous run showed again for a moment.

Server (source-model-storage.ts)

  • readJsonFileMemo: run-output JSON files are read through a per-path memo keyed on size and mtime; a file that fails to parse is answered with what it last parsed to. Used for the live overlay, the final overlays and the queue trace.
  • From the end of a run (live file says not running, or is gone) until run-log.jsonl records it, the run's last live overlay stands, as finished with nothing active.
  • The eye off (queueTraceVisible === false) now takes VIEWER_LAST_TOKEN and QUEUE_SIZE off every edge (carried colour, token pills, badges), and a stale QUEUE_SIZE is removed when the trace has none for the edge (it was only ever set). Node state is untouched: the ring is the live run, with its own setting.

Client: the eye's tooltip says what it does now.

Tests: test/run-overlay-steady-during-run.test.ts (5): a half-written live file keeps the last good overlay; the overlay stands from the run's end until the log records it; a half-written queue trace keeps the last good trace; the eye off strips the edges; on, draws the trace's size, not a stale one. diagram-server 436/436, diagram-client 351/351, build fine.

The writer side is fixed too, in wfpy (atomic writes, live files deleted after the record): huawei-csl/wfpy PR to follow. Either side alone removes the blink; both belong.

https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv

endrix added 30 commits October 22, 2026 20:30
# Conflicts:
#	packages/diagram-server/src/model/graph-gmodel-source.ts
#	packages/diagram-server/src/server/graph-load-request-options.ts
#	packages/shared/src/diagram-types.ts
# Conflicts:
#	packages/sidecar-toolkit/src/sidecar-diagram-profile.ts
# Conflicts:
#	packages/sidecar-toolkit/test/sidecar-diagram-profile.test.ts
# Conflicts:
#	packages/diagram-client/src/property-panel.ts
#	packages/extension-core/src/extension/diagram/glsp-activation.ts
#	packages/shared/src/diagram-types.ts
Resolution of #92 (Facts) with #100 (Fields): the fields a person edits
come right under Basic Info, ahead of facts that end with a long body.

Claude-Session: https://claude.ai/code/session_01E8WfqKknDNN6xpNVcJL5K8
For looking at a status source's answer without VS Code: the states are
handed to the client as the webview would get them, through the overlay
bridge's painter and GLSP feedback, so what is drawn is what the editor
draws. Local to integration/coverage: the renderer belongs to the
group-scopes branch, not to the status-overlay one.

Claude-Session: https://claude.ai/code/session_01E8WfqKknDNN6xpNVcJL5K8
# Conflicts:
#	packages/diagram-server/src/model/graph-gmodel-source.ts
#	packages/shared/src/diagram-types.ts
# Conflicts:
#	packages/diagram-client/src/profile.ts
#	packages/extension-core/src/api.ts
#	packages/sidecar-toolkit/src/sidecar-diagram-profile.ts
# Conflicts:
#	packages/diagram-client/test/container-parity.test.ts
#	packages/diagram-client/test/fixtures/container-parity.baseline.json
#	packages/diagram-server/src/model/graph-gmodel-source.ts
# Conflicts:
#	packages/diagram-client/src/profile.ts
#	packages/extension-core/src/api.ts
#	packages/sidecar-toolkit/src/sidecar-diagram-profile.ts
endrix added 19 commits October 23, 2026 18:50
# Conflicts:
#	scripts/render-svg/README.md
#	scripts/render-svg/render.mjs
…kens and sizes off

The runtime writes run.wf-viewer.live.json at every firing and the server
re-reads it every 400ms, so now and then it read the file halfway written,
took that for no run at all and fell through to the previous run: the ring
went off, the previous run's queue sizes came on, and the next read put
things back. A run-output file that does not parse is now read as it last
did (jsonFileMemo; the queue trace too), and from the end of a run until its
record is in run-log.jsonl its last live overlay stands, as finished, where
the previous run showed for a moment.

The eye on the palette, off, took only the step counter away: the carried
colour, the token pills and the queue sizes stayed on the edges, so it looked
as if it did nothing. Off, nothing the run put on the edges is drawn; the
nodes keep the run's state. A queue size the trace no longer has is taken off
the edge too (it was set and never deleted).

Claude-Session: https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv
@endrix
endrix merged commit 7e63a44 into main Nov 4, 2026
1 check passed
@endrix
endrix deleted the fix/run-overlay-flicker branch November 4, 2026 05:09
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