fix: reset summaryInFlight to false in onSuspend to prevent permanent summarization lock#748
fix: reset summaryInFlight to false in onSuspend to prevent permanent summarization lock#748nyxsky404 wants to merge 2 commits into
Conversation
… lock When the service worker is suspended mid-API call, the async summarization promise is abandoned. The onSuspend handler was persisting summaryInFlight as true into chrome.storage.local, causing hydrateState() on the next worker restart to restore it as true — permanently blocking all future summarizations for the session with no user-visible error. Reset summaryInFlight to false before persisting the guard state so the restarted worker begins with a clean summarization slot. Fixes shouri123#736
🚀 Thank You for Contributing to Late-MeetPlease ensure that:
Thank you for contributing 💙 |
|
Warning Review limit reached
More reviews will be available in 58 minutes and 52 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ✨ 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 |
|
👋 Thank you @nyxsky404 for your contribution to Late-Meet! ✅ Verified: You are assigned to the linked issue #736. Please review any automated suggestions or code review comments that may appear below! We will review your PR as soon as possible! Please consider starring the repository ⭐ to show your support! |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Prevents summarization from getting permanently blocked across service worker restarts by clearing the summaryInFlight guard during chrome.runtime.onSuspend.
Changes:
- Reset
summaryInFlighttofalseon service worker suspension to avoid restoring a stale “in-flight” state. - Add explanatory comment documenting why the guard must be cleared before persisting hydration flags.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|



Description
summaryInFlightis a module-level boolean that prevents concurrent summarizations. When the service worker is suspended by Chrome mid-API call, theonSuspendhandler was persistingsummaryInFlight = trueintochrome.storage.local. On the next worker restart,hydrateState()restores this value — permanently blocking all future calls tosummarizeTranscriptIfNeeded()for the rest of the session, since the flag is never reset (thefinallyblock that resets it never ran because the worker was killed).The fix resets
summaryInFlight = falseinsideonSuspendbefore persisting the guard state. A suspended worker cannot complete an async API call, so carrying the flag forward serves no purpose and causes the described lock.Fixes #736
Type of Change
Checklist
npm test)npm run build)