Skip to content

Viz/legible steps - #457

Draft
zzheng-aiplay wants to merge 3 commits into
superdurable:mainfrom
zzheng-aiplay:viz/legible-steps
Draft

zzheng-aiplay wants to merge 3 commits into
superdurable:mainfrom
zzheng-aiplay:viz/legible-steps

Conversation

@zzheng-aiplay

Copy link
Copy Markdown
Collaborator

No description provided.

Three additions to the Flow Definition renderer, each derived from vocabulary Dex
already has, so a Flow gets them without adopting a convention or changing the
analyser:

  stepRole()     gate | batch | work. A Step whose WaitFor holds a Channel
                 condition is a gate: in Dex that already means an actor outside
                 the Flow must publish before it proceeds. Naming it adds no
                 concept, it promotes one that was in the graph all along. A
                 SubFlow condition makes it a batch; Timers alone do not.

  waitSentence() the wait as one plain sentence. Channel and Timer names stay
                 verbatim because they are the operator's handles; what goes is
                 the scaffolding around them — anyOf, skipWaitImmediately, and
                 the `.for 1` suffix a reader has no use for.

  displayName()  reads the FDG schema's existing per-node `metadata`, falling
                 back to the type name. A Step type is part of the durable
                 contract of an open execution, so a display name sits in front
                 of it and never replaces it: the card keeps showing the type
                 whenever a display name covers it.

Gates are coloured and carry a SOMEONE MUST ACT badge, so the reader can see
where a human is required without reading any label.

On a real 12-Step Flow this finds all four gates and both fan-out Steps from the
graph alone. Deliberately absent: whether a model or a script does the work.
No Dex concept answers that, and inventing one here would put an application
fact into the renderer's vocabulary — `metadata` is the place for it.
The graph opened with every layer visible, so a reader met WaitFor shapes,
decision cards and resource rails before they met the Steps. On a twelve-Step
Flow only eleven of sixty-three drawn nodes were Steps.

Open with waits, decisions, RPCs, attributes, channels and recovery hidden.
Each stays a legend button, so nothing is removed, only deferred. Rank
separation now follows the cards: the gap sized for a card holding a decision
grid leaves a collapsed column mostly empty and forces the viewport to zoom
the text away.

A Step card now shows its display name, its input and output, and a sentence
for what it waits on, all from the schema's per-node metadata. It sizes itself
to that content and lays it out as a column, so the title no longer sits on top
of the other lines. The Step type name moves to the selection panel, where a
developer resuming a run needs it, rather than competing with the name a reader
came for. A derived colour key explains why some cards differ, and is built
from the roles the Flow actually has.

Also exclude the linked renderer package from dep pre-bundling. Vite resolves
it through web/node_modules, so it was pre-bundled once per process and edits
to its source never reached the browser.
The displayName block was left above metadataText when that function was
inserted between them, so it documented the wrong function. Both blocks also
exceeded the repository's comment-length rule.
@zzheng-aiplay
zzheng-aiplay marked this pull request as ready for review September 7, 2026 17:07
@zzheng-aiplay
zzheng-aiplay marked this pull request as draft September 7, 2026 17:07

This branch has not been deployed

No deployments
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