corvix.dashboarding

Dashboard query helpers shared across presentation layers.

Classes

DashboardItem

JSON-friendly notification item for UI rendering.

DashboardGroup

A dashboard group such as repository or reason.

DashboardData

Full dashboard payload for web and CLI presentation.

DashboardSummary

Snapshot metadata used by the dashboard shell.

Functions

build_dashboard_data(→ DashboardData)

Select, sort, group, and serialize records for a dashboard.

_included_by_dashboard(→ bool)

_group_records(→ dict[str, ...)

_build_summary(→ DashboardSummary)

Module Contents

class corvix.dashboarding.DashboardItem[source][source]

JSON-friendly notification item for UI rendering.

account_id: str[source][source]
account_label: str[source][source]
thread_id: str[source][source]
repository: str[source][source]
reason: str[source][source]
subject_type: str[source][source]
subject_title: str[source][source]
unread: bool[source][source]
updated_at: str[source][source]
score: float[source][source]
web_url: str | None = None[source][source]
matched_rules: list[str] = [][source][source]
actions_taken: list[str] = [][source][source]
classmethod from_record(record: corvix.domain.NotificationRecord) DashboardItem[source][source]

Create a UI item from a stored notification record.

class corvix.dashboarding.DashboardGroup[source][source]

A dashboard group such as repository or reason.

name: str[source][source]
items: list[DashboardItem][source][source]
class corvix.dashboarding.DashboardData[source][source]

Full dashboard payload for web and CLI presentation.

name: str[source][source]
include_read: bool[source][source]
sort_by: str[source][source]
descending: bool[source][source]
generated_at: str | None[source][source]
groups: list[DashboardGroup][source][source]
total_items: int[source][source]
summary: DashboardSummary[source][source]
class corvix.dashboarding.DashboardSummary[source][source]

Snapshot metadata used by the dashboard shell.

unread_items: int[source][source]
read_items: int[source][source]
group_count: int[source][source]
repository_count: int[source][source]
reason_count: int[source][source]
corvix.dashboarding.build_dashboard_data(records: list[corvix.domain.NotificationRecord], dashboard: corvix.config.DashboardSpec, generated_at: datetime.datetime | None = None, now: datetime.datetime | None = None) DashboardData[source][source]

Select, sort, group, and serialize records for a dashboard.

corvix.dashboarding._included_by_dashboard(record: corvix.domain.NotificationRecord, dashboard: corvix.config.DashboardSpec, now: datetime.datetime) bool[source][source]
corvix.dashboarding._group_records(records: list[corvix.domain.NotificationRecord], group_by: str) dict[str, list[corvix.domain.NotificationRecord]][source][source]
corvix.dashboarding._build_summary(sorted_records: list[corvix.domain.NotificationRecord], groups: list[DashboardGroup]) DashboardSummary[source][source]