Skip to content

Twin outputs: components surface rendered images to the dashboard - #38

Merged
andre-merzky merged 1 commit into
develfrom
feature/twin-outputs
Sep 4, 2026
Merged

Twin outputs: components surface rendered images to the dashboard#38
andre-merzky merged 1 commit into
develfrom
feature/twin-outputs

Conversation

@andre-merzky

Copy link
Copy Markdown
Member

A twin can now push a rendered visual output (e.g. a heatmap) to the dashboard. Motivation: the DT service has no file staging (both ORBIT staging plugins exist but neither is wired to the rhapsody/DT path), so the only way endpoint-produced data returns is inline return_value — which is plenty for a small image.

  • RuntimeAPI.record_output(name, dataurl) — any component calls this with a small data: URI (a downscaled PNG it rendered). The runtime keeps the latest, id-tagged with a monotonic count; outputs() returns {latest, count}.
  • TwinInstance.summary() forwards outputs in every twin_list/admin/sessions poll — only the newest image, so the frame stays small under the 4 MiB cap however many a twin produces.
  • Dashboard (dt_dash.js 0.11.0): dedups on the id to accumulate a bounded client-side gallery, rendered in a new Outputs panel on the twin card — latest large, recent thumbnails behind it. signature() learns the new field so the card rebuilds on a new image; cache-buster bumped.

Validated end to end against a live local broker with the xGFabric service twin: heatmaps arrive in the panel as they're produced (screenshot in the session). Full unit suite: 180 passed.

A component-side consumer (the xGFabric sink returning its PNG bytes and calling record_output) rides in the xGFabric PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_016Npyz3Hbnwos12ESsdJ2YU

The DT service has no file staging, so a twin's visual output (e.g. a
rendered heatmap) rides back inline: a component calls
RuntimeAPI.record_output(name, dataurl) with a small data-URI, the
runtime keeps the latest (id-tagged, monotonic count), and summary()
forwards it under the frame cap.  The dashboard dedups on the id to
accumulate a bounded gallery -- latest large, recent thumbnails behind
it -- in a new Outputs panel on the twin card (dt_dash.js 0.11.0).

Only the newest image is on the wire each poll, so the frame stays
small however many outputs a twin has produced.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016Npyz3Hbnwos12ESsdJ2YU
@andre-merzky
andre-merzky merged commit d4346f9 into devel Sep 4, 2026
2 checks passed
@andre-merzky
andre-merzky deleted the feature/twin-outputs branch September 4, 2026 10:13
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