Skip to content

[0.60.5] Redact Codex System Account labels - #548

Open
Finesssee wants to merge 1 commit into
mainfrom
codex/port-0.60.5-codex-privacy
Open

Finesssee wants to merge 1 commit into
mainfrom
codex/port-0.60.5-codex-privacy

Conversation

@Finesssee

@Finesssee Finesssee commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Apply Hide Personal Info only to the ambient/System Codex account, using a stable Account N label.
  • Preserve managed account labels, switch actions, checked state, visibility, and ordering.
  • Apply the same projection to the native tray menu, React account menu, and Settings provider rows.
  • Keep existing account labels when privacy is disabled.

Validation

  • cargo fmt --all -- --check
  • cargo test --manifest-path rust/Cargo.toml codex_accounts -- --nocapture (56 passed)
  • cargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml tray_accounts -- --nocapture (5 passed)
  • cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings
  • cargo clippy --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml --all-targets -- -D warnings
  • pnpm --dir apps/desktop-tauri test --run src/components/CodexAccountsMenu.test.tsx src/components/codexAccountDisplay.test.ts src/surfaces/settings/providers/sections/credentials/CodexAccountsSection.test.tsx (3 files, 21 passed)
  • pnpm --dir apps/desktop-tauri run build
  • Fresh debug binary plus CUA: toggled Advanced → Hide Personal Info, opened Providers, and verified the ambient row rendered as Account 1 with no email in the UIA projection.
  • git diff --check

This PR ports the applicable Windows behavior from upstream v0.60.5. It is intentionally review-only and is not merged.

Summary by CodeRabbit

  • New Features
    • Improved privacy controls for account names in Settings and the account menu.
    • When personal information is hidden, ambient accounts now use generic labels such as “Account 1,” while managed accounts retain non-personal email hints or nicknames.
    • Account labels remain consistent across the tray and Settings, including tooltips and account-selection states.
    • Privacy settings are now applied consistently when viewing provider account details.

@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c9991886-e583-420b-bcc2-f747a1c0df05

📥 Commits

Reviewing files that changed from the base of the PR and between 10e3b09 and 668e53d.

📒 Files selected for processing (10)
  • apps/desktop-tauri/src-tauri/src/tray_accounts.rs
  • apps/desktop-tauri/src/components/CodexAccountsMenu.test.tsx
  • apps/desktop-tauri/src/components/CodexAccountsMenu.tsx
  • apps/desktop-tauri/src/components/codexAccountDisplay.test.ts
  • apps/desktop-tauri/src/components/codexAccountDisplay.ts
  • apps/desktop-tauri/src/surfaces/settings/providers/ProviderDetailPane.tsx
  • apps/desktop-tauri/src/surfaces/settings/providers/sections/credentials/CodexAccountsSection.test.tsx
  • apps/desktop-tauri/src/surfaces/settings/providers/sections/credentials/CodexAccountsSection.tsx
  • apps/desktop-tauri/src/surfaces/settings/tabs/ProvidersTab.tsx
  • rust/src/codex_accounts/models.rs

Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

Ambient accounts now receive opaque ordinal labels when personal information is hidden. Managed accounts retain their email and nickname labels. Shared label logic is used by the tray, desktop menu, and Settings surfaces.

Changes

Privacy-safe account labels

Layer / File(s) Summary
Shared privacy label logic
rust/src/codex_accounts/models.rs, apps/desktop-tauri/src/components/codexAccountDisplay.ts, apps/desktop-tauri/src/components/codexAccountDisplay.test.ts
Account label generation now redacts ambient accounts with stable ordinal labels while preserving managed account labels. Tests cover privacy-enabled and privacy-disabled behavior.
Settings privacy wiring
apps/desktop-tauri/src/surfaces/settings/tabs/ProvidersTab.tsx, apps/desktop-tauri/src/surfaces/settings/providers/ProviderDetailPane.tsx, apps/desktop-tauri/src/surfaces/settings/providers/sections/credentials/CodexAccountsSection.tsx, apps/desktop-tauri/src/surfaces/settings/providers/sections/credentials/CodexAccountsSection.test.tsx
Settings passes hidePersonalInfo through to Codex account rendering. The section uses bridge-provided ordinals and tests both hidden and visible labels.
Desktop account menu integration
apps/desktop-tauri/src/components/CodexAccountsMenu.tsx, apps/desktop-tauri/src/components/CodexAccountsMenu.test.tsx
The desktop menu uses shared surface labels. Ambient accounts receive opaque labels, while managed accounts retain descriptive labels and row states.
Tray menu integration
apps/desktop-tauri/src-tauri/src/tray_accounts.rs
Tray labels delegate privacy handling to CodexAccount::privacy_safe_display_name. Tests cover source-specific labels, stable ordering, active-account state, and switching behavior.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Suggested reviewers: blazzzplay, xuelongmu

Merge Risk: ⚪ Minimal · up to 668e5

Privacy-mode account labels are consistently applied across the affected surfaces, with no actionable merge risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 10 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: redacting Codex System Account labels for the v0.60.5 behavior.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

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.

1 participant