[CSM Portal] Operations tab + SR creation; align FE with BE #938; stop calling missing /csm/dashboard - #937
Conversation
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe PR adds two new Operations feature pages ( ChangesNew Operations Feature Pages
Case Type Rename: support → case
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
…ated until BE) Replace the Operations 'coming soon' placeholder with a real landing: SR / CR / Incident as tabs. The Service Requests tab has a 'Create service request' entry point; CR and Incident tabs are 'coming soon' (no backend yet). Add a minimal Create-SR form (project, priority [S0-S4], subject, description). Submission is GATED OFF (SR_CREATE_ENABLED=false): SR has no create endpoint yet — it's only a case type in the contract and POST /cases accepts type:'support' only — so the form validates and is ready to wire (flip the flag + add the mutation) once the BE adds the SR endpoint and its catalog model. No API call is made meanwhile.
…support->case; nullable CaseView refs) - Rename case type value 'support' -> 'case' across BeCaseType, BeCaseCreatePayload (POST /cases), the case-type filter (caseType.ts: label 'Support' -> 'Case'), and CsmCaseCreatePage. Matches the entity PR wso2-open-operations#934 rename. - BeCaseView: add nullable type/engagementType and catalog/catalogItem/ assignedTeam/conversation EntityRefs; mark deployment/deployedProduct nullable. - BeCaseSearchView: add 'type'; mark deployment/deployedProduct nullable. Map it onto the row (caseType: c.type). Pure contract alignment. NOTE: depends on BE PR wso2-open-operations#938 — merge this after it, or the cases list/create will send the new 'case' value to a BE that still expects 'support'.
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/webapp/src/features/csm-operations/pages/CreateServiceRequestPage.tsx`:
- Around line 40-44: Update the stale backend contract note in
CreateServiceRequestPage so it matches the current case-type terminology: the
comment currently says POST /cases accepts type "support", but this PR now uses
"case". Edit the inline submission-disabled note near the
CreateServiceRequestPage component to remove the outdated "support" reference
and replace it with the correct "case" wording so future submit wiring follows
the updated contract.
🪄 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: a8e8c11c-07d0-42e1-bba0-b2e848f2ffde
📒 Files selected for processing (8)
apps/csm-portal/webapp/src/App.tsxapps/csm-portal/webapp/src/api/backend/types.tsapps/csm-portal/webapp/src/features/csm-cases/api/useGetCsmCases.tsapps/csm-portal/webapp/src/features/csm-cases/pages/CsmCaseCreatePage.tsxapps/csm-portal/webapp/src/features/csm-cases/utils/caseType.tsapps/csm-portal/webapp/src/features/csm-cases/utils/casesFiltersUrl.test.tsapps/csm-portal/webapp/src/features/csm-operations/pages/CreateServiceRequestPage.tsxapps/csm-portal/webapp/src/features/csm-operations/pages/OperationsPage.tsx
|
@coderabbitai review |
✅ Action performedReview finished.
|
1. Operations tab + Service Request creation
/operations/service-requests/new) — project, priority (S0–S4), subject, description. Submission gated off (SR_CREATE_ENABLED = false): no SR create endpoint yet (SR is only a case type;POST /casestakescaseonly). Validates and is ready to wire; no API call made.2. Align FE with BE PR #938 (entity #934)
support→caseacrossBeCaseType,POST /cases, the case-type filter (label "Support" → "Case"),CsmCaseCreatePage. (v2's FE still sentsupportwhile the merged BFF expectscase— this fixes that inconsistency.)CaseView: nullabletype/engagementType+catalog/catalogItem/assignedTeam/conversationrefs;deployment/deployedProductnullable.CaseSearchView: addtype(mapped onto the row); refs nullable.3. Stop calling the missing
/csm/dashboardendpoint (folds in #941)GET /csm/dashboardon every load — a guaranteed 404 (no such BFF endpoint). Query disabled (DASHBOARD_ENDPOINT_READY = false); one-line flip to re-enable. Header degrades to a neutral "Engineer overview" subtitle (no perpetual "Loading…"); unusedisErrorprop dropped. The live/cases/search-backed widgets are unaffected.Testing
pnpm lint,pnpm test,pnpm build,tsc -ball green.