corvix.dashboarding =================== .. py:module:: corvix.dashboarding .. autoapi-nested-parse:: Dashboard query helpers shared across presentation layers. Classes ------- .. autoapisummary:: corvix.dashboarding.DashboardItem corvix.dashboarding.DashboardGroup corvix.dashboarding.DashboardData corvix.dashboarding.DashboardSummary Functions --------- .. autoapisummary:: corvix.dashboarding.build_dashboard_data corvix.dashboarding._included_by_dashboard corvix.dashboarding._group_records corvix.dashboarding._build_summary Module Contents --------------- .. py:class:: DashboardItem JSON-friendly notification item for UI rendering. .. py:attribute:: account_id :type: str .. py:attribute:: account_label :type: str .. py:attribute:: thread_id :type: str .. py:attribute:: repository :type: str .. py:attribute:: reason :type: str .. py:attribute:: subject_type :type: str .. py:attribute:: subject_title :type: str .. py:attribute:: unread :type: bool .. py:attribute:: updated_at :type: str .. py:attribute:: score :type: float .. py:attribute:: web_url :type: str | None :value: None .. py:attribute:: matched_rules :type: list[str] :value: [] .. py:attribute:: actions_taken :type: list[str] :value: [] .. py:method:: from_record(record: corvix.domain.NotificationRecord) -> DashboardItem :classmethod: Create a UI item from a stored notification record. .. py:class:: DashboardGroup A dashboard group such as repository or reason. .. py:attribute:: name :type: str .. py:attribute:: items :type: list[DashboardItem] .. py:class:: DashboardData Full dashboard payload for web and CLI presentation. .. py:attribute:: name :type: str .. py:attribute:: include_read :type: bool .. py:attribute:: sort_by :type: str .. py:attribute:: descending :type: bool .. py:attribute:: generated_at :type: str | None .. py:attribute:: groups :type: list[DashboardGroup] .. py:attribute:: total_items :type: int .. py:attribute:: summary :type: DashboardSummary .. py:class:: DashboardSummary Snapshot metadata used by the dashboard shell. .. py:attribute:: unread_items :type: int .. py:attribute:: read_items :type: int .. py:attribute:: group_count :type: int .. py:attribute:: repository_count :type: int .. py:attribute:: reason_count :type: int .. py:function:: build_dashboard_data(records: list[corvix.domain.NotificationRecord], dashboard: corvix.config.DashboardSpec, generated_at: datetime.datetime | None = None, now: datetime.datetime | None = None) -> DashboardData Select, sort, group, and serialize records for a dashboard. .. py:function:: _included_by_dashboard(record: corvix.domain.NotificationRecord, dashboard: corvix.config.DashboardSpec, now: datetime.datetime) -> bool .. py:function:: _group_records(records: list[corvix.domain.NotificationRecord], group_by: str) -> dict[str, list[corvix.domain.NotificationRecord]] .. py:function:: _build_summary(sorted_records: list[corvix.domain.NotificationRecord], groups: list[DashboardGroup]) -> DashboardSummary