feat(trackers): user filters for Gitea, webhook polling cleanup, dashboard navigability

- Gitea: NotificationTracker now exposes sender allowlist / blocklist filters
  via MultiEntitySelect, populated from Gitea /users/search merged with past
  EventLog senders so the picker is useful before the first webhook arrives.
- Webhook providers (gitea, planka, webhook): stop scheduling interval polling
  jobs on tracker create/update/startup; hide the "every Xs" indicator in the
  tracker list since there is no polling.
- Dashboard: stat cards are now <a> links that route to providers, trackers,
  targets, command-trackers, or scroll to the events panel. Provider deck
  rows highlight the target provider on click.
- Command trackers / command configs: auto-reselect the right config when the
  provider type changes (matches notification-tracker behavior).
- Migration: drop legacy batch_duration column from notification_tracker —
  the field is gone from the model but its NOT NULL constraint blocked
  inserts on older DBs.
- Docs: refresh entity-relationships.md with current NotificationTracker
  fields (filters, adaptive_max_skip, default_*_config_id).
This commit is contained in:
2026-04-27 15:24:44 +03:00
parent c43dc598a1
commit 42af7a6551
14 changed files with 321 additions and 19 deletions
@@ -197,6 +197,21 @@ async def migrate_schema(engine: AsyncEngine) -> None:
)
logger.info("Added filters column to %s table", tracker_table)
# Drop legacy batch_duration column from notification_tracker.
# The field was removed from the SQLModel class but the column still
# exists as NOT NULL in older DBs, so INSERTs from the new code fail
# with "NOT NULL constraint failed: notification_tracker.batch_duration".
if await _has_table(conn, tracker_table):
if await _has_column(conn, tracker_table, "batch_duration"):
_assert_ident(tracker_table, "table")
await conn.execute(
text(f"ALTER TABLE {tracker_table} DROP COLUMN batch_duration")
)
logger.info(
"Dropped legacy batch_duration column from %s table",
tracker_table,
)
# Add Gitea tracking flags to tracking_config if missing
if await _has_table(conn, "tracking_config"):
gitea_flags = [