[Customer Portal][BE] Enhance project search response with stats and hasAgent fields - #362
Conversation
📝 WalkthroughWalkthroughThis PR removes the url module dependency from Dependencies.toml and extends Project-related type definitions by adding four new fields (hasAgent, activeCasesCount, activeChatsCount, slaStatus) across entity and backend type modules. ProjectConversationStatsResponse gains totalCount and activeCount fields, and ProjectResponse is restructured with explicit fields. The mapProjectsResponse utility function is updated to propagate the new fields. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 the current code and only fix it if needed.
Inline comments:
In `@apps/customer-portal/backend/modules/types/types.bal`:
- Line 275: Locate the comment line containing "# Novera agent enabled status
for the project" in modules/types/types.bal and correct the misspelling "Novera"
to the intended product/team name used elsewhere in the codebase (update the
comment above the agent-enabled field so it matches the canonical spelling).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 662ffef8-fdab-443f-b50a-2b9b219b1631
📒 Files selected for processing (4)
apps/customer-portal/backend/Dependencies.tomlapps/customer-portal/backend/modules/entity/types.balapps/customer-portal/backend/modules/types/types.balapps/customer-portal/backend/utils.bal
💤 Files with no reviewable changes (1)
- apps/customer-portal/backend/Dependencies.toml
| # Project type | ||
| ReferenceItem 'type; | ||
| json...; | ||
| # Novera agent enabled status for the project |
There was a problem hiding this comment.
Fix typo in the field documentation.
Novera looks like a typo in the comment and should be corrected for API doc clarity.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@apps/customer-portal/backend/modules/types/types.bal` at line 275, Locate the
comment line containing "# Novera agent enabled status for the project" in
modules/types/types.bal and correct the misspelling "Novera" to the intended
product/team name used elsewhere in the codebase (update the comment above the
agent-enabled field so it matches the canonical spelling).
4163b0c
into
wso2-open-operations:customer-portal-milestone-1
Description
This PR updates the project search response to include additional fields required for the landing page.
Changes
Reason
The landing page requires additional data to provide a richer project overview.
Including these fields enables:
Testing
statsandhasAgentImpact
Related PR
Summary by CodeRabbit
New Features
Chores