Merged
Conversation
…-extension into feat/search-feature-#4
This PR resolves the performance issue where the extension would freeze when scanning very large inboxes (~500k emails).
There was a problem hiding this comment.
Pull Request Overview
This PR adds progressive loading functionality to display real-time progress when fetching email senders from Gmail, improving user experience during long-running operations.
Key changes:
- Introduces a visual progress bar UI with cancellation support
- Implements batch processing with progress reporting in the email fetching logic
- Adds comprehensive Playwright tests for progressive loading behavior
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
test/ui/sidebar/progressiveLoading.spec.ts |
New test suite with 10 tests covering progress bar display, cancellation, transitions, and edge cases |
test/ui/sidebar/helpers.ts |
Added helper functions for waiting on progress completion and retrieving progress state |
src/presentation/providers/app_provider.tsx |
Updated context to manage fetch progress state and cancellation, integrated progress callbacks with MockEmailRepo |
src/presentation/apps/sidebar/components/sendersContainer.tsx |
Modified rendering logic to show progress bar when fetchProgress is available |
src/presentation/apps/sidebar/components/fetchProgress.tsx |
New component rendering the progress bar UI with stats and cancel button |
src/presentation/apps/sidebar/components/fetchProgress.css |
Styling for the progress bar component |
src/data/services/browser_email_service.ts |
Refactored to support batch processing, progress callbacks, and cancellation via AbortSignal |
src/data/repositories/mocks/mock_email_repo.ts |
Added progress simulation with configurable progressive loading and cancellation |
src/data/repositories/browser_email_repo.ts |
Added progress callback support and cancel method, listens for progress messages from content script |
src/data/content_scripts/content.ts |
Refactored to support cancellation with AbortController and send progress updates to side panel |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
anna-st-40
requested changes
Oct 29, 2025
Member
anna-st-40
left a comment
There was a problem hiding this comment.
Please consider the comments left by Copilot
anna-st-40
approved these changes
Oct 29, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR resolves the performance issue where the extension would freeze when scanning very large inboxes (~500k emails).
It replaces the "all-at-once" email fetching mechanism with a progressive loading system that processes emails in batches.
This provides a much better user experience by preventing the UI from freezing and giving the user real-time feedback and control over the scanning process.
✨ Key Changes
BrowserEmailServicenow fetches emails in configurable batches to avoid blocking the main thread.FetchProgressBarcomponent has been added, which displays:AppProvidernow manages the state for fetch progress and cancellation.✅ Verification
All 37 existing Playwright UI tests were executed and passed successfully, confirming that these changes do not break existing functionality.