Skip to content

feat: add optional official usage alert hiding - #1759

Open
Rat0323 wants to merge 2 commits into
BigPizzaV3:mainfrom
Rat0323:agent/hide-official-usage-alert
Open

feat: add optional official usage alert hiding#1759
Rat0323 wants to merge 2 commits into
BigPizzaV3:mainfrom
Rat0323:agent/hide-official-usage-alert

Conversation

@Rat0323

@Rat0323 Rat0323 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Add an opt-in Hide official low-usage alert setting for official-login provider profiles.
  • Show the setting in its own Official login section, independently from Mix in API KEY.
  • Hide only the official sidebar usage-alert card, identified by its live-region, progress element, and dismiss-button semantics.
  • Keep the lower-left account menu available for checking the official quota.
  • Keep the option disabled by default and inactive for pure API profiles.

Why

In official-login profiles, including configurations that mix in an API key, the official low-usage card can repeatedly appear even when that quota is not the user's primary request path. The account menu already provides an on-demand quota view, so this adds a narrowly scoped opt-in UI preference without changing the default Codex behavior.

The implementation intentionally does not remove React-owned nodes. It hides the matched alert container and restores it if the setting is disabled. If the official DOM structure cannot be identified reliably, it leaves the UI unchanged.

Closes #1734.

Validation

  • npm run check
  • npm test (36 passed)
  • npm run vite:build
  • cargo fmt --all --check
  • cargo test -p codex-plus-core --lib (206 passed)
  • cargo test -p codex-plus-core --test cdp_bridge (96 passed)
  • npm run build (release launcher and Manager build)
  • Clean merge simulation with PR Fix provider-specific goals feature overrides #1718 using git merge-tree

Note: node tools/i18n-verify.mjs still reports pre-existing untranslated Sub2API and session-index strings from current main; both strings introduced by this PR are translated.

@Rat0323
Rat0323 marked this pull request as ready for review August 3, 2026 06:51
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.

[Feature]: 官方登录时可选关闭官方低额度提示

1 participant