TuiState Pennington.Tui
Snapshot surface the TUI view reads each frame. Plain reference fields carry the data; RenderTick is a reactive State<Int32> the view subscribes to so it actually re-renders when those fields change — XenoAtom's dependency tracker only observes State<T>.Value reads, so views that read raw fields would paint once and never update.
Properties
AppUrlstring?- Default:
nullBase URL Kestrel bound to, ornullif not yet known. ContentGroupsSystem.Collections.Generic.IReadOnlyList<Pennington.Tui.ContentGroup>- Default:
[]TOC entries grouped by theIContentServicethat produced them. The Content tab renders one TreeView root per group so authors can see which service is responsible for each page. LocalesSystem.Collections.Generic.IReadOnlyList<string>- Default:
[]Locale codes configured for this site. RenderTickState<int>- Default:
new(0)Bumped on every TUI tick fromTuiApp. Every reactiveTextBlock(() => ...)lambda readsRenderTick.Valueso the framework's dependency tracker re-runs the lambda on each tick.
Pennington.Tui.TuiState
namespace Pennington.Tui;
/// Snapshot surface the TUI view reads each frame. Plain reference fields carry the data; RenderTick is a reactive State<Int32> the view subscribes to so it actually re-renders when those fields change — XenoAtom's dependency tracker only observes State<T>.Value reads, so views that read raw fields would paint once and never update.
public class TuiState
{
/// Base URL Kestrel bound to, or null if not yet known.
public string? AppUrl { get; internal set; }
/// TOC entries grouped by the IContentService that produced them. The Content tab renders one TreeView root per group so authors can see which service is responsible for each page.
public IReadOnlyList<ContentGroup> ContentGroups { get; internal set; } = [];
/// Locale codes configured for this site.
public IReadOnlyList<string> Locales { get; internal set; } = [];
/// Bumped on every TUI tick from TuiApp. Every reactive TextBlock(() => ...) lambda reads RenderTick.Value so the framework's dependency tracker re-runs the lambda on each tick.
public State<int> RenderTick { get; } = new(0);
}