feat(sse): toast notifications for project-board and milestone events #15

Merged
oleks merged 1 commits from sse-toasts into main 2026-05-16 14:32:26 +03:00
Owner

Builds on #7/#8 (project board SSE) and #14 (milestone SSE). Surfaces SSE changes as Gitea toasts in addition to the silent DOM patch, so users get an at-a-glance "what just changed" without staring at the bar/board.

Toasts

  • Project board (repo-projects.ts): card moved (#n → Column), card linked/unlinked, column renamed/removed, project deleted (warning toast + 1.5s delayed redirect so the reason is visible).
  • Milestone (repo-milestone-sse.ts): progress change (<title> · <closed>/<total> closed (<pct>%)), milestone deleted (warning + delayed redirect on the single-milestone view).
  • column.reordered and project.updated intentionally do not toast (noise).

Behaviour

  • Own-tab echoes suppressed via the existing session_tag guard (the acting tab never toasts its own action).
  • toast.ts preventDuplicates (default true) coalesces identical bursts; distinct transitions (e.g. 40%→60%→80%→100%) still produce one toast each.
  • Best-effort title/ref lookup from the DOM with generic fallbacks so a toast still fires if markup shifts.

Frontend only — no backend, no new events, no new REST endpoints. tsc --noEmit -p tsconfig.json clean, vite build succeeds.

Builds on #7/#8 (project board SSE) and #14 (milestone SSE). Surfaces SSE changes as Gitea toasts in addition to the silent DOM patch, so users get an at-a-glance "what just changed" without staring at the bar/board. ## Toasts - **Project board** (`repo-projects.ts`): card moved (`#n → Column`), card linked/unlinked, column renamed/removed, project deleted (warning toast + 1.5s delayed redirect so the reason is visible). - **Milestone** (`repo-milestone-sse.ts`): progress change (`<title> · <closed>/<total> closed (<pct>%)`), milestone deleted (warning + delayed redirect on the single-milestone view). - `column.reordered` and `project.updated` intentionally do **not** toast (noise). ## Behaviour - Own-tab echoes suppressed via the existing `session_tag` guard (the acting tab never toasts its own action). - `toast.ts` `preventDuplicates` (default true) coalesces identical bursts; distinct transitions (e.g. 40%→60%→80%→100%) still produce one toast each. - Best-effort title/ref lookup from the DOM with generic fallbacks so a toast still fires if markup shifts. Frontend only — no backend, no new events, no new REST endpoints. `tsc --noEmit -p tsconfig.json` clean, `vite build` succeeds.
oleks added 1 commit 2026-05-16 14:32:21 +03:00
Surfaces SSE board/milestone changes as Gitea toasts (showInfoToast /
showWarningToast) in addition to the silent DOM patch:

- project board: card moved/linked/unlinked, column renamed/removed,
  project deleted (warning + delayed redirect so the reason is visible)
- milestone: progress change (title · closed/total · pct), milestone
  deleted (warning + delayed redirect on single view)

Own-tab echoes are suppressed via the existing session_tag guard;
toast.ts preventDuplicates (default) coalesces bursts. column.reordered
and project.updated intentionally do not toast (noise). Frontend only;
no backend/event changes. tsc + vite build clean.
oleks added this to the (deleted) project 2026-05-16 14:32:24 +03:00
oleks merged commit d4de99f96b into main 2026-05-16 14:32:26 +03:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: oleks/gitea#15