Skip to content

[CSM Portal] filter the ABT dashboard's team picker to the right family - #1343

Closed
rksk wants to merge 1 commit into
wso2-open-operations:mainfrom
rksk:csm-abt-team-family-filter
Closed

rksk wants to merge 1 commit into
wso2-open-operations:mainfrom
rksk:csm-abt-team-family-filter

Conversation

@rksk

@rksk rksk commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc.

The ABT dashboard's team picker lists every team in the registry regardless of the dashboard's own type, so a CRE-type dashboard's picker shows every CRE team including ones that have nothing to do with ABT (e.g. a generic integration team), alongside the real ABT teams. We are adding a way to scope that picker to the right team family. No related issue.

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

  • POST /teams/search accepts an optional filters.family so a caller can ask for only the teams belonging to a given family.
  • The ABT dashboard header derives the right family from the current dashboard's own type and requests only that family's teams.

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

  • Backend: filters.family on POST /teams/search does a case-insensitive exact match against each team's configured family, excluding teams with no family at all when a family filter is given. New test covers the filter.
  • Frontend: AbtDashboardHeader derives the family from the current dashboard's type via a new abtFamilyForDashboardType helper (cre → cre-abt, sre → sre-abt) and passes it through useTeams. The dashboard page's own separate useTeams call — used only to resolve the signed-in user's own team into a group id — is deliberately left unfiltered, since a user's real team can be outside the dashboard's own family; it no longer shares a query key with the header's now-scoped query.
  • openapi.yaml updated for the new request/response fields.

User stories

N/A — internal dashboard UX improvement, not a distinct user story.

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

The ABT dashboard's team picker now shows only the teams that belong to that dashboard's own family, instead of every team in the registry.

Documentation

N/A — no external product docs describe this internal dashboard behavior.

Training

N/A — no training content covers this internal dashboard.

Certification

N/A — no certification exam covers this internal dashboard.

Marketing

N/A — internal UX improvement, no user-facing feature to promote.

Automation tests

  • Unit tests

    New backend test for the family filter; new/updated frontend tests for useTeams and AbtDashboardHeader. go test, go vet, gofmt and npx tsc -b --noEmit all clean; relevant vitest suites (121 tests across the dashboard feature) pass.

  • Integration tests

    N/A — no integration test suite exists for this service; verified via unit tests.

Security checks

Samples

N/A

Related PRs

None.

Migrations (if applicable)

N/A — no data migration; this is an additive request/response field.

Test environment

Local development environment (macOS), Go 1.26+, Node/npm per apps/csm-portal/webapp/package.json.

Learning

N/A

… family

POST /teams/search accepts a case-insensitive filters.family; SearchTeams
excludes any team whose Family doesn't exactly match, including teams with
no family at all. AbtDashboardHeader now derives the family to request from
the current dashboard's type (cre -> cre-abt, sre -> sre-abt) via the new
abtFamilyForDashboardType, so a cre-type dashboard's picker offers only
cre-abt teams instead of every team in the registry (previously every
non-ABT cre team, e.g. "Americas CS Team - Integraion", showed up
alongside the real ABT teams).

CsmDashboardPage's own useTeams call for resolving the signed-in user's
own team into a groupId stays unfiltered on purpose: that user's team can
be outside the current dashboard's family (a non-ABT cre team member
viewing a cre dashboard), so it can no longer share a query key/cache
entry with the header's now family-scoped picker query.
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@rksk, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e26efa80-8c8f-4c9f-bbb3-fe992e04aff4

📥 Commits

Reviewing files that changed from the base of the PR and between 4e00c44 and 3d388eb.

📒 Files selected for processing (10)
  • apps/csm-portal/backend/internal/directory/directory_test.go
  • apps/csm-portal/backend/internal/directory/search.go
  • apps/csm-portal/backend/openapi.yaml
  • apps/csm-portal/webapp/src/api/backend/types.ts
  • apps/csm-portal/webapp/src/features/csm-dashboard/api/useTeams.test.tsx
  • apps/csm-portal/webapp/src/features/csm-dashboard/api/useTeams.ts
  • apps/csm-portal/webapp/src/features/csm-dashboard/components/AbtDashboardHeader.test.tsx
  • apps/csm-portal/webapp/src/features/csm-dashboard/components/AbtDashboardHeader.tsx
  • apps/csm-portal/webapp/src/features/csm-dashboard/pages/CsmDashboardPage.test.tsx
  • apps/csm-portal/webapp/src/features/csm-dashboard/pages/CsmDashboardPage.tsx

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.

@rksk

rksk commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Consolidating into #1342 instead — same commit pushed there.

@rksk rksk closed this Aug 3, 2026
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.

1 participant