Widgets¶
Textual renderers for the workbench, primitive views, and normalized telemetry. Pass them presentation-safe contracts rather than application service objects.
Catalogue, rows, and detail surface shared by consumer-owned pages.
Workbench ¶
Workbench(labels: WorkbenchLabels | None = None)
Bases: Widget
Shared page surface with navigation left and rows/detail right.
SelectionChanged ¶
SelectionChanged(
workbench: Workbench,
row_key: str,
selected_keys: tuple[str, ...],
)
SelectionHighlighted ¶
SelectionHighlighted(workbench: Workbench, row_key: str)
on_selection_list_selection_highlighted ¶
on_selection_list_selection_highlighted(
event: SelectionHighlighted[str],
) -> None
on_selection_list_selection_toggled ¶
on_selection_list_selection_toggled(
event: SelectionToggled[str],
) -> None
refresh_rows ¶
refresh_rows(view: TableView) -> None
Reconcile table rows in place while preserving the highlighted row by key.
Existing cells are updated without rebuilding the DataTable. Added and removed
rows are reconciled by their stable keys; if the highlighted row disappears, the
cursor stays at its previous position where possible. Cursor changes caused by
this reconciliation are deliberately silent, so a refresh cannot re-enter a
page's row_highlighted handler.
refresh_view ¶
refresh_view(view: SurfaceView) -> None
Refresh a surface, preserving cursor state when it is a table.
Consumer pages should use this for ordinary data refreshes. Non-table surfaces still use the normal replacement path because they have no row identity to retain.
show_context_table ¶
show_context_table(
rows: Iterable[tuple[str, str]],
*,
columns: tuple[str, ...] | None = None,
) -> None
show_selection_rows ¶
show_selection_rows(
view: SelectionTableView,
*,
highlight_first: bool = True,
) -> None