[CSM Portal Microapp]: dashboard/timesheet accordian (dark mode contrast, donut hover) - #1375
Merged
cloby99 merged 7 commits intoAug 5, 2026
Conversation
Expanded TimeSheetCard rows had no visual separation from each other or from the accordion body — just a Stack gap, no border or fill — so in dark mode the whole expanded list read as one flat block. Gives each card row its own action.hover tinted background.
Contributor
📝 WalkthroughWalkthroughChangesInline image rendering
UI presentation updates
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant CommentOrUpdate
participant useResolvedInlineImageHtml
participant attachments
participant AttachmentEndpoint
CommentOrUpdate->>useResolvedInlineImageHtml: Pass sanitized HTML
useResolvedInlineImageHtml->>attachments: Request attachment content
attachments->>AttachmentEndpoint: Fetch Blob by ID
AttachmentEndpoint-->>attachments: Return image Blob
attachments-->>useResolvedInlineImageHtml: Return Blob
useResolvedInlineImageHtml-->>CommentOrUpdate: Render HTML with data URLs
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
action.hover is a low-opacity overlay, and this theme's Card surfaces are themselves semi-transparent (Acrylic) — stacking one translucent layer on another made the previous fix's separation unnoticeable in practice. Switched to a solid 1px divider-colored border, the same pattern already used for AttachmentsTab/CaseActivityFeed/UpdatesPage rows elsewhere in this app.
A tap on a touch screen registers as "hover" first, leaving recharts' tooltip stuck open over the center total (confirmed via screenshot: "Open: 1085" overlapping "1368 / Total") until something else is tapped. There's no real hover state on a mobile WebView, and tapping a slice or legend row already navigates directly via onSliceClick — matches customer-portal microapp's PieChartWidget, which disables its tooltip the same way.
Contributor
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/microapp/src/pages/UpdatesPage.tsx`:
- Around line 60-65: Update the HTML detection in UpdatesPage by adjusting
HTML_FORMAT_RE so standalone img tags are recognized as HTML content. Keep the
existing sanitized/useResolvedInlineImageHtml flow unchanged, but ensure an
image-only update description no longer falls through to the plain-text path and
instead gets sanitized and resolved like other HTML content.
In `@apps/csm-portal/microapp/src/utils/inlineImages.ts`:
- Around line 60-71: Limit inline-image reference processing by updating
extractIixAttachmentIds to dedupe with a Set and stop collecting once the
defined maximum is reached, then update useResolvedInlineImageHtml to build
attachment queries only from that capped ID list. Make the capped list the only
source used for downstream attachment requests, retries, and Blob-to-data-URL
conversion so the existing inline-image resolution flow stays unchanged for the
accepted IDs.
🪄 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: ff4b5f24-53cf-4175-93c6-0936148c4dce
📒 Files selected for processing (7)
apps/csm-portal/microapp/src/components/case-detail/CommentBody.tsxapps/csm-portal/microapp/src/components/home/CompositionDonut.tsxapps/csm-portal/microapp/src/components/timecards/TimeSheetCard.tsxapps/csm-portal/microapp/src/pages/UpdatesPage.tsxapps/csm-portal/microapp/src/services/attachments.tsapps/csm-portal/microapp/src/utils/inlineImages.tsapps/csm-portal/microapp/src/utils/useResolvedInlineImageHtml.ts
The action.hover fill was visible after all — keep it together with the border rather than replacing it.
cloby99
approved these changes
Aug 5, 2026
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TimeSheetCardrows (TimeCardRow) had no visual separation from each other or from the accordion body — only aStack gap, no border or background fill — so in dark mode the whole expanded card list read as one flat, undifferentiated block. Gives each row a soliddivider-colored border, the same pattern already used for AttachmentsTab/CaseActivityFeed/UpdatesPage rows.CompositionDonut.tsx) hadtooltip={{ show: true }}— on a touch screen, a tap registers as "hover" first, leaving the tooltip stuck open over the center total (confirmed via screenshot: "Open: 1085" overlapping "1368 / Total") until something else is tapped. This is a mobile-only WebView with no real hover state, and tapping a slice or legend row already navigates directly viaonSliceClick. Disabled the tooltip to match customer-portal microapp'sPieChartWidget, which does the same.Test plan
npx tsc --noEmitnpx eslint .npm run buildSummary by CodeRabbit