Skip to content

feat(admin-panel): badge connected services as device or OAuth client - #21267

Merged
clouserw merged 1 commit into
mainfrom
fxa-14578
Sep 18, 2026
Merged

clouserw merged 1 commit into
mainfrom
fxa-14578

Conversation

@vbudhram

@vbudhram vbudhram commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Because

  • The admin panel Connected Services list labeled every row without a device ID as an OAuth client.
  • A standalone web session has no client ID. The list gave it the wrong label.

This pull request

  • Adds a serviceKind helper in ConnectedServices/index.tsx. The helper returns the badge label and the badge color.
  • Labels a row with a device ID "Device", a row with a client ID "OAuth client", and every other row "Web session".
  • Adds tests in index.test.tsx for the three labels and for a row that has both IDs.

Issue that this pull request solves

Closes: https://mozilla-hub.atlassian.net/browse/FXA-14578

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).
  • I have manually reviewed all AI generated code.

How to review (Optional)

  • Key files/areas to focus on: ConnectedServices/index.tsx, the serviceKind helper.
  • Suggested review order: read the helper first, then the tests in index.test.tsx.
  • Risky or complex parts: none. The change only affects the badge text and color.

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

  • Unit tests for fxa-admin-panel ConnectedServices: 8 passed, 0 failed.
  • npx nx lint fxa-admin-panel: exit 0. tsc --noEmit: clean.
  • Functional tests were not run.

@vbudhram
vbudhram requested a review from a team as a code owner September 18, 2026 21:33
@vbudhram vbudhram added the auto label Sep 18, 2026
Copilot AI balanced review requested due to automatic review settings September 18, 2026 21:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Standalone web sessions are incorrectly labeled as OAuth clients.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds visual service-type badges to the admin panel’s Connected Services cards.

Changes:

  • Labels services as devices or OAuth clients with color-coded badges.
  • Adds tests for both labels.
File summaries
File Description
ConnectedServices/index.tsx Renders service-type badges.
ConnectedServices/index.test.tsx Tests device and OAuth labels.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

## Because

- The admin panel Connected Services list labeled every row without a device ID as an OAuth client.
- A standalone web session has no client ID. The list gave it the wrong label.

## This pull request

- Adds a `serviceKind` helper in `ConnectedServices/index.tsx`. The helper returns the badge label and the badge color.
- Labels a row with a device ID "Device", a row with a client ID "OAuth client", and every other row "Web session".
- Adds tests in `index.test.tsx` for the three labels and for a row that has both IDs.

## Issue that this pull request solves

Closes: https://mozilla-hub.atlassian.net/browse/FXA-14578

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The classification logic matches the service data model and all branches are covered by focused tests.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@clouserw
clouserw merged commit f8c115e into main Sep 18, 2026
21 checks passed
@clouserw
clouserw deleted the fxa-14578 branch September 18, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants