Handle close-all-chats errors#1018
Conversation
Wait for the active-tab query and close message so callers can synchronize with completion. Treat missing tabs as a no-op and log browser API failures within the action because not every caller observes its returned promise. Add focused command, menu-tool, and side-panel regression coverage.
|
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 (3)
📝 WalkthroughWalkthroughThe menu-tools module updates internal import specifiers and makes ChangesMenu and command behavior
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
PR Summary by QodoHandle closeAllChats tab/query failures and await completion
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
There was a problem hiding this comment.
Code Review
This pull request updates imports to use the .mjs extension and refactors the closeAllChats action to use async/await with error handling. It also adds comprehensive unit tests for background commands and menu tools. Feedback was provided regarding the closeAllChats action, which attempts to use background-only Browser.tabs APIs without checking the fromBackground flag, potentially causing runtime errors when executed from a content script context.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Notes
Reviewed by hy3:free · Input: 66.6K · Output: 3.2K · Cached: 274.1K |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
closeAllChats.Why
The action previously returned before browser operations completed and did not handle rejected tab APIs. Failures could become unhandled rejections, while the close-all command path had no focused regression coverage.
Validation
npm test(47 test files)npm run test:coverageon Node.js 22 (36.91% lines, 79.70% branches, 71.34% functions)npm run lintnpm run buildgit diff --checkSummary by CodeRabbit
Bug Fixes
Tests