fix(browser-extension): handle unreachable background script on Firef…#2649
fix(browser-extension): handle unreachable background script on Firef…#2649Joly0 wants to merge 1 commit intokarakeep-app:mainfrom
Conversation
…ox Android Signed-off-by: Joly0 <13993216+Joly0@users.noreply.github.com>
WalkthroughBoth BookmarkSavedPage and SavePage updated to wrap badge refresh logic in try/catch blocks, treating Chrome tab queries and runtime message sends as best-effort operations. Errors are suppressed while navigation and success flows continue unconditionally. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
Greptile SummaryThis PR fixes a spurious error shown to users when saving a bookmark via the Firefox Android extension, caused by The fix wraps the badge-refresh calls ( Confidence Score: 5/5Safe to merge — the fix is minimal, targeted, and correctly isolates badge-refresh failures from the bookmark operation result. Both changes are identical in structure, well-commented, and correctly scoped: real errors (bookmark save/delete failures) still reach the user via onError, while the non-critical badge refresh is now silently swallowed on platforms where it cannot succeed. No logic changes to the core bookmark flow. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "fix(browser-extension): handle unreachab..." | Re-trigger Greptile |
…ox Android
Fixes #2122
When saving a bookmark via the Firefox Android extension, the popup tries to send a badge refresh message to the background script. On Firefox Android the background script isn't always reachable from the popup context, causing chrome.runtime.sendMessage to throw. This error bubbled up through the mutation's onSuccess callback and showed an error to the user even though the bookmark was saved.
Tested on firefox nightly on android