kempnerpulse.present.tui

Dashboard assembly: the footer, the render-context, and render_dashboard.

render_dashboard is the single entry point the lifecycle layer calls each frame. It takes the per-frame data (the computed records, the rolling history, the input controller, and the console dimensions) plus a SummaryContext carrying everything else the summary/footer and the view panels need (system stats, the source/poll labels, the active weight preset, hardware limits, and any job-process listing). The min-size gate, focus-mode split, and view dispatch reproduce the single-file behaviour exactly.

Functions

footer_panel(selection_desc, controller[, ...])

render_dashboard(records, history, *, ...)

Assemble the full dashboard Layout for one frame.

Classes

SummaryContext

Everything the summary bar, footer, and view panels need besides the per-frame records/history/controller/dimensions.

class kempnerpulse.present.tui.SummaryContext[source]

Bases: object

Everything the summary bar, footer, and view panels need besides the per-frame records/history/controller/dimensions.

The lifecycle layer builds one of these each frame (or reuses a mostly-static one and refreshes the volatile system fields). All fields have sensible defaults so a minimal caller can pass SummaryContext().

source: str = ''
poll: float = 1.0
selection_desc: str = 'all'
weights: Tuple[float, float, float, float] = (0.35, 0.35, 0.2, 0.1)
app_version: str = ''
cpu_info: Tuple[int | None, int | None, float | None, int | None] = (None, None, None, None)
ram_info: Tuple[float | None, float | None] = (None, None)
power_limits: Dict[str, float]
pcie_bw_limits: Dict[str, float]
pcie_info: str = ''
gpu_processes: Dict[str, List[GpuProcess]]
__init__(source='', poll=1.0, selection_desc='all', weights=(0.35, 0.35, 0.2, 0.1), app_version='', cpu_info=(None, None, None, None), ram_info=(None, None), power_limits=<factory>, nvlink_bw_limits=<factory>, pcie_bw_limits=<factory>, pcie_info='', gpu_processes=<factory>)
Parameters:
Return type:

None

kempnerpulse.present.tui.footer_panel(selection_desc, controller, source='', poll=1.0, weights=(0.35, 0.35, 0.2, 0.1), console_width=200)[source]
Parameters:
Return type:

Panel

kempnerpulse.present.tui.render_dashboard(records, history, *, console_width, console_height, controller, summary_context)[source]

Assemble the full dashboard Layout for one frame.

Returns a Rich renderable (a Layout). Below the per-card minimum size it returns a ‘widen me’ gate instead of squeezed cards. View selection follows controller (plot / job / focus / fleet).

Parameters:
Return type:

Layout