Skip to content

Handle github-copilot-identity category in frontend#108047

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/fix-github-copilot-identity
Draft

Handle github-copilot-identity category in frontend#108047
Copilot wants to merge 3 commits intomasterfrom
copilot/fix-github-copilot-identity

Conversation

Copy link

Copilot AI commented Feb 11, 2026

Fixes JAVASCRIPT-36ZJ

Backend introduced github-copilot-identity category (2026-02-05) but frontend enum only recognized 3 identity types, causing "Invalid category" errors on admin user pages.

Changes

  • Added enum value: GITHUB_COPILOT_IDENTITY = 'github-copilot-identity' to UserIdentityCategory
  • Updated identity label rendering: Added case in identityLabel() to display "GitHub Copilot"
  • Updated sort order: Added new category to categoryRank() array for proper identity sorting in account settings
  • Added test coverage: Created test suite for UserOverview component covering all identity categories
// Before: threw "Invalid category" error
function identityLabel(identity: UserIdentityConfig) {
  if (identity.category === UserIdentityCategory.GLOBAL_IDENTITY) {
    text = identity.isLogin ? 'Global Login' : 'App Integration';
  } else if (identity.category === UserIdentityCategory.SOCIAL_IDENTITY) {
    text = 'Legacy Integration';
  } else {
    throw new Error('Invalid category'); // ← Thrown for github-copilot-identity
  }
}

// After: handles all categories including GitHub Copilot
function identityLabel(identity: UserIdentityConfig) {
  if (identity.category === UserIdentityCategory.GLOBAL_IDENTITY) {
    text = identity.isLogin ? 'Global Login' : 'App Integration';
  } else if (identity.category === UserIdentityCategory.SOCIAL_IDENTITY) {
    text = 'Legacy Integration';
  } else if (identity.category === UserIdentityCategory.GITHUB_COPILOT_IDENTITY) {
    text = 'GitHub Copilot';
  } else {
    throw new Error('Invalid category');
  }
}

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 11, 2026 17:26
- Add GITHUB_COPILOT_IDENTITY to UserIdentityCategory enum
- Update identityLabel function to handle GitHub Copilot identity
- Add comprehensive tests for all identity categories

Co-authored-by: JoshFerge <1976777+JoshFerge@users.noreply.github.com>
Update itemOrder function to include GITHUB_COPILOT_IDENTITY in the category ranking to ensure proper sorting of identities in account settings

Co-authored-by: JoshFerge <1976777+JoshFerge@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix handling of GitHub Copilot identity category Handle github-copilot-identity category in frontend Feb 11, 2026
Copilot AI requested a review from JoshFerge February 11, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants