Skip to content

[Customer Portal] Changes from the microapp - #609

Merged
shayanmalinda merged 133 commits into
mainfrom
customer-portal-milestone-1
Apr 25, 2026
Merged

[Customer Portal] Changes from the microapp#609
shayanmalinda merged 133 commits into
mainfrom
customer-portal-milestone-1

Conversation

@Rashmika998

@Rashmika998 Rashmika998 commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added dynamic data loading for projects, cases, users, and support items from backend APIs
    • Introduced conversational chat functionality with streaming responses
    • Added support for new item types: security reports, engagements, and service requests
    • Implemented user profile and settings management capabilities
    • Added light/dark theme mode support
    • Introduced notification/alert system for user feedback
  • Bug Fixes

    • Improved error handling with user-friendly error messages and recovery options
    • Enhanced loading state indicators across all pages
  • Improvements

    • Replaced hardcoded mock data with live backend integration
    • Added skeleton loaders for better perceived performance
    • Expanded detail page features with richer content and interactions
    • Enhanced user management and role administration

lithika-damnod and others added 19 commits April 16, 2026 22:18
…e flow

- add project features API and wire into ProjectContext/Provider
- enable feature-based UI rendering (tabs, stats, widgets, access control)
- implement case edit mutation with menu actions (resolve, waiting, create related)
- add "create related case" flow with prefilled and locked fields
- include projectTypeId in case classification requests

ui:
- add MoreOptionsButton and integrate into case detail header
- extend StickyCommentBar with bottomSlot support
- add disabled prop to TextField
- simplify ProjectCard layout
- normalize RichText spacing (remove default margins)

fix:
- enforce non-null status in case DTO/model and update mappings
- ensure stable keys and correct ordering in chat messages
- handle project features loading state in MeProvider

refactor:
- propagate projectTypeId through context and usage
- clean up unused constants and update constants file to tsx

chore:
- add PROJECT_FEATURES_ENDPOINT and update websocket version to v1.3
[Customer Portal Micro App] Integrate Backend APIs and Refine UI
…lPage

- Introduced a function to map case state labels to their corresponding keys.
- Updated menu options to utilize the new state keys for improved clarity and functionality.
- Adjusted action handlers to ensure proper state transitions for case actions (resolve, accept/reject solution, mark waiting).
- Improved UI logic for displaying menu options based on case status.
- Replaced dynamic case state retrieval with a constant mapping for improved readability and performance.
- Simplified the logic for obtaining case state keys, enhancing maintainability of the code.
- Moved case state IDs to a dedicated constants file for better organization and reusability.
- Updated CaseDetailPage to utilize the centralized case state constants, enhancing code clarity.
- Updated the menu option label from "Created Related Case" to "Create Related Case" for improved clarity and consistency in the user interface.
…ns in CaseDetailPage

- Eliminated the 'Mark as Waiting on WSO2' action from the case menu options for improved clarity and reduced complexity.
- Adjusted visibility logic for the 'Reject Solution' option to account for additional case states.
…actions

feat: add solution proposed case actions in microapp
@coderabbitai

coderabbitai Bot commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7f246c88-604c-43fe-8d74-c702e533e475

📥 Commits

Reviewing files that changed from the base of the PR and between acfbb07 and 2b274eb.

