Event rules, events summary, notifications and desktop push #5

Merged
Gilles merged 1 commit from feat/events into master 2026-10-25 21:57:47 +00:00
Owner

Refs argus/backend#10. Needs argus/backend#12 deployed (API).

What's in it

  • Project settings → "Règles d'événements"
    • Every reader sees the rules and can follow or unfollow one, to receive it themselves.
    • Writers can create, edit, enable/disable, test and delete. Write access is detected through the recipient-picker endpoint, which requires it.
    • Form: trigger plus its params (threshold, points + baseline branch, tolerated failures), severity (pre-filled from the trigger until picked by hand), report type / ref kind / ref pattern filters, channels, Mattermost channel picker (the bot's channels), recipient search and extra emails. The backend's field errors are shown inline.
    • "Commentaire sur PR" is disabled when the rule targets non-PR refs.
  • Summary pages: /events lists every readable project, /:owner/:repo/events one project.
    • Every raised event is shown, including those whose rule has no channel ("Aucun canal").
    • Each channel's delivery state is shown, with the error detail on hover.
    • Filters: severity, trigger, delivery state (incl. none), period. "Charger plus" loads the next page.
  • Web channel: a header bell with the unread count, polled every minute, plus a dropdown and a /notifications page with mark-as-read.
  • Desktop channel: /settings/notifications enables or disables Web Push in the current browser, using the server's VAPID key.
    • public/sw.js is served at /sw.js by WhiteNoise. It shows the notification (sticky for alert) and opens the report on click.
  • Shared severity colours in style.css; alert and warning reuse the fail and warn status colours.

Tests

13 new vitest cases (64 in total) cover:

  • the rules manager: reader vs writer, full create payload, field errors, test results, PR comment disabled;
  • the events view: delivery states, severity filter, paging;
  • the bell and the notifications page;
  • the push settings page: unsupported browser, subscribe flow with a stubbed PushManager;
  • base64url decoding.

vue-tsc and vite build pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA

Refs argus/backend#10. Needs argus/backend#12 deployed (API). ## What's in it - **Project settings → "Règles d'événements"** - Every reader sees the rules and can follow or unfollow one, to receive it themselves. - Writers can create, edit, enable/disable, test and delete. Write access is detected through the recipient-picker endpoint, which requires it. - Form: trigger plus its params (threshold, points + baseline branch, tolerated failures), severity (pre-filled from the trigger until picked by hand), report type / ref kind / ref pattern filters, channels, Mattermost channel picker (the bot's channels), recipient search and extra emails. The backend's field errors are shown inline. - "Commentaire sur PR" is disabled when the rule targets non-PR refs. - **Summary pages**: `/events` lists every readable project, `/:owner/:repo/events` one project. - Every raised event is shown, including those whose rule has no channel ("Aucun canal"). - Each channel's delivery state is shown, with the error detail on hover. - Filters: severity, trigger, delivery state (incl. none), period. "Charger plus" loads the next page. - **Web channel**: a header bell with the unread count, polled every minute, plus a dropdown and a `/notifications` page with mark-as-read. - **Desktop channel**: `/settings/notifications` enables or disables Web Push in the current browser, using the server's VAPID key. - `public/sw.js` is served at `/sw.js` by WhiteNoise. It shows the notification (sticky for `alert`) and opens the report on click. - Shared severity colours in `style.css`; alert and warning reuse the fail and warn status colours. ## Tests 13 new vitest cases (64 in total) cover: - the rules manager: reader vs writer, full create payload, field errors, test results, PR comment disabled; - the events view: delivery states, severity filter, paging; - the bell and the notifications page; - the push settings page: unsupported browser, subscribe flow with a stubbed `PushManager`; - base64url decoding. `vue-tsc` and `vite build` pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA
Add event rules, events summary, notifications and desktop push
All checks were successful
ci / unit (pull_request) Successful in 1m14s
ci / publish (pull_request) Has been skipped
fbd4806690
UI for argus/backend#10:
- Project settings: "Règles d'événements" section -- list, follow,
  create/edit (trigger + params, severity defaulted from the trigger,
  ref/type filters, channels, Mattermost channel picker, recipients,
  extra emails), enable/disable, test, delete. Writers only for edits.
- /events and /:owner/:repo/events: summary of every raised event,
  including ones without any channel, with per-channel delivery state,
  filters (severity, trigger, delivery state, period) and paging.
- Header bell (web channel, polled every minute) + /notifications.
- /settings/notifications: enable/disable Web Push in this browser;
  public/sw.js shows the notification and opens the report on click.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA
Author
Owner
<!-- argus-link-bot:argus/frontend --> 📊 [Rapports Argus pour cette PR](https://reports.stationmyr.net/argus/frontend/pr/5)
Gilles merged commit 1fb5fb8a5b into master 2026-10-25 21:57:47 +00:00
Gilles deleted branch feat/events 2026-10-25 21:57:47 +00:00
Sign in to join this conversation.
No description provided.