Remove obsolete OpenAI balance check feature#955
Conversation
Remove the pop-up balance button for OpenAI API mode because it relies on deprecated billing endpoints that no longer return reliable results. Do not replace it with the newer OpenAI billing APIs for now because that integration requires more complex permissions and architecture changes than this cleanup should take on. Also, remove the now-unused Balance locale key from all locale files.
Review Summary by QodoRemove obsolete OpenAI balance check feature and locale strings
WalkthroughsDescription• Remove deprecated OpenAI balance check feature relying on obsolete endpoints • Delete Balance locale key from all 13 language translation files • Remove checkBilling() and formatDate() helper functions from GeneralPart • Remove balance state management and related UI button logic Diagramflowchart LR
A["GeneralPart.jsx<br/>Balance Feature"] -->|Remove| B["checkBilling() function"]
A -->|Remove| C["formatDate() function"]
A -->|Remove| D["Balance state & UI button"]
E["Locale Files<br/>13 languages"] -->|Remove| F["Balance translation key"]
File Changes1. src/_locales/de/main.json
|
Code Review by Qodo
1. Removed Balance locale key
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (14)
💤 Files with no reviewable changes (13)
📝 WalkthroughWalkthroughThe changes remove the "Balance" translation key from all 13 supported locale files and eliminate balance-related functionality from the GeneralPart component, including state management, helper functions, and UI rendering logic. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on cleaning up the codebase by eliminating an outdated and non-functional OpenAI balance check feature. The previous implementation used deprecated APIs, leading to unreliable results. By removing this feature and its related components, the PR improves code maintainability and removes unnecessary complexity, without introducing new billing integrations that would require more significant architectural changes. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Pull request overview
This PR removes the OpenAI API “Balance” UI/logic that depended on deprecated/unreliable billing endpoints, and cleans up the now-unused Balance locale key across translations.
Changes:
- Removes OpenAI billing/balance-fetch logic and related UI from the popup’s general settings section.
- Deletes the
Balancetranslation key from all localemain.jsonfiles.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/popup/sections/GeneralPart.jsx | Removes obsolete balance-check helpers/state and the balance button from the OpenAI API key UI. |
| src/_locales/*/main.json | Removes the unused Balance locale key from all supported locales. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request removes the obsolete OpenAI balance check feature. The changes are straightforward, removing the related logic from GeneralPart.jsx and the corresponding translation keys from all locale files. However, it appears that removing the translation keys has introduced a JSON syntax error in all main.json files due to a missing comma on the preceding line. This is a critical issue that will likely break localization. Please see the specific comment for details.
Remove the pop-up balance button for OpenAI API mode because it relies on deprecated billing endpoints that no longer return reliable results.
Do not replace it with the newer OpenAI billing APIs for now because that integration requires more complex permissions and architecture changes than this cleanup should take on.
Also, remove the now-unused Balance locale key from all locale files.
Summary by CodeRabbit