⛔ Files ignored due to path filters (1)
  • apps/customer-portal/microapp/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (143)
  • apps/customer-portal/microapp/index.html
  • apps/customer-portal/microapp/package.json
  • apps/customer-portal/microapp/src/App.tsx
  • apps/customer-portal/microapp/src/components/core/AppBar.tsx
  • apps/customer-portal/microapp/src/components/core/ErrorBoundary.tsx
  • apps/customer-portal/microapp/src/components/core/Fab.tsx
  • apps/customer-portal/microapp/src/components/core/Snackbar.tsx
  • apps/customer-portal/microapp/src/components/core/TabBar.tsx
  • apps/customer-portal/microapp/src/components/core/index.ts
  • apps/customer-portal/microapp/src/components/features/chat/MessageBubble.tsx
  • apps/customer-portal/microapp/src/components/features/create/ConversationSummary.tsx
  • apps/customer-portal/microapp/src/components/features/create/Field.tsx
  • apps/customer-portal/microapp/src/components/features/dashboard/BarChartWidget.tsx
  • apps/customer-portal/microapp/src/components/features/dashboard/MetricWidget.tsx
  • apps/customer-portal/microapp/src/components/features/dashboard/PieChartWidget.tsx
  • apps/customer-portal/microapp/src/components/features/detail/Comment.tsx
  • apps/customer-portal/microapp/src/components/features/detail/InfoField.tsx
  • apps/customer-portal/microapp/src/components/features/detail/MoreOptionsButton.tsx
  • apps/customer-portal/microapp/src/components/features/detail/OverlineSlot.tsx
  • apps/customer-portal/microapp/src/components/features/detail/ProgressTimeline.tsx
  • apps/customer-portal/microapp/src/components/features/detail/StakeholderItem.tsx
  • apps/customer-portal/microapp/src/components/features/detail/StickyCommentBar.tsx
  • apps/customer-portal/microapp/src/components/features/detail/TimelineEntry.tsx
  • apps/customer-portal/microapp/src/components/features/detail/index.ts
  • apps/customer-portal/microapp/src/components/features/projects/ProjectCard.tsx
  • apps/customer-portal/microapp/src/components/features/projects/ProjectPopoverItem.tsx
  • apps/customer-portal/microapp/src/components/features/projects/ProjectSelector.tsx
  • apps/customer-portal/microapp/src/components/features/settings/SettingListItem.tsx
  • apps/customer-portal/microapp/src/components/features/support/CallRequestCard.tsx
  • apps/customer-portal/microapp/src/components/features/support/CaseListContent.tsx
  • apps/customer-portal/microapp/src/components/features/support/ChangeRequestListContent.tsx
  • apps/customer-portal/microapp/src/components/features/support/ChatListContent.tsx
  • apps/customer-portal/microapp/src/components/features/support/Chip.tsx
  • apps/customer-portal/microapp/src/components/features/support/EngagementListContent.tsx
  • apps/customer-portal/microapp/src/components/features/support/FilterSlotBuilder.tsx
  • apps/customer-portal/microapp/src/components/features/support/FilterSlotContent.tsx
  • apps/customer-portal/microapp/src/components/features/support/ItemCard.tsx
  • apps/customer-portal/microapp/src/components/features/support/ItemCardExtended.tsx
  • apps/customer-portal/microapp/src/components/features/support/ItemListView.tsx
  • apps/customer-portal/microapp/src/components/features/support/SecurityReportAnalysisListContent.tsx
  • apps/customer-portal/microapp/src/components/features/support/ServiceRequestListContent.tsx
  • apps/customer-portal/microapp/src/components/features/support/config.tsx
  • apps/customer-portal/microapp/src/components/features/support/index.ts
  • apps/customer-portal/microapp/src/components/features/users/InvitationSummaryContent.tsx
  • apps/customer-portal/microapp/src/components/features/users/RoleSelector.tsx
  • apps/customer-portal/microapp/src/components/features/users/UserListItem.tsx
  • apps/customer-portal/microapp/src/components/layout/MainLayout.tsx
  • apps/customer-portal/microapp/src/components/layout/RequireProject.tsx
  • apps/customer-portal/microapp/src/components/layout/config.tsx
  • apps/customer-portal/microapp/src/components/microapp-bridge/index.ts
  • apps/customer-portal/microapp/src/components/microapp-bridge/types.ts
  • apps/customer-portal/microapp/src/components/shared/ConfirmDialog.tsx
  • apps/customer-portal/microapp/src/components/shared/EmptyState.tsx
  • apps/customer-portal/microapp/src/components/shared/ErrorState.tsx
  • apps/customer-portal/microapp/src/components/shared/InfiniteScroll.tsx
  • apps/customer-portal/microapp/src/components/shared/RichText.tsx
  • apps/customer-portal/microapp/src/components/shared/SectionCard.tsx
  • apps/customer-portal/microapp/src/components/shared/TypewriterText.tsx
  • apps/customer-portal/microapp/src/components/shared/index.ts
  • apps/customer-portal/microapp/src/components/ui/AuthorizationFallback.tsx
  • apps/customer-portal/microapp/src/components/ui/LoadingFallback.tsx
  • apps/customer-portal/microapp/src/components/ui/index.ts
  • apps/customer-portal/microapp/src/config/constants.ts
  • apps/customer-portal/microapp/src/config/constants.tsx
  • apps/customer-portal/microapp/src/config/endpoints.ts
  • apps/customer-portal/microapp/src/context/AppProvider.tsx
  • apps/customer-portal/microapp/src/context/ProjectScopeProvider.tsx
  • apps/customer-portal/microapp/src/context/filters/FiltersContext.ts
  • apps/customer-portal/microapp/src/context/filters/FiltersProvider.tsx
  • apps/customer-portal/microapp/src/context/filters/index.ts
  • apps/customer-portal/microapp/src/context/filters/useFilters.ts
  • apps/customer-portal/microapp/src/context/layout/LayoutContext.tsx
  • apps/customer-portal/microapp/src/context/layout/LayoutProvider.tsx
  • apps/customer-portal/microapp/src/context/me/MeContext.tsx
  • apps/customer-portal/microapp/src/context/me/MeProvider.tsx
  • apps/customer-portal/microapp/src/context/me/index.ts
  • apps/customer-portal/microapp/src/context/me/useMe.tsx
  • apps/customer-portal/microapp/src/context/project/ProjectContext.tsx
  • apps/customer-portal/microapp/src/context/project/ProjectProvider.tsx
  • apps/customer-portal/microapp/src/context/snackbar/SnackbarContext.tsx
  • apps/customer-portal/microapp/src/context/snackbar/SnackbarProvider.tsx
  • apps/customer-portal/microapp/src/context/snackbar/index.ts
  • apps/customer-portal/microapp/src/context/snackbar/useNotify.ts
  • apps/customer-portal/microapp/src/context/snackbar/useSnackbar.tsx
  • apps/customer-portal/microapp/src/context/theme/index.tsx
  • apps/customer-portal/microapp/src/index.css
  • apps/customer-portal/microapp/src/main.tsx
  • apps/customer-portal/microapp/src/mocks/data/case.ts
  • apps/customer-portal/microapp/src/mocks/data/change.ts
  • apps/customer-portal/microapp/src/mocks/data/home.ts
  • apps/customer-portal/microapp/src/mocks/data/notifications.tsx
  • apps/customer-portal/microapp/src/mocks/data/projects.ts
  • apps/customer-portal/microapp/src/mocks/data/service.ts
  • apps/customer-portal/microapp/src/mocks/data/support.ts
  • apps/customer-portal/microapp/src/mocks/data/users.ts
  • apps/customer-portal/microapp/src/pages/AllItemsPage.tsx
  • apps/customer-portal/microapp/src/pages/CaseDetailPage.tsx
  • apps/customer-portal/microapp/src/pages/ChangeDetailPage.tsx
  • apps/customer-portal/microapp/src/pages/ChatDetailPage.tsx
  • apps/customer-portal/microapp/src/pages/ChatPage.tsx
  • apps/customer-portal/microapp/src/pages/CreateCasePage.tsx
  • apps/customer-portal/microapp/src/pages/EditUserPage.tsx
  • apps/customer-portal/microapp/src/pages/EngagementDetailPage.tsx
  • apps/customer-portal/microapp/src/pages/HomePage.tsx
  • apps/customer-portal/microapp/src/pages/NotificationsPage.tsx
  • apps/customer-portal/microapp/src/pages/ProfilePage.tsx
  • apps/customer-portal/microapp/src/pages/SecurityReportAnalysisDetailPage.tsx
  • apps/customer-portal/microapp/src/pages/SelectProjectPage.tsx
  • apps/customer-portal/microapp/src/pages/ServiceDetailPage.tsx
  • apps/customer-portal/microapp/src/pages/SupportPage.tsx
  • apps/customer-portal/microapp/src/pages/UpdateProfileSettingsPage.tsx
  • apps/customer-portal/microapp/src/pages/UsersPage.tsx
  • apps/customer-portal/microapp/src/services/apiClient.ts
  • apps/customer-portal/microapp/src/services/auth.ts
  • apps/customer-portal/microapp/src/services/cases.ts
  • apps/customer-portal/microapp/src/services/changes.ts
  • apps/customer-portal/microapp/src/services/chats.ts
  • apps/customer-portal/microapp/src/services/engagements.ts
  • apps/customer-portal/microapp/src/services/metadata.ts
  • apps/customer-portal/microapp/src/services/projects.ts
  • apps/customer-portal/microapp/src/services/services.ts
  • apps/customer-portal/microapp/src/services/sra.ts
  • apps/customer-portal/microapp/src/services/users.ts
  • apps/customer-portal/microapp/src/theme/index.ts
  • apps/customer-portal/microapp/src/types/case.dto.ts
  • apps/customer-portal/microapp/src/types/case.model.ts
  • apps/customer-portal/microapp/src/types/change.dto.ts
  • apps/customer-portal/microapp/src/types/change.model.ts
  • apps/customer-portal/microapp/src/types/chat.dto.ts
  • apps/customer-portal/microapp/src/types/chat.model.ts
  • apps/customer-portal/microapp/src/types/engagement.dto.ts
  • apps/customer-portal/microapp/src/types/index.ts
  • apps/customer-portal/microapp/src/types/metadata.dto.ts
  • apps/customer-portal/microapp/src/types/novera.dto.ts
  • apps/customer-portal/microapp/src/types/pagination.types.ts
  • apps/customer-portal/microapp/src/types/project.dto.ts
  • apps/customer-portal/microapp/src/types/project.model.ts
  • apps/customer-portal/microapp/src/types/service.dto.ts
  • apps/customer-portal/microapp/src/types/service.model.ts
  • apps/customer-portal/microapp/src/types/user.dto.ts
  • apps/customer-portal/microapp/src/types/user.model.ts
  • apps/customer-portal/microapp/src/utils/others.ts
  • apps/customer-portal/microapp/vite.config.ts

