Skip to content

[CSM Portal] Add refresh buttons to case detail tabs and list pages - #1354

Merged
rksk merged 2 commits into
wso2-open-operations:mainfrom
Hesara2003:feature/csm-tab-list-refresh-buttons
Aug 4, 2026
Merged

rksk merged 2 commits into
wso2-open-operations:mainfrom
Hesara2003:feature/csm-tab-list-refresh-buttons

Conversation

@Hesara2003

@Hesara2003 Hesara2003 commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

ServiceNow lets you refresh an individual tab within a case's details. In the CSM portal
webapp, seeing changed data anywhere — a case detail tab, or any searchable list page —
required a full page reload. There was no way to just re-pull one tab's or one list's data.

Goals

Add a refresh control everywhere a tab or page shows live, potentially-stale query data, so
a user can pull fresh data in place instead of reloading the whole page.

Approach

Reused the existing RefreshButton component (icon button + "Last refreshed X ago" hint),
already used on the dashboard's widget cards — same look and behavior everywhere now.

Every button wires directly to the underlying React Query hook's own
refetch/isFetching/dataUpdatedAt. No new query keys, no cross-component cache
invalidation — every hook touched here is a plain useQuery passthrough, so this is additive
wiring, not a data-layer change.

Case detail page (CsmCaseDetailPage.tsx) — every tab:

  • Activities: one button refreshes all of its merged sources (comments, state-change audit,
    linked chat, attachments, call requests).
  • Details: case detail + project + live deployment.
  • Linked Items: a page-level button refreshes the case-detail-sourced ref lists, plus each of
    the three sub-widgets (Child cases, Linked service requests, Linked change requests) got its
    own button for its own enrichment query.
  • Watchers, Attachments, Time tracking, Call requests: each wired to its own query.
  • SLA and Tasks tabs were not touched — both are hidden: true in TAB_DEFS and
    unreachable from the tab bar in this build.

List pages — one button per page/tab, wired to that page's search hook:

  • Cases, Operations → Service Requests, Security Center → Security Reports, Engagements: all
    share CsmIssuesView, so one change covers all four.
  • Operations → Change Requests / Incidents / Problems, Security Center → Vulnerabilities: each
    has its own tab component.
  • Admin → Users: its own page.
  • Admin → Roles / Groups / Teams: share DirectoryEntityTable; their member pages share
    DirectoryMembersList — one change each covers three pages.
  • Customers → Accounts / Projects, Announcements: each its own page.
  • Updates: refresh only applies once a search has run (the page is filter-then-search, not a
    live list) — reruns the same search.
  • Time Cards: all three tabs (My sheets / All / Approvals) independently.
  • Dashboard widget "View more" preview page.

User stories

As a CS engineer, I can refresh a single case-detail tab or list page in place, without
reloading the whole app and losing my scroll position/filters/open dialogs.

Release note

Case detail tabs and list pages across the CSM portal now have a refresh button, so you no
longer need to reload the page to see updated data.

Documentation

N/A — no published documentation covers this internal UI behavior.

Training

N/A.

Certification

N/A.

Marketing

N/A.

Automation tests

  • Unit tests: none added — this is additive UI wiring onto existing, already-tested query
    hooks; no new query/business logic to unit test. tsc -b and eslint clean on every touched
    file. The existing vitest suites for these features were re-run (csm-cases, csm-admin,
    csm-operations, csm-security-center, csm-accounts, csm-projects,
    csm-announcements, updates, csm-timecards, csm-users, csm-dashboard): the only
    failures are 6 pre-existing ones (CsmRolesPage.test.tsx, CsmAnnouncementsPage.test.tsx),
    confirmed via git stash to fail identically without this change.
  • Production vite build clean.
  • Integration tests: none — no integration-test harness exists for this app. Not manually
    verified in a browser
    — I don't have a live backend/Asgardeo session in this environment,
    so only the type-check/lint/test/build gates are confirmed, not an actual click-through.

Security checks

Samples

N/A

Related PRs

None.

Migrations (if applicable)

N/A — no schema or data change, UI-only.

