You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Telegram grants: show expired/revoked history and add expiry reminders #74
src/features/telegram/grants-page.tsx (/dashboard/telegram/grants) currently only shows two views, backed by context.backend.tg.grants.getOngoing and .getScheduled:
Ongoing — grants currently in effect
Scheduled — grants that will start in the future
There is no way to see grants that have ended (naturally expired, or revoked/interrupted early), and no reminder when an active or scheduled grant is about to expire. This is called out explicitly in PRD_Classificazione_Feature.md §11 ("Telegram grants: storico dei grant terminati/interrotti; reminder sulle scadenze imminenti") as a low-effort improvement to an area that's already in production — no new roles/permissions/Identity Provider work needed, it only touches this existing page and its backend endpoints.
Problem
Once a grant's validUntil passes (or it's revoked before that), it disappears from the dashboard entirely. There's no audit trail visible to Direttivo/owners of who was authorized to bypass moderation, for how long, and whether it ran its full course or was cut short.
Nobody is notified before a grant is about to expire, so an authorization can lapse silently (e.g. a partner association mid-campaign) with no chance to renew it in time.
Proposed changes
Grant history / expired tab
Add a getExpired (or getHistory) backend query alongside the existing getOngoing/getScheduled, returning grants whose validUntil is in the past, plus a way to distinguish "ran to term" vs "revoked early" if that's tracked (if not currently tracked, this may need a revokedAt/endedEarly flag — check Moderation/grants schema in the telegram bot repo, which is presumably the source of truth for this table).
Add a third tab ("Expired"/"Past") to the ToggleGroup in grants-page.tsx, next to "Ongoing" and "Scheduled", following the same table/column pattern already used.
Activity