chore(project-map): regenerate .pi-map artifacts across the repo
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
dir: apps/web/src/state
|
||||
|
||||
## role
|
||||
Centralized client-side state management layer providing React context providers for core application concerns including authentication, real-time data, notifications, and user feedback.
|
||||
Centralized React state management package providing context-based global state for authentication, real-time events, notifications, sessions, and UI feedback across the web application.
|
||||
## parent
|
||||
index: apps/web/src/.pi-map.index.md
|
||||
map: apps/web/src/.pi-map.md
|
||||
|
||||
@@ -4,17 +4,17 @@ dir: apps/web/src/state
|
||||
index: apps/web/src/state/.pi-map.index.md
|
||||
|
||||
## role
|
||||
Centralized client-side state management layer providing React context providers for core application concerns including authentication, real-time data, notifications, and user feedback.
|
||||
Centralized React state management package providing context-based global state for authentication, real-time events, notifications, sessions, and UI feedback across the web application.
|
||||
## files
|
||||
- auth.tsx | Provides React authentication context for managing user session state with login status, user data, and session refresh/logout operations. | exp: AuthProvider, useAuth | dep: react, ../api/client, ../types
|
||||
- events.tsx | Creates a React context provider for real-time event data with connection status and reconnection tracking | exp: func:EventProvider({ children }: { children: React.ReactNode }), call:useEvents, call:useMemo, func:useEventContext(), call:useContext | dep: react, ../hooks/use-events, ../types/events
|
||||
- notifications.tsx | Provides a React context provider that manages notification state with optimistic updates, polling, and dropdown-aware fetching. | exp: NotificationContextValue, NotificationContext, func:NotificationProvider({ children, }: { children: React.ReactNode; }), call:useState, call:useRef, call:useCallback, call:getUnreadCount, call:setUnreadCount, call:clearInterval, call:console.error, call:setIsLoading, call:getNotifications, call:setNotifications, call:fetchUnreadCount, call:setInterval, call:fetchList, call:useEffect, call:stopPolling, call:startPolling, call:document.addEventListener, call:document.removeEventListener, call:currentNotifications.find, call:currentNotifications.map, call:new Date().toISOString, call:Math.max, call:setError, call:markNotificationRead, call:markAllNotificationsRead, call:currentNotifications.filter, call:dismissNotification, call:clearAllNotifications | dep: react, ../api/notifications, React
|
||||
- sessions.tsx | Provides a React context that manages user sessions state with server polling, local CRUD operations, and loading/error handling. | exp: SessionsContextType, SessionsProvider, useSessions | dep: react, ../api/sessions
|
||||
- toast.tsx | Implements a React toast notification system with context-based state management, auto-dismiss timers, and imperative API shortcuts. | exp: ToastSeverity, ToastItem, toast, func:ToastProvider({ children }: { children: React.ReactNode }), call:useState, call:useRef, call:useCallback, call:setToasts, call:prev.filter, call:timersRef.current.get, call:clearTimeout, call:timersRef.current.delete, call:Date.now, call:setTimeout, call:removeToast, call:timersRef.current.set, call:useEffect, call:addToast, func:useToast(), call:useContext, raise:Error | dep: react, React
|
||||
- auth.tsx | Provides React authentication context with session state management, user data, and auth operations (refresh/logout). | exp: AuthProvider, useAuth | dep: react, ../api/client, ../types
|
||||
- events.tsx | Creates a React context provider for real-time instance events with connection status and reconnect tracking | exp: func:EventProvider({ children }: { children: React.ReactNode }), call:useEvents, call:useMemo, func:useEventContext(), call:useContext | dep: react, ../hooks/use-events, ../types/events
|
||||
- notifications.tsx | Provides a React context that manages notification state with optimistic updates, polling, and visibility-aware fetching for a notification dropdown UI. | exp: NotificationContextValue, NotificationContext, func:NotificationProvider({ children, }: { children: React.ReactNode; }), call:useState, call:useRef, call:useCallback, call:getUnreadCount, call:setUnreadCount, call:clearInterval, call:console.error, call:setIsLoading, call:getNotifications, call:setNotifications, call:fetchUnreadCount, call:setInterval, call:fetchList, call:useEffect, call:stopPolling, call:startPolling, call:document.addEventListener, call:document.removeEventListener, call:currentNotifications.find, call:currentNotifications.map, call:new Date().toISOString, call:Math.max, call:setError, call:markNotificationRead, call:markAllNotificationsRead, call:currentNotifications.filter, call:dismissNotification, call:clearAllNotifications | dep: react, ../api/notifications, React
|
||||
- sessions.tsx | Provides a React context for managing user sessions with server polling, local state updates, and CRUD operations. | exp: SessionsContextType, SessionsProvider, useSessions | dep: react, ../api/sessions
|
||||
- toast.tsx | Provides a React toast notification system with context-based state management, auto-dismiss timers, and imperative API access. | exp: ToastSeverity, ToastItem, toast, func:ToastProvider({ children }: { children: React.ReactNode }), call:useState, call:useRef, call:useCallback, call:setToasts, call:prev.filter, call:timersRef.current.get, call:clearTimeout, call:timersRef.current.delete, call:Date.now, call:setTimeout, call:removeToast, call:timersRef.current.set, call:useEffect, call:addToast, func:useToast(), call:useContext, raise:Error | dep: react, React
|
||||
## arch
|
||||
React Context API pattern with separate providers per domain, combining optimistic updates, server polling, event-driven state synchronization, and imperative APIs for cross-cutting concerns.
|
||||
React Context pattern with provider/consumer model, each module implementing independent singleton contexts with imperative APIs, optimistic updates, polling-based synchronization, and side-effect management via useEffect hooks.
|
||||
## tags
|
||||
call:use, context, toast, provider, react, call:set, notification
|
||||
call:use, context, toast, call:set, notification, react, provider, notifications
|
||||
## symbols
|
||||
- EventProvider
|
||||
- useEventContext
|
||||
@@ -23,6 +23,7 @@ call:use, context, toast, provider, react, call:set, notification
|
||||
- useToast
|
||||
- AuthProvider
|
||||
- useAuth
|
||||
- call:useEvents
|
||||
## workflows
|
||||
- change state behavior
|
||||
read: auth.tsx, events.tsx, notifications.tsx
|
||||
|
||||
Reference in New Issue
Block a user