All updates
ProductionQAFrontend

Native Browser Notifications, Address Source Labeling, and Mail Detail Fixes

PR #493pixbox-supportOct 6, 2025 · 03:07 UTC
QAOct 6, 2025
ProductionOct 6, 2025

Executive summary

This QA release rolls up several frontend improvements led by native browser notifications: while the app is open, users can now receive OS-level desktop alerts (even when the tab is in the background) when new activity arrives over the live WebSocket feed. It also adds source labeling to address management, resolves a client/sub-client mismatch on the mail detail screen, refines the Comments display, fixes floating pagination on the Documents page, and removes a large amount of stale repository documentation.

Why this was needed

Previously, real-time notifications only surfaced inside the app's notification panel, so users working in another tab or window could miss new mail, comments, or document activity until they returned. Separately, address records did not indicate where each value originated, the mail detail view could display a mismatched client/sub-client, and the Documents page pagination control floated incorrectly. The repository had also accumulated outdated planning and backup docs.

Client / user impact

Users who grant permission get timely native desktop notifications for incoming activity without keeping the DSM tab in focus, and clicking a notification reopens the app on the correct mail or document. Address fields now show their source for clearer data provenance, mail details show the correct client/sub-client, the Comments view renders more cleanly, and Documents pagination sits correctly. No data or workflow is removed; notifications are opt-in via a dismissible prompt.

Technical scope

  • Browser notifications (PR #485/#487): new service worker public/sw.js (click routing, cache cleanup, prepared for Web Push), useNotificationPermission hook, a non-intrusive NotificationPermissionPrompt, and a PWA manifest.json linked from app/layout.tsx.
  • useNotificationsSocket.ts enhanced to raise a native Notification only when the tab is hidden (avoids duplicates), auto-closing after 5s; dashboard-layout.tsx registers the SW and handles click messages; NotificationToast added.
  • Notification stack hardening (PR #470): improved typing, loading states, and query handling across notification services, queries, mutations, types, and notification-tabs; emoji replaced with icons in error/empty states.
  • Address management (PR #489): AddressManager/ReadOnlyAddressManager/AddressComponent gain source labeling and display tweaks.
  • Mail details: client/sub-client mismatch resolved; sharing details and overview state handling refined (MailOverviewDetails, MailSharingDetails).
  • Comments refactor (PR #486): simplified MessageStatusIndicator/MessageBubble rendering.
  • Documents pagination fix (PR #492) in DocumentContents.
  • Repo cleanup (PR #488): added .gemini PR-reviewer style guide; deleted ~6,800 lines of stale docs/backups (e.g. ai_docs/backend-api.md, COMMENTS_MODULE_FEATURES.md, CONTRIBUTING.md, .codex_backup_*).

Risk & mitigation

Moderate and concentrated in the notification path. Service worker registration and the Notification API behave differently across browsers and require HTTPS and explicit permission; misconfiguration could yield duplicate or missing alerts. Mitigation: notifications are opt-in and only fire when the tab is hidden, browser support is feature-detected, and the prompt is dismissible. Deleting large documentation files is non-functional but should be confirmed as intentional. Address-labeling and mail-detail changes are display-layer and low risk.

QA validation focus

  • Grant notification permission, then trigger activity (new mail/comment/document) with the tab backgrounded and confirm a single native notification appears, auto-dismisses, and clicking it focuses the app on the correct record.
  • Confirm no notification (or only the in-app one) fires when the tab is focused; verify denied/dismissed states persist and the prompt does not nag.
  • Test across Chrome and at least one other browser; verify the service worker registers and the app stays installable via the manifest.
  • Verify address fields show correct source labels in both editable and read-only views.
  • Open a mail with client/sub-client data and confirm the correct values display; check sharing details.
  • Confirm Documents page pagination renders in the correct position; sanity-check Comments rendering.