chore: patch project maps for loading-overlay and orphaned session entries
- Add loading-overlay.tsx to component maps - Remove orphaned session-progress-panel.tsx and session-operations.tsx entries - Refresh parent indexes after manual map edits Quality gates: pytest 313 passed/34 skipped, npm run typecheck/lint clean, npm test -- --run 87 passed
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, background operations, and user feedback.
|
||||
Centralized client-side state management layer providing React context providers for core application concerns including authentication, real-time data, notifications, and user feedback.
|
||||
## parent
|
||||
index: apps/web/src/.pi-map.index.md
|
||||
map: apps/web/src/.pi-map.md
|
||||
@@ -12,7 +12,6 @@ map: apps/web/src/.pi-map.md
|
||||
- auth.tsx
|
||||
- events.tsx
|
||||
- notifications.tsx
|
||||
- session-operations.tsx
|
||||
- sessions.tsx
|
||||
- toast.tsx
|
||||
## links
|
||||
|
||||
@@ -4,18 +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, background operations, and user feedback.
|
||||
Centralized client-side state management layer providing React context providers for core application concerns including authentication, real-time data, notifications, and user feedback.
|
||||
## 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
|
||||
- session-operations.tsx | Manages a React context provider for tracking asynchronous instance operations (create, start, stop, etc.) with status updates from event payloads. | exp: OperationType, OperationStatus, Operation, SessionOperationsContextType, SessionOperationsProvider, useSessionOperations | dep: react, ../types/events
|
||||
- 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
|
||||
## 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 like toast notifications.
|
||||
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.
|
||||
## tags
|
||||
call:use, context, toast, provider, react, call:set, notification, operations
|
||||
call:use, context, toast, provider, react, call:set, notification
|
||||
## symbols
|
||||
- EventProvider
|
||||
- useEventContext
|
||||
@@ -24,7 +23,6 @@ call:use, context, toast, provider, react, call:set, notification, operations
|
||||
- useToast
|
||||
- AuthProvider
|
||||
- useAuth
|
||||
- call:useEvents
|
||||
## workflows
|
||||
- change state behavior
|
||||
read: auth.tsx, events.tsx, notifications.tsx
|
||||
|
||||
Reference in New Issue
Block a user