mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-12-04 17:38:45 +00:00
Hide Copy on success, info, and progress toasts, including plugin installation and saved-preset confirmations. Apply the rule in shared toast styling so all callers use the same behavior. Warning and error toasts retain Copy unless their content includes an action button. Extend desktop and mobile DOM coverage for frontend and backend status toasts, changing notification types, diagnostic copying, embedded actions, and dismissal. Update the notification component contract. Validation: 30 focused tests passed. Visually checked temporary toasts and dismissal in the live WebUI at desktop and 320px mobile widths; git diff --check passed.
2.3 KiB
2.3 KiB
Notification Components DOX
Purpose
- Own WebUI toast, modal, icon, and notification store behavior.
Ownership
notification-store.jsowns notification state and public helper actions.notification-toast-stack.htmlowns toast rendering.notification-modal.htmlowns notification detail modal UI.notification-icons.htmlowns shared notification icon markup.
Local Contracts
- Use the notification system for user-facing success, warning, info, and error feedback.
- Keep public helper names stable for core and plugin callers.
notification_receivedJS extensions receive{ notification, source }for backend arrivals/updates and frontend-only toasts before dismissal.notificationis a shallow copy,sourceisbackendorfrontend, and dispatch does not delay rendering; consumers must deduplicate replayed snapshots and handle their own persistence failures.notification-header-actions-starthosts plugin actions before Clear All, including when the notification list is empty.- Keep the toast stack visible above normal and legacy modal overlays while staying below confirmation dialogs.
- Warning and error toasts keep the shared copy icon with a visible
Copylabel below the scrolling content, aligned with the text; Dismiss stays at the top right. Copy the full rendered title and message as plain text without opening the modal or dismissing the toast; pause dismissal while hovered or keyboard-focused. - Hide the copy row on success, info, and progress toasts, and whenever rendered toast content contains a button. Nested actions and Dismiss remain available; visibility follows changes to notification type and message content.
- Reload actions must persist their notification as read before refreshing the page.
- Avoid exposing secrets or raw auth payloads in notification text.
Work Guidance
- Coordinate helper changes with plugin UI contracts and existing frontend imports.
Verification
- Smoke-test toast display, dismiss, modal details, and notification severity styling; check copy feedback and full text from long, scrolled toasts at desktop and mobile widths.
- Run
pytest tests/test_notification_copy.py -qfor diagnostic copy actions, status confirmations, and dynamic notification updates at desktop and mobile widths.
Child DOX Index
No child DOX files.