Skip to content

Show account identity beside plan badge#439

Open
mrevanzak wants to merge 6 commits intorobinebers:mainfrom
mrevanzak:show-account-identity
Open

Show account identity beside plan badge#439
mrevanzak wants to merge 6 commits intorobinebers:mainfrom
mrevanzak:show-account-identity

Conversation

@mrevanzak
Copy link
Copy Markdown

@mrevanzak mrevanzak commented May 5, 2026

Summary

  • Show detected account identity beside the plan badge in provider cards.
  • Emit Codex account id as an Account detail line and declare it in the plugin manifest.
  • Promote Account lines to the header so they do not duplicate in the detail body.

Tests

  • bunx vitest run src/components/provider-card.test.tsx plugins/codex/plugin.test.js
  • bunx vitest run && bun run build

Visual evidence

  • Before:
image
  • After:
image

Closes #438


Summary by cubic

Show the account identity next to the plan badge in provider cards, with a setting to hide it. Codex now prefers email from the id_token and updates identity after token refresh. Closes #438.

  • New Features
    • Codex plugin emits an "Account" line, preferring id_token email (email, profile.email, namespaced) with account_id as fallback; updates after token refresh.
    • Provider card shows an account badge beside the plan badge with a tooltip; hides detail-scoped identity on overview; removes the body duplicate.
    • Settings: added "Show account identity" toggle (default on), persisted and applied across views.
    • Docs: mark "Account" as reserved for header; plugins/gemini manifest removes its Account line.

Written for commit a641658. Summary will update on new commits.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 5 files

@mrevanzak mrevanzak marked this pull request as draft May 5, 2026 06:13
@mrevanzak mrevanzak marked this pull request as ready for review May 5, 2026 06:19
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 5 files

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d577a80ebe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/codex/plugin.js Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds account identity display to provider cards by promoting Account text lines into the card header, and updates the Codex plugin to emit that identity from its auth state.

Changes:

  • Render detected account identity beside the plan badge and remove duplicated Account rows from the body.
  • Add ProviderCard tests for header rendering and overview-filter interactions.
  • Emit Codex account identity from id_token/account_id, declare it in the manifest, and add plugin tests for refresh-driven identity updates.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/components/provider-card.tsx Extracts Account text lines into the header badge area and filters them from rendered body lines.
src/components/provider-card.test.tsx Adds UI tests for account badge rendering and overview-filter behavior.
plugins/codex/plugin.test.js Adds Codex tests for reading account identity from stored and refreshed tokens.
plugins/codex/plugin.json Declares the new Account text line in the Codex manifest.
plugins/codex/plugin.js Parses Codex id_token claims and emits an Account line alongside existing usage data.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/provider-card.tsx
Comment thread plugins/codex/plugin.json Outdated
Comment thread src/components/provider-card.tsx
Comment thread src/components/provider-card.tsx Outdated
@HDash
Copy link
Copy Markdown

HDash commented May 5, 2026

This is really cool and paves the way for multiple accounts per provider. However, it would be great if we could toggle this feature on or off in the settings to avoid clutter.

@mrevanzak
Copy link
Copy Markdown
Author

This is really cool and paves the way for multiple accounts per provider. However, it would be great if we could toggle this feature on or off in the settings to avoid clutter.

nice idea

@github-actions github-actions Bot added the docs label May 5, 2026
@mrevanzak mrevanzak force-pushed the show-account-identity branch from 8e42c6d to 7250a8c Compare May 5, 2026 12:42
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a641658811

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}, [scheduleTrayIconUpdate, setMenubarIconStyle])

const handleShowAccountIdentityChange = useCallback((value: boolean) => {
track("setting_changed", { setting: "show_account_identity", value: String(value) })
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Import analytics track helper before calling it

handleShowAccountIdentityChange calls track(...) but this module never imports or defines track, so toggling “Show account identity” can throw ReferenceError: track is not defined at runtime and abort the rest of the handler (state update/save). This affects users when they change that setting in Settings.

Useful? React with 👍 / 👎.

@validatedev
Copy link
Copy Markdown
Collaborator

Actually we are not currently supporting multi-account workflows. What's your thinking about the beneficial aspects of the PR?

@mrevanzak
Copy link
Copy Markdown
Author

Actually we are not currently supporting multi-account workflows. What's your thinking about the beneficial aspects of the PR?

Yes, I understand. I just want to know which account this app used to display the data. its a basic stuff tho

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.

Show account identity beside plan badge

4 participants