Files
2026-07-29 10:25:13 +08:00

1.3 KiB

Change: Add notification entry and unread reminder

Why

The backend notification contract is documented in docs/通知.md, but the frontend does not expose notifications to authenticated agent or enterprise users. Users also have no immediate way to notice newly issued unread messages after signing in.

What Changes

  • Add a notification shortcut to the home page using src/static/icons/通知.png.
  • Add a notification page that lists the current account's notifications in newest-first order.
  • Show the newest unread notification in a reminder modal after a successful login redirects to the home page.
  • Mark a notification as read when it is rendered as visible to the user; no manual “mark as read” action is required.
  • Do not resolve target data and do not navigate from a notification to any controlled resource.
  • Display the unread count on the home-page notification entry when it is available.

Impact

  • Affected specs: notifications (new capability)
  • Affected code: src/api/notifications.ts, src/pages/agent-system/home/index.vue, src/pages/agent-system/notifications/index.vue, src/pages.json, and the login-to-home session flow
  • Existing user-supplied assets remain in place: docs/通知.md and src/static/icons/通知.png