Skip to content

[CSM Portal Microapp] Fix build break, text-overflow, and simplify Assigned to me - #1136

Merged
Rashmika998 merged 3 commits into
wso2-open-operations:dev-app-csm-portalfrom
2003dinijay:fix/assigned-to-me-ispending
Jul 13, 2026
Merged

Rashmika998 merged 3 commits into
wso2-open-operations:dev-app-csm-portalfrom
2003dinijay:fix/assigned-to-me-ispending

Conversation

@2003dinijay

@2003dinijay 2003dinijay commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Three fixes bundled together:

1. Build break from an incomplete #1134 merge conflict resolution. dev-app-csm-portal's build was broken:

  • MorePage.tsx uses the Settings icon in MORE_ITEMS, but the conflict resolution dropped it from the import list.
  • AssignedToMeSection.tsx destructured isPending (renamed from isLoading by a partial CodeRabbit-suggested commit), but the JSX below still referenced the old isLoading name.

2. Text overflow on narrow screens in three card layouts. Each has a noWrap Typography sitting alongside a sibling in a row flex container with no minWidth: 0 guard — a flex item's default min-width: auto stops it from shrinking below its content's natural width, so on a narrow screen or with long content it overflows the card instead of ellipsizing:

  • AnnouncementCard.tsx: case number vs. state chip
  • CaseCard.tsx: assigned-engineer name vs. "Updated Xh ago" (also pins the timestamp side with flexShrink: 0 so the name is the one that truncates)
  • CaseDetailPage.tsx: comment author email vs. date (same fix)

Matches the minWidth: 0 pattern already used correctly elsewhere in the app (AttachmentsField.tsx, CompositionDonut.tsx, TimeSheetCard.tsx).

3. Simplified the Home page's "Assigned to me" widget, mirroring the webapp's MyAssignedCases header more closely:

  • Removed the "View all" link (Support already covers the full list).
  • Added a RefreshButton (icon + "Last refreshed X ago"), ported from the webapp's RefreshButton.tsx.
  • The empty state is now a plain line of text in a bordered card instead of the shared EmptyState's icon+padding treatment, which read as too prominent for the first thing on the home page.

Test plan

  • eslint clean
  • tsc --noEmit clean (worked around the pre-existing, unrelated ignoreDeprecations TS-version mismatch to get a real type-check signal)
  • vite build clean
  • Manually verified live in the native shell with real data: refresh control shows "Last refreshed a few seconds ago", empty state renders correctly, composition donuts unaffected

…resolution

Two undefined-reference bugs landed on dev-app-csm-portal from an
incomplete resolution of the wso2-open-operations#1134 merge conflict:

- MorePage.tsx used the Settings icon but the merge dropped it from
  the import list.
- AssignedToMeSection.tsx destructured isPending (renamed from
  isLoading by a partial suggestion commit) but the JSX below still
  referenced the old isLoading name.

Both are one-line fixes; verified with eslint, tsc --noEmit, and
vite build.
Copilot AI review requested due to automatic review settings July 13, 2026 07:54

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The CSM portal now applies flex sizing constraints to several text rows, uses React Query’s isPending flag for assigned-case loading, and imports the Settings icon referenced by the More page configuration.

Changes

CSM portal updates

Layer / File(s) Summary
Responsive text layout constraints
apps/csm-portal/microapp/src/components/announcements/AnnouncementCard.tsx, apps/csm-portal/microapp/src/components/support/CaseCard.tsx, apps/csm-portal/microapp/src/pages/CaseDetailPage.tsx
Adds minWidth: 0 to truncating text and flexShrink={0} to timestamp elements in announcement, case, and comment layouts.
Loading state and icon wiring
apps/csm-portal/microapp/src/components/home/AssignedToMeSection.tsx, apps/csm-portal/microapp/src/pages/MorePage.tsx
Uses isPending for the assigned-case skeleton state and adds the Settings icon import used by MORE_ITEMS.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: Type/Bug, Area/Frontend

Suggested reviewers: shayanmalinda

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is a summary/test plan, not the required template, and it omits most mandated sections like Purpose, Goals, Approach, and Release note. Rewrite the PR description using the repository template and fill in the required sections, including Purpose, Goals, Approach, Release note, and the remaining checklist items.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title accurately summarizes the PR's main fixes: build break, text overflow, and Assigned to me cleanup.
✨ 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.

2003dinijay added a commit to 2003dinijay/cs-tools that referenced this pull request Jul 13, 2026
…otfix so this branch builds

Duplicates the two-line fix from PR wso2-open-operations#1136 (Settings import, isLoading ->
isPending) so feature/microapp-navigation isn't built on top of
dev-app-csm-portal's current broken state. Will collapse away as an
empty/no-op on the next rebase once wso2-open-operations#1136 merges upstream.
…arrow screens

Three spots have a noWrap Typography sitting alongside a sibling in a
row flex container with no minWidth: 0 guard, so the flex item's
default min-width:auto stops it from shrinking below its content's
natural width — on a narrow screen or with long content it overflows
the card instead of ellipsizing:

- AnnouncementCard.tsx: case number vs. state chip
- CaseCard.tsx: assigned-engineer name vs. "Updated Xh ago" (also
  pins the timestamp side with flexShrink: 0 so the name is the one
  that truncates)
- CaseDetailPage.tsx: comment author email vs. date (same fix)

Matches the minWidth: 0 pattern already used correctly elsewhere in
this app (AttachmentsField.tsx, CompositionDonut.tsx,
TimeSheetCard.tsx).
@2003dinijay 2003dinijay changed the title [CSM Portal Microapp] Fix build break from incomplete merge conflict resolution [CSM Portal Microapp] Fix build break + text-overflow on narrow screens Jul 13, 2026
…resh

Mirrors the webapp's MyAssignedCases widget header more closely:
- Removes the "View all" link (Support already covers the full list).
- Adds a RefreshButton (icon + "Last refreshed X ago"), ported from
  the webapp's RefreshButton.tsx, reusing the app's existing fromNow
  helper instead of porting a second relative-time formatter.
- The empty state is now a plain line of text in a bordered card
  instead of the shared EmptyState's icon+padding treatment, which
  read as too prominent for the first thing on the home page.
@2003dinijay 2003dinijay changed the title [CSM Portal Microapp] Fix build break + text-overflow on narrow screens [CSM Portal Microapp] Fix build break, text-overflow, and simplify Assigned to me Jul 13, 2026
@Rashmika998
Rashmika998 merged commit 08fcaf8 into wso2-open-operations:dev-app-csm-portal Jul 13, 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