Skip to content

The twin pane is DOM: scrollable, no twin can vanish - #10

Merged
andre-merzky merged 4 commits into
feature/dtaas-viz-uifrom
feature/dtaas-ui-dom-pane
Aug 24, 2026
Merged

The twin pane is DOM: scrollable, no twin can vanish#10
andre-merzky merged 4 commits into
feature/dtaas-viz-uifrom
feature/dtaas-ui-dom-pane

Conversation

@andre-merzky

Copy link
Copy Markdown
Member

Stacked on #6 (retarget to devel when that merges). Implements the decision from the twin-pane discussion: the pane is a variable-height nested tree with per-node collapse, so it moved from canvas to a scrollable DOM overlay instead of hand-rolling canvas scrolling.

  • Root cause this removes: the canvas layout dropped any card past the panel bottom (latterly with a +N more hint) — on small windows, expanding one twin hid a sibling entirely.
  • Canvas keeps header, channels, endpoint pools and arcs; it draws the pane's frame and hands the interior rect to the DOM pane. ~320 lines of card/agent/sparkline drawing and hit-testing became markup + CSS; sparklines are inline SVG from the same placeholder-data functions (until Integrate the new UI visualization with the plugin for real data #8).
  • Contracts: tw._rect still published per visible card in canvas coordinates (null when scrolled out); scrollTop survives rebuilds; plain birth order, gone twins fade in place; no auto-scroll on a new twin; fresh twins start collapsed. Pane title renamed to "Digital Twins" (on Changed the UI to better match the different abstractions #6).
  • Verified live: four twins across two sessions, 1280x620 — expand, scroll to the last strip, native scrollbar, zero JS errors; recording tests pass. VERSION 0.8.0.

🤖 Generated with Claude Code

andre-merzky and others added 4 commits August 24, 2026 15:48
The pane was the one part of the page that is a variable-height nested
tree with per-node collapse -- which a browser already knows how to lay
out, scroll and hit-test.  It is now a scrollable <div> positioned over
the canvas frame; the canvas keeps everything else (header, channels,
pools, arcs) and draws only the pane's frame and empty-state.

  * ~320 lines of hand-rolled card/agent/sparkline drawing and
    hit-testing replaced by markup + CSS; sparklines are inline SVG fed
    from the same fake-data functions (still placeholder until #8).
  * the visibility contract survives: the pane publishes each visible
    card's rect onto `tw._rect` in canvas coordinates, null when
    scrolled out -- same meaning it had when the layout dropped cards.
  * constraints held: no jumping (scrollTop survives rebuilds, plain
    birth order, gone twins fade in place), no auto-scroll on a new
    twin, newly-seen twins still start collapsed.
  * full twin id rides the title tooltip; state pill, initializing
    pulse, stream-pulse ring and the closed marker all carried over.

Verified against a live broker with four twins across two sessions at a
1280x620 viewport: expand, scroll to the last strip, collapse -- and the
recording tests still pass (12).  VERSION 0.8.0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
  * 'collapse all' / 'expand all' chip in the pane header (twin level);
    an 'agents' chip per expanded card toggles that twin's agent blocks
    at once.  Agents now start collapsed, like the twins themselves.
  * scroll cues: a thin styled scrollbar plus a subtle edge gradient at
    whichever end has more content -- shown only when there is any.
  * 'Endpoint Pools' is 'Resource Pools', and each pool title is a
    link to the task dispatcher's surface (`.../task_dispatcher/pools`;
    its Explorer page once one exists) -- the pools are its, after all.

Verified live: four twins, bulk toggles both directions, cues appear
only on overflow, the pool link lands on the dispatcher listing.
VERSION 0.8.1.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The all-twins chip reads `twins ▸/▾`, same as the per-card
agents chip.  Native scrollbars are overlay-style on current desktops
and hide themselves, so the pane hides them for real and draws its own
3px position thumb -- always present when there is overflow, wider on
hover, draggable.  VERSION 0.8.2.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Moved into the gutter between the cards and the Digital Twins frame,
and brightened -- flush on the cards' right edge it read as part of
their border.  VERSION 0.8.3.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@andre-merzky
andre-merzky merged commit 61f49d2 into feature/dtaas-viz-ui Aug 24, 2026
2 checks passed
@andre-merzky
andre-merzky deleted the feature/dtaas-ui-dom-pane branch August 24, 2026 14:42
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