Agent and admin views are templates — the first emission waits on no data
The platform rule (core Doc/GUI/DataBinding → Templates first, data later): a layout area is a
template. It emits its whole control tree on the first render, the platform's loading shape
covers whatever has not arrived, and the values are bound — never read on the hub and baked
into the controls.
Every converted area has the same shape: a pure Build…Template (every view a control, every value
a relative pointer), a pure Project… (the record the pointers resolve against), and
stream.Select(Project).Bind(_ => template, id), which feeds /data/{id} live. A part the record
does not have is hidden by its bound style.
| Area | Before | Now |
|---|---|---|
Agent Details |
node → page built per emission, HTML interpolated | template bound to AgentDetailsView |
Threads supervisor Queue |
status node → heading + grid built per emission | template bound to QueueView; the rows are data the grid binds |
| AI usage & cost → token usage | two deferred views (toolbar, grid) | toolbar buttons bind their appearance to FilterView; summary, rows and the empty/failed text bind to UsageView |
The Queue's admin check still runs first: it decides which page renders (structure), never a value. The usage read is still issued as System for a confirmed admin only, and a failed read still says "could not read" rather than showing a zero-spend grid — it is now a value of the projection.
Left as they are, and what each waits on
| Area | Why |
|---|---|
Agent Edit |
It copies the node into /data buffers and writes them back on Save — the replicate-then-save shape the GUI rules forbid. The fix is to bind each field to the node directly, but the instructions editor is a CodeEditorControl, and CodeEditorView resolves its pointer through the layout stream (Stream.DataBind), which MeshNodeBindingExtensions' own remarks say throws on a node-bound pointer's Base64Url segment and tears down the circuit (read from the source, not reproduced here). It needs CodeEditorView to branch on MeshNodeBindingExtensions.IsNodeBound the way MarkdownEditorView does. |
Agent Catalog |
Its query set is itself computed live from the viewer's AI settings. MeshSearch and MeshNodeCollectionControl take static queries, so no list control can take a bound query set yet. |
Thread Inbox |
Every row carries its own actions (select, close, reopen, expand). A bound item template cannot carry a per-row click — a ClickedEvent carries no item — so the rows stay hub-built until the platform offers one. |
Tests: MeshWeaver.AI.Test/AgentAndAdminViewsAreTemplatesTest; AiUsageCostSettingsTabTest now reads
the grid's rows off the area's bound data.