Automation
An automation editor with a flow canvas, node settings, and a run log.
Usage
Clipboard OCR → Translate
Runs once in view; change a node's settings and press Run again.
Loading demo...
Overview
Tuff's screenshot OCR flow as an automation you can edit and run: an AI re-read when native OCR isn't confident enough, then a translation back to the clipboard.
- The first time it scrolls into view it runs once (about 3.3 seconds), and the edges the data travels along move; reduced motion shows the finished run with no timers.
- Click a node to edit it for the next run; set Native OCR's minimum confidence to 94% or more (the sample reads 93%) and the run detours through the AI re-read.
- With Simulate rate limit (429) on the Translate node, translation fails first and succeeds on a retry 600ms later.
- Stop marks the step in progress as cancelled and adds a
cancelled by userlog line. - Nodes drag and snap to the dot grid; a drag is kept as an offset, so it survives full screen.
- Wide (≥ 960px) shows the run history, four-step progress, and the log pane; in the column and on narrow screens, Node and This run become tabs.
Customization
- For your own flow, nodes and edges are plain arrays and
flowNodes()only computes coordinates; edges always run from a node's bottom to the next node's top, so offset branch nodes sideways. - For a real runner, replace the timed steps in
buildPlan()with backend events (SSE or WebSocket); each event callssetNode()once and appends a log line. - TxFlowchart has no per-edge styling API: the template borrows
dashedfor "in flight" and keeps the color and motion insideprefers-reduced-motion: no-preference. - TxFlatSelect and the fine-tune card's type menu don't teleport; keep them clear of
overflow: hiddenancestors and away from the container's bottom edge.
Related components
| Region | Components | Role |
|---|---|---|
| Top bar | TxWorkingIndicator, TxStatusBadge, TxSteps, TxSwitch, TxButton | State, progress, and Run / Stop |
| Canvas | TxFlowchart, TxStatusBadge, TxWorkingIndicator, TxDotIndicator | Five nodes and moving edges |
| Node settings | TxFlatSelect, TxScrubField, TxSwitch, TxFineTuneCard, TxToastPanel | A form per node |
| This run | TxTaskRows, TxCodeStream | Step states and run log |
| Run history (wide) | TxTimeline | Recent runs, newest first |
| Log pane (wide) | TxSplitter | Canvas and log heights |
| Completion | TxToastPanel | Result card for four seconds |