📝 Walkthrough

Walkthrough

The pull request transforms the customer portal microapp from a mock-data-driven prototype to a fully server-integrated application. It removes static mock datasets, integrates React Query for server-backed data fetching, adds support for new item types (engagements, SRA, change requests), implements WebSocket-driven Novera chat streaming, introduces comprehensive type definitions and services, refactors page layouts with dynamic data binding, and updates the native bridge integration for device-aware positioning and app lifecycle management.

Changes

Cohort / File(s) Summary
App Configuration & Entry Point
apps/customer-portal/microapp/index.html, apps/customer-portal/microapp/package.json, src/main.tsx
Removed /config.js script loading, added new runtime dependencies (dayjs, dompurify, motion, ms, react-markdown, yup), replaced Asgardeo auth with custom token refresh logic via microapp bridge, and updated React Query retry behavior for 4xx errors.
Core App & Routing
src/App.tsx, src/components/layout/MainLayout.tsx, src/components/layout/RequireProject.tsx, src/components/layout/config.tsx
Added device safe-area CSS variables, refactored route structure to support nested routes (/profile/update, /sras/*, /engagements/*), removed standalone /notifications route, added ProjectScopeProvider wrapper, updated layout configuration with dynamic title support and scroll position overrides.
Core UI Components
src/components/core/AppBar.tsx, src/components/core/ErrorBoundary.tsx, src/components/core/Fab.tsx, src/components/core/Snackbar.tsx, src/components/core/TabBar.tsx, src/components/core/index.ts
Switched AppBar from mock projects to React Query-backed data, added sticky positioning with ResizeObserver height tracking, replaced notifications UI with ExitButton, added new ErrorBoundary error-handling component, added Fab floating action button with conditional navigation, added Snackbar notification component, made TabBar height observable and conditionally show admin Users action.
Chat Features
src/components/features/chat/MessageBubble.tsx, src/pages/ChatPage.tsx, src/pages/ChatDetailPage.tsx, src/services/chats.ts, src/types/chat.dto.ts, src/types/chat.model.ts
Added typewriter animation and "thinking" states to message bubbles, implemented WebSocket-driven Novera streaming for chat with live assistant response rendering, refactored ChatDetailPage to server-backed queries, created chats service with React Query integration, and defined chat DTOs/models.
Case Management
src/components/features/support/CaseListContent.tsx, src/pages/CaseDetailPage.tsx, src/services/cases.ts, src/types/case.dto.ts, src/types/case.model.ts, src/mocks/data/case.ts
Replaced mock case data with server-backed paginated queries, refactored CaseDetailPage to use React Query with dynamic status/priority chips and sanitized rich-text comments, created comprehensive cases service with mutation support for comments and classification, removed MOCK_ACTIVITY_TIMELINE.
Create Case with Classification
src/pages/CreateCasePage.tsx, src/components/features/create/ConversationSummary.tsx, src/components/features/create/Field.tsx
Implemented classification-based autofill from chat history, converted form field types from numbers to strings with data-driven option loading, added Yup validation schema, wired relatedCaseId flow, removed placeholder metrics sections and enhanced form UX with error/helper text support.
Change Request Management
src/pages/ChangeDetailPage.tsx, src/components/features/support/ChangeRequestListContent.tsx, src/services/changes.ts, src/types/change.dto.ts, src/types/change.model.ts, src/mocks/data/change.ts
Added change request list pagination with React Query, refactored ChangeDetailPage with progress timeline and sanitized content rendering, created changes service with infinite pagination, defined change request DTOs/models, removed mock stakeholders and timeline data.
Engagement & Call Request Handling
src/pages/EngagementDetailPage.tsx, src/components/features/support/EngagementListContent.tsx, src/services/engagements.ts, src/types/engagement.dto.ts
Added new engagement item type support with dedicated list/detail pages, implemented call request card component, created engagements service with infinite pagination, defined engagement DTOs including CallRequestDto with scheduling fields.
Security Report Analysis (SRA)
src/components/features/support/SecurityReportAnalysisListContent.tsx, src/services/sra.ts
Added new SRA list content component with infinite pagination and filtering, created dedicated SRA service layer with React Query integration.
Service Request Management
src/components/features/support/ServiceRequestListContent.tsx, src/services/services.ts, src/types/service.dto.ts, src/types/service.model.ts, src/mocks/data/service.ts
Refactored ServiceRequestListContent for server-backed infinite pagination, created services service layer with DTO mappers, defined service request DTOs/models, removed mock requirements and timeline data.
Project Management
src/components/features/projects/ProjectCard.tsx, src/components/features/projects/ProjectPopoverItem.tsx, src/components/features/projects/ProjectSelector.tsx, src/pages/SelectProjectPage.tsx, src/services/projects.ts, src/types/project.dto.ts, src/types/project.model.ts
Switched ProjectCard to shared Project type with optional metric handling via skeleton placeholders, refactored ProjectSelector to use React Query with Suspense/ErrorBoundary, replaced mock projects with server-backed infinite pagination, removed project status color logic from components, updated projects service with feature/deployment endpoints.
Support Features Base
src/components/features/support/ItemCard.tsx, src/components/features/support/ItemCardExtended.tsx, src/components/features/support/Chip.tsx, src/components/features/support/config.tsx, src/components/features/support/index.ts, src/components/features/support/CallRequestCard.tsx, src/components/features/support/ItemListView.tsx, src/components/features/support/FilterSlotBuilder.tsx, src/components/features/support/FilterSlotContent.tsx
Extended ItemCard/ItemCardExtended to support new item types (sra, engagement) with DTO-based rendering, refactored Chip components to use ID-driven filter lookups instead of direct enum mapping, added CallRequestCard component, created FilterSlotContent with dynamic filter option loading, expanded TYPE_CONFIG with new item types and severity/impact color mappings.
User Management
src/pages/UsersPage.tsx, src/pages/EditUserPage.tsx, src/components/features/users/UserListItem.tsx, src/components/features/users/RoleSelector.tsx, src/services/users.ts, src/types/user.dto.ts, src/types/user.model.ts
Replaced mock users with server-backed React Query queries, refactored EditUserPage with mutations for create/edit/delete with confirmation dialogs, updated UserListItem to use firstName/lastName with role mapping, simplified RoleSelector to fixed Portal User/System User roles, defined user DTOs/models with role constraints.
Profile & Settings
src/pages/ProfilePage.tsx, src/pages/UpdateProfileSettingsPage.tsx
Replaced hardcoded user data with React Query users.me() fetching, added app version display via bridge, implemented admin-gated AI features toggles with project mutations, created new UpdateProfileSettingsPage with phone/timezone editing and Yup validation.
Detail Page Components
src/components/features/detail/Comment.tsx, src/components/features/detail/InfoField.tsx, src/components/features/detail/MoreOptionsButton.tsx, src/components/features/detail/OverlineSlot.tsx, src/components/features/detail/ProgressTimeline.tsx, src/components/features/detail/StakeholderItem.tsx, src/components/features/detail/StickyCommentBar.tsx, src/components/features/detail/TimelineEntry.tsx, src/components/features/detail/index.ts
Added skeleton loading states across detail components, implemented dynamic OverlineSlot with IntersectionObserver-driven animation, created ProgressTimeline with computed active status from filter metadata, enhanced StickyCommentBar with loading state and bottom slot support, extended TimelineEntry to support rich node titles and multiple attachments, added MenuOptions component for contextual actions.
Shared UI Components
src/components/shared/ConfirmDialog.tsx, src/components/shared/EmptyState.tsx, src/components/shared/ErrorState.tsx, src/components/shared/InfiniteScroll.tsx, src/components/shared/RichText.tsx, src/components/shared/TypewriterText.tsx, src/components/shared/SectionCard.tsx, src/components/shared/index.ts
Added ConfirmDialog for destructive actions, created EmptyState and ErrorState UI components with customizable icons/text, implemented generic InfiniteScroll component with IntersectionObserver pagination, added RichText styled component for markdown rendering with custom pre/heading styles, created TypewriterText with token-by-token animation, made SectionCard title optional.
UI Fallback Components
src/components/ui/AuthorizationFallback.tsx, src/components/ui/LoadingFallback.tsx, src/components/ui/index.ts
Added AuthorizationFallback for permission-denied scenarios with exit action, created LoadingFallback centered loading spinner with high z-index.
Dashboard & Metrics
src/components/features/dashboard/BarChartWidget.tsx, src/components/features/dashboard/MetricWidget.tsx, src/components/features/dashboard/PieChartWidget.tsx, src/pages/HomePage.tsx
Made chart data optional with loading skeleton placeholders, refactored HomePage from mock metrics to React Query-backed dynamic data with permission-aware querying, added Fab component to support page.
Context & State Management
src/context/AppProvider.tsx, src/context/ProjectScopeProvider.tsx, src/context/layout/LayoutContext.tsx, src/context/layout/LayoutProvider.tsx, src/context/project/ProjectContext.tsx, src/context/project/ProjectProvider.tsx, src/context/filters/, src/context/me/, src/context/snackbar/, src/context/theme/index.tsx
Extended AppProvider with ColorModeProvider, SnackbarProvider, and MeProvider layers, added FiltersProvider/FiltersContext for project-scoped filter metadata, created MeProvider with user bootstrapping and auth fallback handling, added SnackbarProvider with queue-based notification management, created ColorModeProvider with system preference detection, extended ProjectContext with feature flags (noveraEnabled, kbReferencesEnabled) and local storage persistence.
Microapp Bridge Integration
src/components/microapp-bridge/index.ts, src/components/microapp-bridge/types.ts
Replaced QR/TOTP flows with separate ID/access token fetching, added device safe-area insets request, implemented URL browser opening, added app version retrieval, integrated goToMyAppsScreen navigation, updated window.nativebridge type declarations for new bridge methods.
Services Layer
src/services/apiClient.ts, src/services/auth.ts, src/services/metadata.ts, src/config/endpoints.ts
Added custom x-user-id-token header for token-based auth, implemented dual ID/access token refresh from separate bridge methods, created metadata service for timezone data, expanded endpoints configuration with 40+ new API path helpers for projects, cases, deployments, users, chat, change-requests, and websocket initialization.
Configuration & Constants
src/config/constants.ts, src/config/constants.tsx, src/utils/others.ts, src/theme/index.ts, src/index.css, vite.config.ts
Deleted old constants.ts, created comprehensive constants.tsx with project/severity/engagement color maps, timeline metadata, tab config, and item detail paths, added HTML-stripping and override-lookup utilities, implemented useScrollControl hook for path-based scroll positioning, added CSS keyframes for animations, set Vite base path to relative "./"
Type System & Models
src/types/index.ts, src/types/pagination.types.ts, src/types/novera.dto.ts, src/types/metadata.dto.ts
Created barrel type module re-exporting all DTOs/models, defined Pagination and PaginatedArray generic types, added Novera response DTOs for streaming protocol, defined MetadataDto for timezone configuration.
Mock Data Cleanup
src/mocks/data/home.ts, src/mocks/data/notifications.tsx, src/mocks/data/projects.ts, src/mocks/data/support.ts, src/mocks/data/users.ts
Removed all mock dashboard chart data, mock notifications, mock projects, mock support items, updated MOCK_ROLES with Portal User/System User roles, removed mock users and metrics.
List Content Infrastructure
src/pages/AllItemsPage.tsx, src/pages/SupportPage.tsx
Refactored AllItemsPage with ItemsListContent switch for per-type rendering, added FilterAppBarSlot with skeleton support, created ItemsListContentSkeleton and usePaginationSubtitleOverride, converted SupportPage to route-based tab handling with permission-aware tab visibility and per-tab service-backed content.

Sequence Diagram(s)

sequenceDiagram
    participant Client as Client (Chat UI)
    participant Bridge as Native Bridge
    participant WS as WebSocket (Novera)
    participant BE as Backend (Cases)
    
    Client->>Bridge: getAccessTokenFromBridge()
    Bridge-->>Client: accessToken
    
    Client->>Bridge: requestDeviceSafeAreaInsets()
    Bridge-->>Client: { insets: EdgeInsets }
    
    Client->>WS: connect with session/auth
    Client->>WS: send ChatMessage { content, conversationId, envProducts }
    WS-->>Client: ConversationCreatedNoveraResponse
    WS-->>Client: ThinkingStartNoveraResponse
    WS-->>Client: TokenNoveraResponse (streaming tokens)
    WS-->>Client: ThinkingStepNoveraResponse
    WS-->>Client: ThinkingEndNoveraResponse
    WS-->>Client: FinalNoveraResponse { message, sessionId }
    Client->>Client: onAnimationComplete() callback
    
    Client->>BE: POST /cases/classify { conversationId, messages, envProducts }
    BE-->>Client: { caseType, issue, severity, ... }
    Client->>Client: navigate('/create', { state: { classifications } })
Loading
sequenceDiagram
    participant Client as Client (Create Case Form)
    participant RQ as React Query
    participant BE as Backend (Cases/Projects)
    participant Auth as Auth Bridge
    
    Client->>RQ: useSuspenseQuery(projects.all())
    RQ->>Auth: getAccessTokenFromBridge()
    Auth-->>RQ: accessToken
    RQ->>BE: GET /projects/search
    BE-->>RQ: [ Project, ... ]
    RQ-->>Client: projects[]
    
    Client->>RQ: useQuery(projects.details(projectId))
    RQ->>BE: GET /projects/{id}/details
    BE-->>RQ: { deployments, ... }
    RQ-->>Client: deploymentOptions[]
    
    Client->>Client: if location.state.classifications, autofill form fields
    Client->>Client: update Formik values { project, deployment, product, type, severity, ... }
    
    Client->>RQ: useMutation(cases.create)
    Client->>Client: user clicks Submit
    RQ->>BE: POST /cases { projectId, type, severity, description, envProducts, relatedCaseId? }
    BE-->>RQ: { caseId, ... }
    RQ->>Client: onSuccess: navigate('/cases/{id}')
Loading
sequenceDiagram
    participant Client as Client (Detail Page)
    participant Comment as StickyCommentBar
    participant RQ as React Query
    participant BE as Backend (Cases)
    
    Client->>RQ: useQuery(cases.comments(id))
    RQ->>BE: GET /cases/{id}/comments
    BE-->>RQ: [ Comment, ... ]
    RQ-->>Client: comments[]
    Client->>Client: render Comment list + sanitize HTML
    
    Comment->>Comment: user types, input enabled
    Client->>Comment: loading={mutation.isPending}
    Comment->>Comment: user clicks Send
    Comment->>RQ: useMutation(cases.createComment(id))
    RQ->>BE: POST /cases/{id}/comments { content, ... }
    BE-->>RQ: { commentId, ... }
    RQ->>RQ: invalidateQueries(['case-comments', id])
    RQ->>RQ: refetch comments
    RQ-->>Client: updated comments[]
    Client->>Client: scroll sentinel into view
    Comment->>Comment: clear input
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

Suggested labels

Type/New Feature, Type/Improvement, Type/UX, App/Customer Portal, Area/Frontend, Platform/Microapp

Suggested reviewers

  • v15a1

Poem

🐰 A thousand mocks now dance away,
Real queries bloom in Hooks' ballet,
Chat streams like whispers through the wire,
Safe insets and scrolls climb ever higher,
The portal transforms, strong and bright,
From mock dreams into server's light!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch customer-portal-milestone-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants