Value presentation¶
The app and the TUI show platform data the same way, following one client-neutral spec,
value-presentation in the openspec repo.
One model for state and events¶
A Value is decoded data plus where it came from: a state entry (key, store, etag, when it was read) or an event (topic, type, source, subject, content type, time). Text that is JSON becomes a JSON value, a binary payload with a registered schema becomes its fields (with exact decimals), and anything else stays text or bytes. A ValueStream is the Values one key or topic delivered while it was shown, oldest first, at most 500.
Kinds decided from the data¶
A Value's kinds come from its data and origin, not from a type in code: an object with
bids, asks and last_update_id is an orderbook, one with units, buy_units and
sell_units a tradeflow, a JSON number a number, and every Value is also *. The rules
are data, shipped as presentation fragments by the devkit that owns the payloads
(market-data-devkit the order book, indicator-devkit the indicators, domain-devkit the
generic kinds) and composed in each client.
Representations¶
The same fragments map each kind to value representations (Number, Text, JSON, Tree, Ladder, Table) and stream representations (Plot, Log, Latest). A Value's list is its kinds' lists in order, without duplicates, and the first is the default. Each client draws them its own way: the TUI with terminal widgets and a braille plot, the app with Vue components, Reka UI's tree and a uPlot chart. A representation a client cannot draw, or one that cannot show a particular value, is skipped for the next.
Shared conformance vectors make both clients find the same kinds and the same lists for the same Values, so a value looks the same wherever it is shown.
Where it is used¶
States (a key's value and stream, and the one-line preview), Events (an event's data and a
topic's stream), Indicators (a pair's stream) and page blocks of type ValueStream. The
Order Book view draws the same ladder as the Ladder representation.