chore: track all project map and index files
Add generated .pi-map.md and .pi-map.index.md files across the repository so the project navigation maps are shared and versioned. These artifacts are maintained by project_map_init/patch/validate and must be kept in sync with source edits. Note: .cache/ remains ignored (added in previous commit).
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# apps/web/src/components/features/notification (index)
|
||||
dir: apps/web/src/components/features/notification
|
||||
|
||||
## role
|
||||
Provides notification UI components and event-to-toast bridging infrastructure for user-facing alerts and notifications.
|
||||
## parent
|
||||
index: apps/web/src/components/features/.pi-map.index.md
|
||||
map: apps/web/src/components/features/.pi-map.md
|
||||
## children
|
||||
-
|
||||
## files
|
||||
- event-toast-bridge.test.tsx
|
||||
- event-toast-bridge.tsx
|
||||
- notification-center.test.tsx
|
||||
- notification-center.tsx
|
||||
- notification-item.test.tsx
|
||||
- notification-item.tsx
|
||||
## links
|
||||
index: apps/web/src/components/features/notification/.pi-map.index.md
|
||||
map: apps/web/src/components/features/notification/.pi-map.md
|
||||
## workflows
|
||||
- change notification behavior
|
||||
read: event-toast-bridge.tsx, notification-center.tsx, notification-item.tsx
|
||||
- update notification tests
|
||||
read: event-toast-bridge.test.tsx, notification-center.test.tsx, notification-item.test.tsx
|
||||
## dirty
|
||||
-
|
||||
@@ -0,0 +1,34 @@
|
||||
# apps/web/src/components/features/notification
|
||||
dir: apps/web/src/components/features/notification
|
||||
|
||||
index: apps/web/src/components/features/notification/.pi-map.index.md
|
||||
|
||||
## role
|
||||
Provides notification UI components and event-to-toast bridging infrastructure for user-facing alerts and notifications.
|
||||
## files
|
||||
- event-toast-bridge.test.tsx | Tests that EventToastBridge correctly filters instance events based on user notification preferences (toast level and muted categories) before triggering toast notifications. | dep: vitest, @testing-library/react, ./event-toast-bridge, ../../../state/events, ../../../api/settings, ../../toast-rules, ../../../types/events, event-toast-bridge, useEventContext, getUserConfig, handleEventToast, InstanceEventPayload
|
||||
- event-toast-bridge.tsx | Bridges event system to toast notifications by filtering events based on user config and processing them through toast rules | exp: func:EventToastBridge() → JSX.Element | null, call:useEventContext, call:useRef, call:useState, call:useEffect, call:getUserConfig() .then((c) => { setConfig({ notification_toast_level: c.notification_toast_level ?? "all", notification_mute_categories: c.notification_mute_categories ?? [], }); }) .catch, call:setConfig, call:window.addEventListener, call:window.removeEventListener, call:processedRef.current.has, call:processedRef.current.add, call:mapEventToCategory, call:mapEventToSeverity, call:config.notification_mute_categories.includes, call:handleEventToast | dep: react, ../../../state/events, ../../toast-rules, ../../../api/settings, useEventContext, toast-rules, settings api
|
||||
- notification-center.test.tsx | Tests the NotificationCenter UI component's rendering, interactions, and API integration using Vitest and React Testing Library. | dep: vitest, @testing-library/react, ./notification-center, ../../../state/notifications, ../../../api/notifications, notification-center, notification-provider, notifications-api
|
||||
- notification-center.tsx | Renders a notification bell icon with a dropdown panel showing notifications, supporting mobile and desktop responsive layouts via React portal. | exp: func:NotificationCenter({ isMobileTerminal = false, }: NotificationCenterProps), call:useNotifications, call:useMobileViewport, call:useRef, call:useState, call:useCallback, call:bellRef.current.getBoundingClientRect, call:setDropdownStyle, call:useEffect, call:updatePosition, call:dropdownRef.current.contains, call:bellRef.current?.contains, call:setIsDropdownOpen, call:document.addEventListener, call:window.addEventListener, call:document.removeEventListener, call:window.removeEventListener, call:refreshList, call:String, call:createPortal, call:notifications.map, call:markAllRead, call:clearAll | dep: react, react-dom, ../../../hooks/use-notifications, ../../../hooks/use-mobile-viewport, ./notification-item, ../../icon, use-notifications, use-mobile-viewport, notification-item, icon
|
||||
- notification-item.test.tsx | Tests the NotificationItem React component for rendering, styling, and user interaction behaviors. | dep: vitest, @testing-library/react, ./notification-item
|
||||
- notification-item.tsx | Renders a single notification item with expandable metadata, read/dismiss actions, and severity-based icon display. | exp: NotificationItemProps, func:NotificationItem({ notification, onMarkRead, onDismiss, }: NotificationItemProps), call:useState, call:Object.keys, call:formatRelativeTime, call:Object.entries(notification.metadata).map, call:key.replace, call:formatMetadataValue, call:setExpanded, call:onMarkRead, call:onDismiss | dep: react, ../../icon, ../../../utils/time, ../../../api/notifications, ../../../utils/icons, icon, time, notifications, icons
|
||||
## arch
|
||||
React component-based architecture with event-driven toast bridging, responsive portal-based dropdowns, and severity-based conditional rendering with comprehensive Vitest test coverage.
|
||||
## tags
|
||||
event, notification, call:use, toast, notifications, listener, react, item
|
||||
## symbols
|
||||
- EventToastBridge
|
||||
- NotificationCenter
|
||||
- NotificationItem
|
||||
- call:useEventContext
|
||||
- call:useRef
|
||||
- call:useState
|
||||
- call:useEffect
|
||||
- call:getUserConfig() .then((c) => { setConfig({ notification_toast_level: c.notification_toast_level ?? "all", notification_mute_categories: c.notification_mute_categories ?? [], }); }) .catch
|
||||
## workflows
|
||||
- change notification behavior
|
||||
read: event-toast-bridge.tsx, notification-center.tsx, notification-item.tsx
|
||||
- update notification tests
|
||||
read: event-toast-bridge.test.tsx, notification-center.test.tsx, notification-item.test.tsx
|
||||
## dirty
|
||||
-
|
||||
Reference in New Issue
Block a user