- Notifications
You must be signed in to change notification settings - Fork1.1k
Commitf8d9a80
authored
feat: add notification warning alert to Tasks page (#20900)
## ProblemUsers may not realize that task notifications are disabled by default.To improve awareness, we show a warning alert on the Tasks page when alltask notifications are disabled.**Alert visibility logic:**- Shows when **all** task notification templates (Task Working, TaskIdle, Task Completed, Task Failed) are disabled- Can be dismissed by the user, which stores the dismissal in the userpreferences API- If the user later enables any task notification in Account Settings,the dismissal state is cleared so the alert will show again if theydisable all notifications in the future<img width="2980" height="1588" alt="Screenshot 2025-11-25 at 17 48 17"src="https://github.com/user-attachments/assets/316bf097-d9d2-4489-bc16-2987ba45f45c"/>## Changes- Added a warning alert to the Tasks page when all task notificationsare disabled- Introduced new `/users/{user}/preferences` endpoint to manage userpreferences (stored in `user_configs` table)- Alert is dismissible and stores the dismissal state via the new userpreferences API endpoint- Enabling any task notification in Account Settings clears thedismissal state via the preferences API- Added comprehensive Storybook stories for both TasksPage andNotificationsPage to test all alert visibility states and interactionsCloses:coder/internal#10891 parenta8862be commitf8d9a80
File tree
24 files changed
+1028
-40
lines changed- coderd
- apidoc
- database
- dbauthz
- dbmetrics
- dbmock
- queries
- codersdk
- docs/reference/api
- site/src
- api
- queries
- modules/notifications
- pages
- TasksPage
- UserSettingsPage/NotificationsPage
- testHelpers
24 files changed
+1028
-40
lines changedSome generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1336 | 1336 | | |
1337 | 1337 | | |
1338 | 1338 | | |
| 1339 | + | |
| 1340 | + | |
1339 | 1341 | | |
1340 | 1342 | | |
1341 | 1343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3431 | 3431 | | |
3432 | 3432 | | |
3433 | 3433 | | |
| 3434 | + | |
| 3435 | + | |
| 3436 | + | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
| 3440 | + | |
| 3441 | + | |
| 3442 | + | |
| 3443 | + | |
| 3444 | + | |
3434 | 3445 | | |
3435 | 3446 | | |
3436 | 3447 | | |
| |||
5464 | 5475 | | |
5465 | 5476 | | |
5466 | 5477 | | |
| 5478 | + | |
| 5479 | + | |
| 5480 | + | |
| 5481 | + | |
| 5482 | + | |
| 5483 | + | |
| 5484 | + | |
| 5485 | + | |
| 5486 | + | |
| 5487 | + | |
| 5488 | + | |
5467 | 5489 | | |
5468 | 5490 | | |
5469 | 5491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
1477 | 1478 | | |
1478 | 1479 | | |
1479 | 1480 | | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
1480 | 1496 | | |
1481 | 1497 | | |
1482 | 1498 | | |
| |||
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
0 commit comments
Comments
(0)