Skip to content

timeline

timeline

Event timeline panel for the Marianne Monitor TUI.

Displays a chronological, color-coded list of process events, anomalies, and learning insights in a scrollable log.

Classes

TimelinePanel

TimelinePanel(*, name=None, id=None, classes=None)

Bases: RichLog

Renders a scrollable event timeline with color coding.

Uses RichLog for built-in scrolling and append-oriented display.

Events are color-coded by type: - blue: SPAWN - green: EXIT - yellow: SIGNAL - red: KILL/OOM/ANOMALY - magenta: LEARNING insights

Source code in src/marianne/tui/panels/timeline.py
def __init__(
    self,
    *,
    name: str | None = None,
    id: str | None = None,
    classes: str | None = None,
) -> None:
    super().__init__(
        name=name, id=id, classes=classes, wrap=True, max_lines=self.MAX_VISIBLE, markup=True
    )
    self._events: list[ProcessEvent] = []
    self._anomalies: list[Anomaly] = []
    self._learning_insights: list[dict[str, Any]] = []
    self._observer_events: list[dict[str, Any]] = []
Functions
update_data
update_data(events=None, anomalies=None, learning_insights=None, observer_events=None)

Update the timeline with new data and refresh display.

Source code in src/marianne/tui/panels/timeline.py
def update_data(
    self,
    events: list[ProcessEvent] | None = None,
    anomalies: list[Anomaly] | None = None,
    learning_insights: list[dict[str, Any]] | None = None,
    observer_events: list[dict[str, Any]] | None = None,
) -> None:
    """Update the timeline with new data and refresh display."""
    if events is not None:
        self._events = events
    if anomalies is not None:
        self._anomalies = anomalies
    if learning_insights is not None:
        self._learning_insights = learning_insights
    if observer_events is not None:
        self._observer_events = observer_events
    self._render_timeline()
add_event
add_event(event)

Add a single event to the timeline incrementally.

Source code in src/marianne/tui/panels/timeline.py
def add_event(self, event: dict[str, Any]) -> None:
    """Add a single event to the timeline incrementally."""
    line = self._format_event_line(event)
    if line:
        self.write(line)