A DataPoint with dataType TEXT or JSON bound to a Diagram anchor
rendered as the node icon plus a couple of truncated glyphs instead of its
value — in one demo dashboard, an LLM-authored multi-sentence health report
displayed only as “I am” in the middle of a large card.
DataPointStateView (the composable a Diagram anchor overlay uses to render
a bound DataPoint — see Sautner-Studio-LLC/krill#1076) had a dedicated
branch for DataType.DOUBLE that renders the value as Text, but every
other data type — including TEXT and JSON — fell into the else branch,
which renders node.icon() (IconManager.NodeCompoundImage). That compound
icon shows the type’s icon plus, for TEXT/JSON only, a small name-pill
below it that hard-truncates the snapshot value to
NodeViewConstants.NODE_LABEL_MAX_LENGTH (12 chars) with an ellipsis — a
badge sized for a swarm canvas bubble, not a Diagram tile the author sized
to fit a full report.
DataPointView.kt’s DataPointStateView gained a second dedicated branch:
when dataType is TEXT or JSON, the raw snapshot value renders as
wrapped Text inside a Modifier.weight(1f).verticalScroll(...) container,
so it uses the full anchor rect height and scrolls rather than clips. The
enclosing Column switches to Modifier.fillMaxSize() only for this branch
(via an isTextOrJson conditional modifier) so the weighted child has a
bounded height to scroll within; the DOUBLE and generic-icon branches keep
their original wrap-content sizing, centered by the caller’s Box as
before, so no other data type’s layout changed.
When a composable branches on a sub-type of a broader class covered
elsewhere (here, DataType inside a node type already special-cased by
node.type in the caller), audit every enum value the branch could see, not
just the one bug report names — TEXT and JSON share the same failure
mode as the DOUBLE case fixed one issue prior, and would have been caught
by the same review pass if the original fix had swept the full DataType
enum instead of only the value in the reported repro. Added
DataPointStateViewValueTest cases for both TEXT and JSON alongside the
existing DOUBLE regression guard.