From 118fe93274c6f480d03045886eb41759edeed8ae Mon Sep 17 00:00:00 2001 From: "K.Dileepa Thushan Peiris" Date: Sat, 25 Apr 2026 11:08:41 +0530 Subject: [PATCH 01/10] Refactor ChatMessageBubble formatting & markdown Reformat JSX and style objects for readability and consistency in ChatMessageBubble.tsx (multi-line imports, useMemo, sx props, and ReactMarkdown props). Replace the previous Typography rendering for message.thinkingSteps with a Box + MarkdownContent so thinking steps are rendered as markdown (styled p/li) for correct wrapping and styling. Overall small tidy-up to improve markdown handling and code clarity. --- .../novera-chat-page/ChatMessageBubble.tsx | 56 +++++++++++++------ .../support/pages/DescribeIssuePage.tsx | 1 + .../src/features/support/types/cases.ts | 1 + 3 files changed, 42 insertions(+), 16 deletions(-) diff --git a/apps/customer-portal/webapp/src/features/support/components/novera-ai-assistant/novera-chat-page/ChatMessageBubble.tsx b/apps/customer-portal/webapp/src/features/support/components/novera-ai-assistant/novera-chat-page/ChatMessageBubble.tsx index e2f4ef5782..625b109699 100644 --- a/apps/customer-portal/webapp/src/features/support/components/novera-ai-assistant/novera-chat-page/ChatMessageBubble.tsx +++ b/apps/customer-portal/webapp/src/features/support/components/novera-ai-assistant/novera-chat-page/ChatMessageBubble.tsx @@ -15,7 +15,15 @@ // under the License. import type { ChatMessageBubbleProps } from "@features/support/types/supportComponents"; -import { Avatar, Box, Paper, Stack, Typography, alpha, useTheme } from "@wso2/oxygen-ui"; +import { + Avatar, + Box, + Paper, + Stack, + Typography, + alpha, + useTheme, +} from "@wso2/oxygen-ui"; import { Bot, User } from "@wso2/oxygen-ui-icons-react"; import { type JSX, useEffect, useMemo, useRef } from "react"; import ReactMarkdown from "react-markdown"; @@ -64,10 +72,7 @@ const primaryWaveTextSx = { function MarkdownContent({ text }: { text: string }) { const markdownComponents: React.ComponentProps< typeof ReactMarkdown - >["components"] = useMemo( - () => buildBotMarkdownComponents(), - [], - ); + >["components"] = useMemo(() => buildBotMarkdownComponents(), []); return ( - + {text} @@ -195,7 +207,10 @@ export default function ChatMessageBubble({ {message.createdBy || "You"} @@ -352,14 +373,17 @@ export default function ChatMessageBubble({ {message.thinkingSteps && message.thinkingSteps.length > 0 && ( {message.thinkingSteps.map((step, idx) => ( - - {`• ${step}`} - + + ))} )} diff --git a/apps/customer-portal/webapp/src/features/support/pages/DescribeIssuePage.tsx b/apps/customer-portal/webapp/src/features/support/pages/DescribeIssuePage.tsx index e9e6354321..1b4396d6d6 100644 --- a/apps/customer-portal/webapp/src/features/support/pages/DescribeIssuePage.tsx +++ b/apps/customer-portal/webapp/src/features/support/pages/DescribeIssuePage.tsx @@ -250,6 +250,7 @@ export default function DescribeIssuePage(): JSX.Element { loading={isLoadingAfterClick} loadingPosition="start" disabled={isSubmitDisabled} + sx={{ py: 0.5 }} > Submit & Get Help diff --git a/apps/customer-portal/webapp/src/features/support/types/cases.ts b/apps/customer-portal/webapp/src/features/support/types/cases.ts index 299dcb6727..0e718c5bd0 100644 --- a/apps/customer-portal/webapp/src/features/support/types/cases.ts +++ b/apps/customer-portal/webapp/src/features/support/types/cases.ts @@ -249,6 +249,7 @@ export type CaseComment = AuditMetadata & { downloadUrl?: string; createdByFirstName?: string | null; createdByLastName?: string | null; + createdByFullName?: string | null; isEscalated: boolean; hasInlineAttachments?: boolean; inlineAttachments?: CaseCommentInlineAttachment[]; From b3dffb8f18cdf493f5af50c5c965c6210a69f372 Mon Sep 17 00:00:00 2001 From: "K.Dileepa Thushan Peiris" Date: Sat, 25 Apr 2026 11:09:05 +0530 Subject: [PATCH 02/10] Prefer full name; update settings UI styles Use createdByFullName in case comment data and prefer it when rendering author names (fall back to createdBy or "Unknown"). Simplify name handling by removing manual first/last concatenation. Update Settings UI: import alpha and switch SettingsAiAssistant visuals from grey to blue accents with alpha transparency, adjust avatar/icon colors and remove avatar border. Also increase vertical spacing on SettingsPage (gap 1 -> 3) for improved layout. --- .../settings/components/SettingsAiAssistant.tsx | 12 +++++++----- .../src/features/settings/pages/SettingsPage.tsx | 2 +- .../src/features/support/api/useGetCaseComments.ts | 1 + .../case-details/activity-tab/CommentBubble.tsx | 8 ++------ 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/apps/customer-portal/webapp/src/features/settings/components/SettingsAiAssistant.tsx b/apps/customer-portal/webapp/src/features/settings/components/SettingsAiAssistant.tsx index 7489fa0352..85c3aa5db4 100644 --- a/apps/customer-portal/webapp/src/features/settings/components/SettingsAiAssistant.tsx +++ b/apps/customer-portal/webapp/src/features/settings/components/SettingsAiAssistant.tsx @@ -21,6 +21,7 @@ import { Paper, Switch, Typography, + alpha, colors, } from "@wso2/oxygen-ui"; import { Bot, Sparkles } from "@wso2/oxygen-ui-icons-react"; @@ -138,9 +139,9 @@ export default function SettingsAiAssistant({ @@ -148,15 +149,16 @@ export default function SettingsAiAssistant({ sx={{ width: 40, height: 40, - bgcolor: colors.grey[200], - color: colors.grey[700], + bgcolor: alpha(colors.blue[500], 0.12), + color: colors.blue[700], display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0, + border: "none", }} > - + diff --git a/apps/customer-portal/webapp/src/features/settings/pages/SettingsPage.tsx b/apps/customer-portal/webapp/src/features/settings/pages/SettingsPage.tsx index 051fc0720e..0c919ee6ad 100644 --- a/apps/customer-portal/webapp/src/features/settings/pages/SettingsPage.tsx +++ b/apps/customer-portal/webapp/src/features/settings/pages/SettingsPage.tsx @@ -98,7 +98,7 @@ export default function SettingsPage(): JSX.Element { } return ( - + ({ id: t.id, diff --git a/apps/customer-portal/webapp/src/features/support/api/useGetCaseComments.ts b/apps/customer-portal/webapp/src/features/support/api/useGetCaseComments.ts index 3c54d1212c..a7c6a7ed63 100644 --- a/apps/customer-portal/webapp/src/features/support/api/useGetCaseComments.ts +++ b/apps/customer-portal/webapp/src/features/support/api/useGetCaseComments.ts @@ -55,6 +55,7 @@ export default function useGetCaseComments( createdBy: activity.createdBy, createdByFirstName: activity.createdByFirstName, createdByLastName: activity.createdByLastName, + createdByFullName: activity.createdByFullName, type: activity.type, fileName: activity.fileName, contentType: activity.contentType, diff --git a/apps/customer-portal/webapp/src/features/support/components/case-details/activity-tab/CommentBubble.tsx b/apps/customer-portal/webapp/src/features/support/components/case-details/activity-tab/CommentBubble.tsx index be2df0c785..8314a3d278 100644 --- a/apps/customer-portal/webapp/src/features/support/components/case-details/activity-tab/CommentBubble.tsx +++ b/apps/customer-portal/webapp/src/features/support/components/case-details/activity-tab/CommentBubble.tsx @@ -59,12 +59,8 @@ import { useResolvedInlineImageHtml } from "@features/support/hooks/useResolvedI import { useGetAttachment } from "@api/useGetAttachment"; function commentAuthorDisplayName(comment: CaseComment): string { - const fromNames = [comment.createdByFirstName, comment.createdByLastName] - .filter((p) => p != null && String(p).trim() !== "") - .join(" ") - .trim(); - if (fromNames.length > 0) { - return fromNames; + if (comment.createdByFullName?.trim()) { + return comment.createdByFullName.trim(); } return comment.createdBy?.trim() || "Unknown"; } From 9baa8e978de95d98315a5df7a80b5dae4b3d29dd Mon Sep 17 00:00:00 2001 From: "K.Dileepa Thushan Peiris" Date: Sat, 25 Apr 2026 11:09:19 +0530 Subject: [PATCH 03/10] Remove Resolved Items section from dashboard Remove the derived visibleResolvedSections and the entire rendering block for resolved items shown in outstanding mode. The resolvedSections variable is retained with a void statement to avoid unused-variable linting. This cleans up the dashboard by removing the resolved-items accordion, counts, lists, navigation buttons, and the "No resolved items found" fallback. --- .../dashboard/pages/DashboardItemsPage.tsx | 145 +----------------- 1 file changed, 1 insertion(+), 144 deletions(-) diff --git a/apps/customer-portal/webapp/src/features/dashboard/pages/DashboardItemsPage.tsx b/apps/customer-portal/webapp/src/features/dashboard/pages/DashboardItemsPage.tsx index fd065cfb43..c201ce99fa 100644 --- a/apps/customer-portal/webapp/src/features/dashboard/pages/DashboardItemsPage.tsx +++ b/apps/customer-portal/webapp/src/features/dashboard/pages/DashboardItemsPage.tsx @@ -710,12 +710,7 @@ export default function DashboardItemsPage({ (s) => s.hasPermission && (s.isLoading || s.total > 0 || s.isError), ); - const visibleResolvedSections = - isPageLoading || isPageError - ? [] - : resolvedSections.filter( - (s) => s.hasPermission && (s.isLoading || s.total > 0 || s.isError), - ); + void resolvedSections; return ( @@ -871,144 +866,6 @@ export default function DashboardItemsPage({ ))} - {isOutstandingMode && ( - <> - 0 ? 1 : 0 }} - > - Resolved Items - - {visibleResolvedSections.map((section) => ( - toggleSection(section.id)} - disableGutters - elevation={0} - sx={{ - "&:before": { display: "none" }, - border: "1px solid", - borderColor: "divider", - borderRadius: 2, - overflow: "hidden", - bgcolor: "background.paper", - }} - > - } - sx={{ px: 2.5, py: 1.5, minHeight: 56 }} - > - - - {section.label} - - {section.isLoading ? ( - - ) : ( - - )} - - - - {section.isCr ? ( - <> - - - - {section.total > 10 && ( - <> - - - - - - )} - - ) : ( - <> - - - - {section.total > 10 && ( - <> - - - - - - )} - - )} - - - ))} - {!isPageLoading && - !isPageError && - visibleResolvedSections.length === 0 && ( - - - No resolved items found. - - - )} - - )} {isPageError && ( From e02fdb54158e92b33167048b5c1cd8b85da6bc16 Mon Sep 17 00:00:00 2001 From: "K.Dileepa Thushan Peiris" Date: Sat, 25 Apr 2026 11:27:14 +0530 Subject: [PATCH 04/10] Use lighter purple for proposed solution status Change the color for CaseStatus.SOLUTION_PROPOSED from colors.purple[900] to colors.purple[300]. This makes the status display a lighter purple to improve visibility and better align with the UI design. --- .../webapp/src/features/support/utils/support.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/customer-portal/webapp/src/features/support/utils/support.ts b/apps/customer-portal/webapp/src/features/support/utils/support.ts index fc1bb57041..4232436491 100644 --- a/apps/customer-portal/webapp/src/features/support/utils/support.ts +++ b/apps/customer-portal/webapp/src/features/support/utils/support.ts @@ -985,7 +985,7 @@ export function getStatusColor(label?: string): string { case CaseStatus.WAITING_ON_WSO2: return colors.yellow[800]; case CaseStatus.SOLUTION_PROPOSED: - return colors.purple[900]; + return colors.purple[300]; case CaseStatus.CLOSED: return colors.grey[500]; case CaseStatus.REOPENED: From 6df84cd978955c2315259e2235ea7845a5683c80 Mon Sep 17 00:00:00 2001 From: "K.Dileepa Thushan Peiris" Date: Sat, 25 Apr 2026 11:27:52 +0530 Subject: [PATCH 05/10] Refactor OutstandingCasesSkeleton layout Replace the previous CardHeader-based skeleton with a simpler, stacked layout using Stack and Box. Added Stack to imports, removed the CardHeader and various individual Skeleton nodes, and reorganized the skeleton into explicit Header (internalId/number/status), Content (title + description) and Footer (assigned engineer + relative time) sections with adjusted skeleton sizes. Also removed the explicit minHeight to let the new layout size naturally. --- .../OutstandingCasesSkeleton.tsx | 57 ++++++++----------- 1 file changed, 23 insertions(+), 34 deletions(-) diff --git a/apps/customer-portal/webapp/src/features/support/components/support-overview-cards/OutstandingCasesSkeleton.tsx b/apps/customer-portal/webapp/src/features/support/components/support-overview-cards/OutstandingCasesSkeleton.tsx index cb07b5ef91..cdfc4106c1 100644 --- a/apps/customer-portal/webapp/src/features/support/components/support-overview-cards/OutstandingCasesSkeleton.tsx +++ b/apps/customer-portal/webapp/src/features/support/components/support-overview-cards/OutstandingCasesSkeleton.tsx @@ -15,7 +15,7 @@ // under the License. import { SUPPORT_OVERVIEW_CASES_LIMIT } from "@features/support/constants/supportConstants"; -import { Box, Form, Skeleton } from "@wso2/oxygen-ui"; +import { Box, Form, Skeleton, Stack } from "@wso2/oxygen-ui"; import { type JSX } from "react"; /** @@ -37,42 +37,31 @@ export default function OutstandingCasesSkeleton(): JSX.Element { flexDirection: "column", alignItems: "stretch", gap: 1, - minHeight: "180px", }} > - - - - - } - /> - - - - + {/* Header: internalId | number | status dot + label */} + + + + + + + + + + + {/* Content: title + description */} + + + + + + {/* Footer: assigned engineer + relative time */} + + + + ))} From e0bdb4f106dd00e39065f2707e04729a11903ebe Mon Sep 17 00:00:00 2001 From: "K.Dileepa Thushan Peiris" Date: Sat, 25 Apr 2026 11:28:03 +0530 Subject: [PATCH 06/10] Add sessionStorage helpers for pending UI state Introduce two new sessionStorage keys and helper functions to persist small UI state across a page reload: PENDING_SETTINGS_TAB_KEY and PENDING_SUCCESS_MESSAGE_KEY. Adds setPendingSettingsTab / consumePendingSettingsTab and setPendingSuccessMessage / consumePendingSuccessMessage to store, read and clear a pending settings tab id and a pending success message respectively. All operations use try/catch to safely handle storage errors and remove items when consumed. --- .../settings/utils/settingsStorage.ts | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/apps/customer-portal/webapp/src/features/settings/utils/settingsStorage.ts b/apps/customer-portal/webapp/src/features/settings/utils/settingsStorage.ts index fa98863e0b..088e1e05fc 100644 --- a/apps/customer-portal/webapp/src/features/settings/utils/settingsStorage.ts +++ b/apps/customer-portal/webapp/src/features/settings/utils/settingsStorage.ts @@ -17,6 +17,8 @@ const SIDEBAR_COLLAPSED_KEY = "sidebar_collapsed"; const LAST_SELECTED_PROJECT_ID_KEY = "last_selected_project_id"; const NOVERA_CHAT_ENABLED_KEY = "novera_chat_enabled"; +const PENDING_SUCCESS_MESSAGE_KEY = "pending_success_message"; +const PENDING_SETTINGS_TAB_KEY = "pending_settings_tab"; /** @@ -101,3 +103,59 @@ export function setNoveraChatEnabled(enabled: boolean): void { return; } } + +/** + * Stores the settings tab to restore after the next page reload. + * + * @param {string} tabId - The tab id to restore. + */ +export function setPendingSettingsTab(tabId: string): void { + try { + sessionStorage.setItem(PENDING_SETTINGS_TAB_KEY, tabId); + } catch { + return; + } +} + +/** + * Reads and clears the pending post-reload settings tab. + * + * @returns {string | null} The tab id, or null if none is pending. + */ +export function consumePendingSettingsTab(): string | null { + try { + const tab = sessionStorage.getItem(PENDING_SETTINGS_TAB_KEY); + if (tab !== null) sessionStorage.removeItem(PENDING_SETTINGS_TAB_KEY); + return tab; + } catch { + return null; + } +} + +/** + * Stores a success message to be shown after the next page reload. + * + * @param {string} message - The success message. + */ +export function setPendingSuccessMessage(message: string): void { + try { + sessionStorage.setItem(PENDING_SUCCESS_MESSAGE_KEY, message); + } catch { + return; + } +} + +/** + * Reads and clears the pending post-reload success message. + * + * @returns {string | null} The message, or null if none is pending. + */ +export function consumePendingSuccessMessage(): string | null { + try { + const msg = sessionStorage.getItem(PENDING_SUCCESS_MESSAGE_KEY); + if (msg !== null) sessionStorage.removeItem(PENDING_SUCCESS_MESSAGE_KEY); + return msg; + } catch { + return null; + } +} From 7107ae7728036ebe7676f7baabda84b7587cb0e2 Mon Sep 17 00:00:00 2001 From: "K.Dileepa Thushan Peiris" Date: Sat, 25 Apr 2026 11:28:23 +0530 Subject: [PATCH 07/10] Restore pending settings tab on mount Read any pending settings tab stored in settingsStorage when SettingsPage mounts and apply it to the active tab. Adds useEffect and imports consumePendingSettingsTab, preserving the existing default (USERS) when no pending value is present. --- .../webapp/src/features/settings/pages/SettingsPage.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/customer-portal/webapp/src/features/settings/pages/SettingsPage.tsx b/apps/customer-portal/webapp/src/features/settings/pages/SettingsPage.tsx index 0c919ee6ad..3109178de2 100644 --- a/apps/customer-portal/webapp/src/features/settings/pages/SettingsPage.tsx +++ b/apps/customer-portal/webapp/src/features/settings/pages/SettingsPage.tsx @@ -16,7 +16,7 @@ import { Box, Typography } from "@wso2/oxygen-ui"; import { useParams } from "react-router"; -import { useState, useMemo, type JSX } from "react"; +import { useState, useMemo, useEffect, type JSX } from "react"; import useGetUserDetails from "@features/settings/api/useGetUserDetails"; import useGetProjectDetails from "@api/useGetProjectDetails"; import TabBar from "@components/tab-bar/TabBar"; @@ -30,6 +30,7 @@ import { } from "@features/settings/constants/settingsConstants"; import { SettingsPageTabId } from "@features/settings/types/settings"; import { resolveSettingsPageTabId } from "@features/settings/utils/settingsPage"; +import { consumePendingSettingsTab } from "@features/settings/utils/settingsStorage"; import { ProjectType } from "@/types/permission"; import { isProjectRestricted } from "@utils/permission"; @@ -42,6 +43,11 @@ export default function SettingsPage(): JSX.Element { const { projectId } = useParams<{ projectId: string }>(); const [activeTab, setActiveTab] = useState(SettingsPageTabId.USERS); const { data: userDetails } = useGetUserDetails(); + + useEffect(() => { + const pending = consumePendingSettingsTab(); + if (pending) setActiveTab(pending); + }, []); const { data: projectDetails } = useGetProjectDetails(projectId || ""); const isCustomerAdmin = useMemo( From 7bc95951e6b817edcea7ed84736abe722a32b689 Mon Sep 17 00:00:00 2001 From: "K.Dileepa Thushan Peiris" Date: Sat, 25 Apr 2026 11:28:34 +0530 Subject: [PATCH 08/10] Persist AI setting change and trigger reload Replace in-place refetch flow with a pending-state + full reload approach for AI assistant toggles. Removed infinite projects refetch and SuccessBanner usage; notifyPatchSuccess now stores pending settings tab and success message via settingsStorage (setPendingSettingsTab, setPendingSuccessMessage) and calls window.location.reload() to let the app pick up updated project state. Updated imports accordingly and simplified notifyPatchSuccess usage. --- .../components/SettingsAiAssistant.tsx | 33 +++++++------------ 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/apps/customer-portal/webapp/src/features/settings/components/SettingsAiAssistant.tsx b/apps/customer-portal/webapp/src/features/settings/components/SettingsAiAssistant.tsx index 85c3aa5db4..5e18ef63a9 100644 --- a/apps/customer-portal/webapp/src/features/settings/components/SettingsAiAssistant.tsx +++ b/apps/customer-portal/webapp/src/features/settings/components/SettingsAiAssistant.tsx @@ -27,11 +27,13 @@ import { import { Bot, Sparkles } from "@wso2/oxygen-ui-icons-react"; import { useCallback, useState, useMemo, useEffect, type JSX } from "react"; import useGetProjectDetails from "@api/useGetProjectDetails"; -import useInfiniteProjects from "@api/useGetProjects"; import { usePatchProject } from "@features/settings/api/usePatchProject"; -import { useSuccessBanner } from "@context/success-banner/SuccessBannerContext"; import { useErrorBanner } from "@context/error-banner/ErrorBannerContext"; -import { setNoveraChatEnabled } from "@features/settings/utils/settingsStorage"; +import { + setNoveraChatEnabled, + setPendingSuccessMessage, + setPendingSettingsTab, +} from "@features/settings/utils/settingsStorage"; import { SETTINGS_AI_ADMIN_ONLY_HINT, SETTINGS_AI_CAPABILITIES_SECTION_TITLE, @@ -57,12 +59,7 @@ export default function SettingsAiAssistant({ projectId, canEdit = true, }: SettingsAiAssistantProps): JSX.Element { - const { showSuccess } = useSuccessBanner(); const { showError } = useErrorBanner(); - const { refetch: refetchProjects } = useInfiniteProjects({ - pageSize: 20, - enabled: !!projectId, - }); const { data: projectDetails, isLoading: isProjectDetailsLoading } = useGetProjectDetails(projectId); const patchProject = usePatchProject(projectId); @@ -85,20 +82,12 @@ export default function SettingsAiAssistant({ }, [projectHasAgent]); const notifyPatchSuccess = useCallback( - async (kind: AiAssistantPatchSuccessKind) => { - const refreshed = await refetchProjects(); - const refreshedProject = refreshed.data?.pages - ?.flatMap((page) => page.projects ?? []) - ?.find((p) => p.id === projectId); - setNoveraOverride(null); - if (refreshedProject?.hasAgent !== undefined) { - setNoveraChatEnabled(refreshedProject.hasAgent); - } else if (projectDetails?.hasAgent !== undefined) { - setNoveraChatEnabled(projectDetails.hasAgent); - } - showSuccess(getAiAssistantPatchSuccessMessage(kind)); + (kind: AiAssistantPatchSuccessKind) => { + setPendingSettingsTab("ai"); + setPendingSuccessMessage(getAiAssistantPatchSuccessMessage(kind)); + window.location.reload(); }, - [projectDetails, projectId, refetchProjects, showSuccess], + [], ); const handlePatchError = useCallback( @@ -119,7 +108,7 @@ export default function SettingsAiAssistant({ setNoveraChatEnabled(checked); patchProject.mutate(checked ? { hasAgent: true } : { hasAgent: false }, { onSuccess: () => { - void notifyPatchSuccess(AiAssistantPatchSuccessKind.NOVERA); + notifyPatchSuccess(AiAssistantPatchSuccessKind.NOVERA); }, onError: (err) => { handlePatchError(err); From 93964641ba5a08926b3001fda353a92ae88ec1ff Mon Sep 17 00:00:00 2001 From: "K.Dileepa Thushan Peiris" Date: Sat, 25 Apr 2026 11:28:48 +0530 Subject: [PATCH 09/10] Prefer case.internalId; update error message Prefer cr.case.internalId when mapping changeRequests so the internalId reflects the associated case if present (falling back to cr.internalId). Also simplify SERVICENOW_REDIRECT_RESOLVE_ERROR text to a more generic "Something went wrong" message. --- .../webapp/src/features/operations/pages/OperationsPage.tsx | 2 +- .../src/features/project-hub/constants/projectHubConstants.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/customer-portal/webapp/src/features/operations/pages/OperationsPage.tsx b/apps/customer-portal/webapp/src/features/operations/pages/OperationsPage.tsx index a5f14c497e..ae09890d20 100644 --- a/apps/customer-portal/webapp/src/features/operations/pages/OperationsPage.tsx +++ b/apps/customer-portal/webapp/src/features/operations/pages/OperationsPage.tsx @@ -153,7 +153,7 @@ export default function OperationsPage(): JSX.Element { () => changeRequests.map((cr) => ({ id: cr.id, - internalId: cr.internalId ?? undefined, + internalId: cr.case?.internalId ?? cr.internalId ?? undefined, number: cr.number, title: cr.title, description: cr.description ?? "", diff --git a/apps/customer-portal/webapp/src/features/project-hub/constants/projectHubConstants.ts b/apps/customer-portal/webapp/src/features/project-hub/constants/projectHubConstants.ts index 4a284c9a38..2c111ca88d 100644 --- a/apps/customer-portal/webapp/src/features/project-hub/constants/projectHubConstants.ts +++ b/apps/customer-portal/webapp/src/features/project-hub/constants/projectHubConstants.ts @@ -85,4 +85,4 @@ export const SERVICENOW_REDIRECT_NO_CASE_ID = "No case ID provided in the URL."; export const SERVICENOW_REDIRECT_RESOLVE_ERROR = - "Unable to resolve the case. Please try again."; + "Something went wrong"; From 5fd39c1b0c12b77bcab80c84551ab51b6defb1ac Mon Sep 17 00:00:00 2001 From: "K.Dileepa Thushan Peiris" Date: Sat, 25 Apr 2026 11:29:02 +0530 Subject: [PATCH 10/10] Add loading skeletons, consume pending success GetHelpDropdown: add Stack import and return a compact skeleton row (buttons + divider) when projects list is busy to improve loading UX. SuccessBannerContext: import and call consumePendingSuccessMessage on mount; if a pending message exists, show it and bump the key so persisted success banners are displayed after navigation. ChangeRequestsListSkeleton: refine skeleton layout to better mirror the final row (add state dot + label, pipes and spacing tweaks, and adjust several skeleton widths) for a more accurate placeholder representation. --- .../src/components/header/GetHelpDropdown.tsx | 15 +++++++++++++++ .../success-banner/SuccessBannerContext.tsx | 9 +++++++++ .../ChangeRequestsListSkeleton.tsx | 14 +++++++++++--- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/apps/customer-portal/webapp/src/components/header/GetHelpDropdown.tsx b/apps/customer-portal/webapp/src/components/header/GetHelpDropdown.tsx index 768ab4957d..2a03205b62 100644 --- a/apps/customer-portal/webapp/src/components/header/GetHelpDropdown.tsx +++ b/apps/customer-portal/webapp/src/components/header/GetHelpDropdown.tsx @@ -22,6 +22,7 @@ import { Menu, MenuItem, Skeleton, + Stack, Typography, } from "@wso2/oxygen-ui"; import { @@ -158,6 +159,20 @@ function GetHelpDropdownContent(): JSX.Element { : []), ]; + if (isProjectsListBusy) { + return ( + + + + + + ); + } + return ( diff --git a/apps/customer-portal/webapp/src/context/success-banner/SuccessBannerContext.tsx b/apps/customer-portal/webapp/src/context/success-banner/SuccessBannerContext.tsx index 549a76485c..959111a0c3 100644 --- a/apps/customer-portal/webapp/src/context/success-banner/SuccessBannerContext.tsx +++ b/apps/customer-portal/webapp/src/context/success-banner/SuccessBannerContext.tsx @@ -27,6 +27,7 @@ import { } from "react"; import { ERROR_BANNER_TIMEOUT_MS } from "@constants/common"; +import { consumePendingSuccessMessage } from "@features/settings/utils/settingsStorage"; interface SuccessBannerContextType { /** Show the success banner with the given message. */ @@ -54,6 +55,14 @@ export function SuccessBannerProvider({ const [message, setMessage] = useState(null); const [key, setKey] = useState(0); + useEffect(() => { + const pending = consumePendingSuccessMessage(); + if (pending) { + setMessage(pending); + setKey((prev) => prev + 1); + } + }, []); + const showSuccess = useCallback((msg: string) => { setMessage(msg); setKey((prev) => prev + 1); diff --git a/apps/customer-portal/webapp/src/features/operations/components/change-requests/ChangeRequestsListSkeleton.tsx b/apps/customer-portal/webapp/src/features/operations/components/change-requests/ChangeRequestsListSkeleton.tsx index c209846349..2e819aec64 100644 --- a/apps/customer-portal/webapp/src/features/operations/components/change-requests/ChangeRequestsListSkeleton.tsx +++ b/apps/customer-portal/webapp/src/features/operations/components/change-requests/ChangeRequestsListSkeleton.tsx @@ -63,8 +63,14 @@ export default function ChangeRequestsListSkeleton(): JSX.Element { flexWrap: "wrap", }} > + {/* CR number | state dot+label | pipe | case internalId | pipe | case number | pipe | product */} - + + + + + + @@ -79,9 +85,11 @@ export default function ChangeRequestsListSkeleton(): JSX.Element { flexWrap: "wrap", }} > - + + + - +