Conversation
Mirrors the webapp's features/updates/types/updates.ts contract for GET /updates/product-update-levels and POST /updates/levels/search. The model layer normalizes the upstream's sometimes-JSON-encoded-as- string list fields (bugFixes, filesAdded, etc.) into real arrays and pre-sorts search results by level key, so the page never touches the raw response shape.
updates.productLevels() backs the product/version/level pickers; updates.search() is gated on a non-null input, same enabled-when- present pattern as the webapp's usePostUpdateLevelsSearch.
Was a ComingSoonPage placeholder. Now: cascading product/version/ start-level/end-level pickers, a search result list of matched update levels with a security/regular/mixed type chip, and a detail dialog per level (description, instructions, bug fixes, file lists, security advisories). Ported from the webapp's CsmUpdatesPage, trimmed for a single-column mobile layout: no PDF export/report-preview dialog (print/download flows don't translate well to a WebView, and weren't asked for) and a single date/time value per slot instead of the webapp's multi-slot picker. Reuses HtmlOrText's same regex-sniff + DOMPurify approach, since update descriptions come back as HTML sometimes and plain text other times from the same field. Select dropdowns use the same OPAQUE_POPUP fix already established in TimeCardFiltersSheet et al., since this theme's popups are translucent by default.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughChangesThe updates placeholder page is replaced with a product, version, and update-level search flow. New DTOs, normalized models, React Query services, endpoint constants, result rendering, sanitized descriptions, file lists, security advisories, and detail dialogs are added. Updates feature
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant UpdatesPage
participant updates
participant API
User->>UpdatesPage: Select product, version, and levels
UpdatesPage->>updates: Request product levels
updates->>API: GET product update levels
API-->>updates: Product level data
User->>UpdatesPage: Submit valid search
UpdatesPage->>updates: Search with selected levels
updates->>API: POST update-level search
API-->>updates: Grouped update descriptions
updates-->>UpdatesPage: Normalized result groups
User->>UpdatesPage: Select View
UpdatesPage-->>User: Show update details dialog
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 375-376: Update the Description rendering condition in the
UpdatesPage JSX to use isMeaningful(desc.description), matching the existing
Instructions check, while preserving the current UpdateSection title and
content.
🪄 Autofix (Beta)
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
Run ID: b8efdabf-219c-477b-8943-0a6f19c61fb8
📒 Files selected for processing (6)
apps/csm-portal/microapp/src/config/endpoints.tsapps/csm-portal/microapp/src/pages/UpdatesPage.tsxapps/csm-portal/microapp/src/services/updates.tsapps/csm-portal/microapp/src/types/index.tsapps/csm-portal/microapp/src/types/updates.dto.tsapps/csm-portal/microapp/src/types/updates.model.ts
…tructions Description used a plain truthy check while Instructions used isMeaningful (filters out "", "n/a", "na"). Same upstream field shape, same treatment now.
|
@coderabbitai review |
✅ Action performedReview finished.
|
Purpose
The Updates page in the CSM microapp was a
ComingSoonPageplaceholder — no way to check release notes between two update levels of a product version on mobile, even though the webapp has had this for a while.Goals
Approach
features/updates/contract into the microapp'stypes/,services/,pages/layout:updates.dto.ts/updates.model.tsmirrorGET /updates/product-update-levelsandPOST /updates/levels/search, with the model layer normalizing the upstream's sometimes-JSON-encoded-as-string list fields into real arrays and pre-sorting search results by level key.UpdatesPage.tsxreplaces the placeholder: cascading Product → Version → Start level → End level selects, a result list, and a per-level detail dialog. Reuses the sharedDialogPaper(stable paper-slot component) and theOPAQUE_POPUPpattern already established inTimeCardFiltersSheet/AnnouncementFiltersSheetfor this theme's translucent dropdowns.DialogPaperfor exactly that reason. Fixed those to use it too, included here since it was found in the course of this work.User stories
As an agent, I can look up what changed between two update levels of a product version from my phone, including security advisories, without needing the desktop webapp.
Release note
Added the Updates page (product/version/update-level range search) to the CSM Portal mobile app.
Documentation
N/A — internal CSM portal UI change, no external doc surface affected.
Automation tests
tsc -b,eslint, andnpm run buildall clean.Security checks
Test environment
Summary by CodeRabbit