- Notifications
You must be signed in to change notification settings - Fork 851
Fix: Address potential bugs and improve error handling #863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PeterDaveHello wants to merge 9 commits into master Choose a base branch from bugfix/general-fixes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
9 commits Select commit Hold shift + click to select a range
cc2b4fe Fix: Address potential bugs and improve error handling
google-labs-jules[bot] 3191f53 Fix: Resolve linting errors and apply previous fixes
google-labs-jules[bot] d174940 Fix: Address PR#863 feedback and resolve critical issues
google-labs-jules[bot] 789d8fe Fix: 根據最新 PR Review 意見進行全面修正
google-labs-jules[bot] a986d2e Fix: 根據最新 PR Review (Qodo, CodeRabbit, Copilot) 進行進一步修正
google-labs-jules[bot] 0b5e7a4 根據最新的程式碼審查意見,我進行了最終修正。
google-labs-jules[bot] 3fbed97 Jules was unable to complete the task in time. Please review the work…
google-labs-jules[bot] ecde37b This latest update incorporates feedback from multiple reviews to enh…
google-labs-jules[bot] 5fd1923 Fix: PR#863 多輪 Review意見的綜合修正與最終實施
google-labs-jules[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix: 根據最新 PR Review 意見進行全面修正
針對 PR#863 的最新 review 意見進行了進一步的修正,主要包括: 1. **徹底解決 `chrome` 未定義問題:** * 標準化 `sidePanel` API 至 `Browser.sidePanel`,確保 CI Lint 通過。 2. **改進敏感資料編輯:** * 在 `src/background/index.mjs` 中實現並使用了遞迴的 `redactSensitiveFields` 輔助函數,以更全面地編輯日誌中的敏感資訊 (API keys, tokens 等)。 3. **修復 Promise 競爭條件與潛在記憶體洩漏:** * 在 `src/content-script/index.jsx` 的 `prepareForJumpBackNotification` 中,為 Claude 和 Kimi 的 token 輪詢邏輯引入了 `cleanup` 函數,以正確管理和清除定時器,防止競爭條件和記憶體洩漏。 4. **處理日誌級別一致性:** * 將 `src/background/index.mjs` 中 `setPortProxy` 函數內一處 `console.log` 修改為 `console.debug`。 5. **確認 `Origin` header 修改日誌:** * 確認 `onBeforeSendHeaders` 中對 `Origin` header 的修改已能正確觸發日誌記錄。 6. **採納 CodeRabbit Nitpicks 和建議:** * **監聽器清理:** 確認 `setPortProxy` 中監聽器清理邏輯的穩健性。 * **重連配置:** 將 `setPortProxy` 中的重連參數(最大次數、延遲、退避乘數)定義為 `RECONNECT_CONFIG` 常數。 * **可選鏈接:** 在 `src/background/index.mjs` 和 `src/content-script/index.jsx` 的建議位置應用了 `?.` 可選鏈接。 所有更改均已通過 `npm run lint`。這些修正旨在進一步提高擴充功能的穩定性、安全性和程式碼品質。
- Loading branch information
commit 789d8fe0a47f45e743a33c20b5726958a2a1624b
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Mixed use of
console.log,console.debug, andconsole.errorcan make log levels inconsistent. It may help to standardize on a single logger utility or consistent level strategy.