Test environment

  • Node.js, pnpm (via ./node_modules/.bin/* directly — the pnpm CLI itself errors with
    "packages field missing or empty" in this environment).
  • macOS.
  • tsc -b, eslint, vitest, vite build — all clean as noted above.
  • Not manually verified in a browser against a live backend in this session.

Learning

N/A.

Summary by CodeRabbit

  • New Features
    • Added manual refresh controls throughout the portal, enabling users to reload data on-demand across accounts, teams, groups, roles, announcements, cases, projects, timecards, and user directories.
    • Refresh buttons display loading states and last-updated timestamps for visibility into data freshness.
    • Users can refresh individual sections without full-page reloads.

ServiceNow lets you refresh a single tab; the CSM portal previously required
a full page reload to see changed data anywhere. Adds a RefreshButton (icon
+ "Last refreshed" hint, mirroring the existing dashboard-widget control) to:

- Every case detail tab: Activities, Details, Linked Items (+ its three
  sub-widgets individually), Watchers, Attachments, Time tracking, Call
  requests. SLA/Tasks are skipped — both are hidden: true in TAB_DEFS and
  unreachable via the tab bar.
- Every list page: Cases/Service Requests/Security Reports/Engagements (via
  the shared CsmIssuesView), Change Requests, Incidents, Problems,
  Vulnerabilities, Users, Roles/Groups/Teams (+ their member pages, via the
  shared DirectoryEntityTable/DirectoryMembersList), Accounts, Projects,
  Announcements, Updates (post-search results), Time Cards (all three tabs),
  and the dashboard widget "View more" preview page.

Each button wires directly to the underlying React Query hook's own
refetch/isFetching/dataUpdatedAt — no new query keys or cross-component
cache invalidation, since every hook touched here is a plain useQuery
passthrough.
@coderabbitai

coderabbitai Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 43d3f6aa-c611-40cc-b0ce-c2fb6dfcfc23

📥 Commits

Reviewing files that changed from the base of the PR and between 29cf0b9 and 9002194.

📒 Files selected for processing (26)
  • apps/csm-portal/webapp/src/components/RefreshButton.tsx
  • apps/csm-portal/webapp/src/features/csm-accounts/pages/CsmAccountsPage.tsx
  • apps/csm-portal/webapp/src/features/csm-admin/components/DirectoryEntityTable.tsx
  • apps/csm-portal/webapp/src/features/csm-admin/components/DirectoryMembersList.tsx
  • apps/csm-portal/webapp/src/features/csm-announcements/pages/CsmAnnouncementsPage.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/CallRequestsWidget.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/CaseDetailWidgets.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/ChildCasesWidget.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/CsmIssuesView.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/LinkedChangeRequestsWidget.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/LinkedServiceRequestsWidget.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/pages/CsmCaseDetailPage.tsx
  • apps/csm-portal/webapp/src/features/csm-dashboard/components/AgentsLandingPagePilot.tsx
  • apps/csm-portal/webapp/src/features/csm-dashboard/components/CaseCompositionCharts.tsx
  • apps/csm-portal/webapp/src/features/csm-dashboard/components/CaseCountsMatrix.tsx
  • apps/csm-portal/webapp/src/features/csm-dashboard/components/MyAssignedCases.tsx
  • apps/csm-portal/webapp/src/features/csm-dashboard/pages/DashboardWidgetPreviewPage.tsx
  • apps/csm-portal/webapp/src/features/csm-operations/components/ChangeRequestsTab.tsx
  • apps/csm-portal/webapp/src/features/csm-operations/components/IncidentsTab.tsx
  • apps/csm-portal/webapp/src/features/csm-operations/components/ProblemsTab.tsx
  • apps/csm-portal/webapp/src/features/csm-projects/pages/CsmProjectsPage.tsx
  • apps/csm-portal/webapp/src/features/csm-security-center/components/ProductVulnerabilitiesTab.tsx
  • apps/csm-portal/webapp/src/features/csm-timecards/components/CaseTimeCardsPanel.tsx
  • apps/csm-portal/webapp/src/features/csm-timecards/pages/CsmTimeCardsPage.tsx
  • apps/csm-portal/webapp/src/features/csm-users/pages/CsmUsersPage.tsx
  • apps/csm-portal/webapp/src/features/updates/pages/CsmUpdatesPage.tsx
🚧 Files skipped from review as they are similar to previous changes (18)
  • apps/csm-portal/webapp/src/features/csm-accounts/pages/CsmAccountsPage.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/LinkedServiceRequestsWidget.tsx
  • apps/csm-portal/webapp/src/features/csm-timecards/components/CaseTimeCardsPanel.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/CallRequestsWidget.tsx
  • apps/csm-portal/webapp/src/features/csm-security-center/components/ProductVulnerabilitiesTab.tsx
  • apps/csm-portal/webapp/src/features/csm-dashboard/pages/DashboardWidgetPreviewPage.tsx
  • apps/csm-portal/webapp/src/features/csm-admin/components/DirectoryMembersList.tsx
  • apps/csm-portal/webapp/src/features/csm-operations/components/ProblemsTab.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/LinkedChangeRequestsWidget.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/CaseDetailWidgets.tsx
  • apps/csm-portal/webapp/src/features/csm-operations/components/ChangeRequestsTab.tsx
  • apps/csm-portal/webapp/src/features/csm-users/pages/CsmUsersPage.tsx
  • apps/csm-portal/webapp/src/features/csm-projects/pages/CsmProjectsPage.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/CsmIssuesView.tsx
  • apps/csm-portal/webapp/src/features/updates/pages/CsmUpdatesPage.tsx
  • apps/csm-portal/webapp/src/features/csm-operations/components/IncidentsTab.tsx
  • apps/csm-portal/webapp/src/features/csm-admin/components/DirectoryEntityTable.tsx
  • apps/csm-portal/webapp/src/features/csm-timecards/pages/CsmTimeCardsPage.tsx

📝 Walkthrough

Walkthrough

This PR adds manual refresh controls across CSM Portal directory, list, operations, case widget, timecard, and dashboard views. Each control uses query refetch callbacks, fetching state, and last-update timestamps.

Changes

Refresh Button Integration

Layer / File(s) Summary
Shared refresh control and directory wiring
components/RefreshButton.tsx, csm-admin/components/*, csm-admin/pages/CsmGroupsPage.tsx, CsmRolesPage.tsx, CsmTeamsPage.tsx
Updates RefreshButton documentation. Directory tables and pages now support refresh callbacks and update timestamps.
List page refresh controls
csm-accounts/pages/CsmAccountsPage.tsx, csm-projects/pages/CsmProjectsPage.tsx, csm-users/pages/CsmUsersPage.tsx, features/updates/pages/CsmUpdatesPage.tsx, csm-security-center/components/ProductVulnerabilitiesTab.tsx
Search and vulnerability queries expose refresh metadata. RefreshButton controls appear beside search or filter content.
Operations tab refresh controls
csm-operations/components/ChangeRequestsTab.tsx, IncidentsTab.tsx, ProblemsTab.tsx
Operation search toolbars add RefreshButton controls with refetch, fetching, and last-update state.
Case widget refresh behavior
csm-cases/components/CallRequestsWidget.tsx, CaseDetailWidgets.tsx, CsmIssuesView.tsx, LinkedChangeRequestsWidget.tsx, LinkedServiceRequestsWidget.tsx
Case widgets add refresh controls. Linked change request refresh invalidates linked detail queries.
Timecard refresh controls
csm-timecards/components/CaseTimeCardsPanel.tsx, csm-timecards/pages/CsmTimeCardsPage.tsx
Timecard panels and result sections add refresh controls. Export controls are hidden when their query has an error.
Dashboard refresh import and preview
csm-dashboard/components/*, csm-dashboard/pages/DashboardWidgetPreviewPage.tsx
Dashboard components use the shared RefreshButton path. Widget preview adds query refresh state to its header.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant LinkedChangeRequestsWidget
  participant QueryClient
  participant DetailQueries

  User->>LinkedChangeRequestsWidget: click RefreshButton
  LinkedChangeRequestsWidget->>QueryClient: invalidate linked request queries
  QueryClient->>DetailQueries: mark queries stale
  DetailQueries-->>LinkedChangeRequestsWidget: update fetching state
Loading

Possibly related PRs

Suggested labels: Type/Improvement

Suggested reviewers: cloby99, rashmika998, rksk

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 76.19% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change by identifying refresh buttons for case detail tabs and list pages.
Description check ✅ Passed The description covers the required sections and provides clear scope, implementation details, testing results, and release information.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (3)
apps/csm-portal/webapp/src/features/csm-admin/components/DirectoryEntityTable.tsx (1)

34-34: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Move RefreshButton to a shared UI location.

RefreshButton is now shared by directory-admin components. Do not keep this shared component under csm-dashboard.

  • apps/csm-portal/webapp/src/features/csm-admin/components/DirectoryEntityTable.tsx#L34-L34: import RefreshButton from the new shared location.
  • apps/csm-portal/webapp/src/features/csm-admin/components/DirectoryMembersList.tsx#L40-L40: import RefreshButton from the same shared location.

As per coding guidelines, “each src/features/<name>/ owns its api/, components/, pages/, types/, and utils/ directories.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/csm-portal/webapp/src/features/csm-admin/components/DirectoryEntityTable.tsx`
at line 34, Move the shared RefreshButton component out of csm-dashboard into
the appropriate shared UI location, then update imports in
apps/csm-portal/webapp/src/features/csm-admin/components/DirectoryEntityTable.tsx
lines 34-34 and
apps/csm-portal/webapp/src/features/csm-admin/components/DirectoryMembersList.tsx
lines 40-40 to use that location.

Source: Coding guidelines

apps/csm-portal/webapp/src/features/csm-accounts/pages/CsmAccountsPage.tsx (1)

41-41: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Move RefreshButton to the shared component layer.

RefreshButton is now application-wide UI. Do not make unrelated features depend on the dashboard feature. Move it to @components/RefreshButton and update these imports.

  • apps/csm-portal/webapp/src/features/csm-accounts/pages/CsmAccountsPage.tsx#L41-L41: import the shared component.
  • apps/csm-portal/webapp/src/features/csm-announcements/pages/CsmAnnouncementsPage.tsx#L57-L57: import the shared component.
  • apps/csm-portal/webapp/src/features/csm-projects/pages/CsmProjectsPage.tsx#L36-L36: import the shared component.
  • apps/csm-portal/webapp/src/features/csm-users/pages/CsmUsersPage.tsx#L54-L54: import the shared component.
  • apps/csm-portal/webapp/src/features/updates/pages/CsmUpdatesPage.tsx#L52-L52: import the shared component.
  • apps/csm-portal/webapp/src/features/csm-operations/components/ChangeRequestsTab.tsx#L55-L55: import the shared component.
  • apps/csm-portal/webapp/src/features/csm-operations/components/IncidentsTab.tsx#L56-L56: import the shared component.
  • apps/csm-portal/webapp/src/features/csm-operations/components/ProblemsTab.tsx#L44-L44: import the shared component.
  • apps/csm-portal/webapp/src/features/csm-security-center/components/ProductVulnerabilitiesTab.tsx#L45-L45: import the shared component.

As per coding guidelines, each src/features/<name>/ owns its api/, components/, pages/, types/, and utils/ directories.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/csm-portal/webapp/src/features/csm-accounts/pages/CsmAccountsPage.tsx`
at line 41, Move the RefreshButton component from the dashboard feature into the
shared components layer, preserving its existing behavior and export. Update the
imports in
apps/csm-portal/webapp/src/features/csm-accounts/pages/CsmAccountsPage.tsx:41-41,
apps/csm-portal/webapp/src/features/csm-announcements/pages/CsmAnnouncementsPage.tsx:57-57,
apps/csm-portal/webapp/src/features/csm-projects/pages/CsmProjectsPage.tsx:36-36,
apps/csm-portal/webapp/src/features/csm-users/pages/CsmUsersPage.tsx:54-54,
apps/csm-portal/webapp/src/features/updates/pages/CsmUpdatesPage.tsx:52-52,
apps/csm-portal/webapp/src/features/csm-operations/components/ChangeRequestsTab.tsx:55-55,
apps/csm-portal/webapp/src/features/csm-operations/components/IncidentsTab.tsx:56-56,
apps/csm-portal/webapp/src/features/csm-operations/components/ProblemsTab.tsx:44-44,
and
apps/csm-portal/webapp/src/features/csm-security-center/components/ProductVulnerabilitiesTab.tsx:45-45
to use `@components/RefreshButton`.

Source: Coding guidelines

apps/csm-portal/webapp/src/features/csm-cases/pages/CsmCaseDetailPage.tsx (1)

113-113: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Move RefreshButton to the shared component layer.

The case feature now depends on a dashboard-owned generic control. Move RefreshButton to @components, then update these imports.

  • apps/csm-portal/webapp/src/features/csm-cases/pages/CsmCaseDetailPage.tsx#L113-L113: import RefreshButton from the shared component module.
  • apps/csm-portal/webapp/src/features/csm-cases/components/CallRequestsWidget.tsx#L53-L53: import RefreshButton from the shared component module.
  • apps/csm-portal/webapp/src/features/csm-cases/components/CaseDetailWidgets.tsx#L81-L81: import RefreshButton from the shared component module.
  • apps/csm-portal/webapp/src/features/csm-cases/components/ChildCasesWidget.tsx#L36-L36: import RefreshButton from the shared component module.
  • apps/csm-portal/webapp/src/features/csm-cases/components/CsmIssuesView.tsx#L61-L61: import RefreshButton from the shared component module.
  • apps/csm-portal/webapp/src/features/csm-cases/components/LinkedChangeRequestsWidget.tsx#L41-L41: import RefreshButton from the shared component module.
  • apps/csm-portal/webapp/src/features/csm-cases/components/LinkedServiceRequestsWidget.tsx#L40-L40: import RefreshButton from the shared component module.

As per coding guidelines, each src/features/<name>/ owns its api/, components/, pages/, types/, and utils/ directories.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/csm-portal/webapp/src/features/csm-cases/pages/CsmCaseDetailPage.tsx` at
line 113, Move the dashboard-owned RefreshButton component into the shared
`@components` layer, then update imports in
apps/csm-portal/webapp/src/features/csm-cases/pages/CsmCaseDetailPage.tsx (line
113), components/CallRequestsWidget.tsx (line 53),
components/CaseDetailWidgets.tsx (line 81), components/ChildCasesWidget.tsx
(line 36), components/CsmIssuesView.tsx (line 61),
components/LinkedChangeRequestsWidget.tsx (line 41), and
components/LinkedServiceRequestsWidget.tsx (line 40) to use the shared module;
preserve existing RefreshButton usage.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@apps/csm-portal/webapp/src/features/csm-timecards/pages/CsmTimeCardsPage.tsx`:
- Around line 444-450: In CsmTimeCardsPage.tsx, keep each RefreshButton rendered
when its query is in an error state by moving it outside the success-only
conditional or rendering it in both branches: lines 444-450 for myCards, 528-534
for allCards, and 603-609 for queue. Preserve each button’s existing refetch
handler and fetching/update props.

In `@apps/csm-portal/webapp/src/features/updates/pages/CsmUpdatesPage.tsx`:
- Around line 791-809: Update the result action row containing the updates count
and RefreshButton so it renders whenever the search state exists, not only when
sortedEntries.length is greater than zero. Preserve the existing count text and
RefreshButton behavior, including refetch, fetching state, timestamp, and label,
for both populated and empty search results.

---

Nitpick comments:
In `@apps/csm-portal/webapp/src/features/csm-accounts/pages/CsmAccountsPage.tsx`:
- Line 41: Move the RefreshButton component from the dashboard feature into the
shared components layer, preserving its existing behavior and export. Update the
imports in
apps/csm-portal/webapp/src/features/csm-accounts/pages/CsmAccountsPage.tsx:41-41,
apps/csm-portal/webapp/src/features/csm-announcements/pages/CsmAnnouncementsPage.tsx:57-57,
apps/csm-portal/webapp/src/features/csm-projects/pages/CsmProjectsPage.tsx:36-36,
apps/csm-portal/webapp/src/features/csm-users/pages/CsmUsersPage.tsx:54-54,
apps/csm-portal/webapp/src/features/updates/pages/CsmUpdatesPage.tsx:52-52,
apps/csm-portal/webapp/src/features/csm-operations/components/ChangeRequestsTab.tsx:55-55,
apps/csm-portal/webapp/src/features/csm-operations/components/IncidentsTab.tsx:56-56,
apps/csm-portal/webapp/src/features/csm-operations/components/ProblemsTab.tsx:44-44,
and
apps/csm-portal/webapp/src/features/csm-security-center/components/ProductVulnerabilitiesTab.tsx:45-45
to use `@components/RefreshButton`.

In
`@apps/csm-portal/webapp/src/features/csm-admin/components/DirectoryEntityTable.tsx`:
- Line 34: Move the shared RefreshButton component out of csm-dashboard into the
appropriate shared UI location, then update imports in
apps/csm-portal/webapp/src/features/csm-admin/components/DirectoryEntityTable.tsx
lines 34-34 and
apps/csm-portal/webapp/src/features/csm-admin/components/DirectoryMembersList.tsx
lines 40-40 to use that location.

In `@apps/csm-portal/webapp/src/features/csm-cases/pages/CsmCaseDetailPage.tsx`:
- Line 113: Move the dashboard-owned RefreshButton component into the shared
`@components` layer, then update imports in
apps/csm-portal/webapp/src/features/csm-cases/pages/CsmCaseDetailPage.tsx (line
113), components/CallRequestsWidget.tsx (line 53),
components/CaseDetailWidgets.tsx (line 81), components/ChildCasesWidget.tsx
(line 36), components/CsmIssuesView.tsx (line 61),
components/LinkedChangeRequestsWidget.tsx (line 41), and
components/LinkedServiceRequestsWidget.tsx (line 40) to use the shared module;
preserve existing RefreshButton usage.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 28150233-5740-4d5f-90bf-b463f99bf305

📥 Commits

Reviewing files that changed from the base of the PR and between 93096d4 and 29cf0b9.

📒 Files selected for processing (24)
  • apps/csm-portal/webapp/src/features/csm-accounts/pages/CsmAccountsPage.tsx
  • apps/csm-portal/webapp/src/features/csm-admin/components/DirectoryEntityTable.tsx
  • apps/csm-portal/webapp/src/features/csm-admin/components/DirectoryMembersList.tsx
  • apps/csm-portal/webapp/src/features/csm-admin/pages/CsmGroupsPage.tsx
  • apps/csm-portal/webapp/src/features/csm-admin/pages/CsmRolesPage.tsx
  • apps/csm-portal/webapp/src/features/csm-admin/pages/CsmTeamsPage.tsx
  • apps/csm-portal/webapp/src/features/csm-announcements/pages/CsmAnnouncementsPage.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/CallRequestsWidget.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/CaseDetailWidgets.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/ChildCasesWidget.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/CsmIssuesView.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/LinkedChangeRequestsWidget.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/LinkedServiceRequestsWidget.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/pages/CsmCaseDetailPage.tsx
  • apps/csm-portal/webapp/src/features/csm-dashboard/pages/DashboardWidgetPreviewPage.tsx
  • apps/csm-portal/webapp/src/features/csm-operations/components/ChangeRequestsTab.tsx
  • apps/csm-portal/webapp/src/features/csm-operations/components/IncidentsTab.tsx
  • apps/csm-portal/webapp/src/features/csm-operations/components/ProblemsTab.tsx
  • apps/csm-portal/webapp/src/features/csm-projects/pages/CsmProjectsPage.tsx
  • apps/csm-portal/webapp/src/features/csm-security-center/components/ProductVulnerabilitiesTab.tsx
  • apps/csm-portal/webapp/src/features/csm-timecards/components/CaseTimeCardsPanel.tsx
  • apps/csm-portal/webapp/src/features/csm-timecards/pages/CsmTimeCardsPage.tsx
  • apps/csm-portal/webapp/src/features/csm-users/pages/CsmUsersPage.tsx
  • apps/csm-portal/webapp/src/features/updates/pages/CsmUpdatesPage.tsx

Comment thread apps/csm-portal/webapp/src/features/csm-timecards/pages/CsmTimeCardsPage.tsx Outdated
Comment thread apps/csm-portal/webapp/src/features/updates/pages/CsmUpdatesPage.tsx Outdated
Two real bugs, both about a RefreshButton disappearing exactly when it's
most needed:

- CsmTimeCardsPage.tsx (all three tabs): the button lived inside the
  success-only branch, so a load error hid it along with the table/export/
  pagination — no way to retry without reloading the page. Moved it above
  the isError branch so it's always available; kept the export button
  gated on !isError since there's nothing valid to export during one.
- CsmUpdatesPage.tsx: same issue for a zero-result search — the button only
  rendered in the has-results branch. Hoisted it to the top of the results
  section so it shows across loading/error/empty/populated states.

Also addressed the recurring nitpick: RefreshButton was dashboard-owned
(`@features/csm-dashboard/components/RefreshButton`) but reused across ten
unrelated features by the PR this addresses, violating this repo's
feature-boundary convention. Moved it to `@components/RefreshButton` (shared
layer, alongside QueryErrorState/SeverityChip/etc.) and repointed all 24
import sites, including the four pre-existing dashboard-widget consumers.
No behavior change to the component itself.
@Hesara2003

Copy link
Copy Markdown
Contributor Author

Addressed the recurring nitpick about RefreshButton living under csm-dashboard but being reused across ten unrelated features: moved it to @components/RefreshButton (shared layer) and repointed all 24 import sites, including the four pre-existing dashboard-widget consumers. No behavior change to the component. Pushed in 9002194.

@s-sandali

Copy link
Copy Markdown

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@rksk
rksk merged commit 9920b1d into wso2-open-operations:main Aug 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants