feat(web): add Syncing filter to Repositories table
Summary
Add a new Syncing filter option to the Repositories table status filter dropdown. This allows users to filter repositories that are currently being synced (pending or in-progress).
Changes
BullMQClient (packages/shared)
- Add
getSyncingJobIdsmethod to fetch job IDs in pending/active states (waiting,waiting-children,prioritized,active) - Add
getSyncingRepoIdsmethod to extractrepoIdfrom pending jobs (catches pending reindex for already-indexed repos) - Add corresponding tests
Repositories Table (packages/web)
- Add "syncing" to the
StatusFiltertype andgetStatusFiltervalidation - Add "Syncing" option to the status filter dropdown (placed between "Filter by status" and "Failed")
- Add
statusSchemavalidation for the "syncing" query parameter - Implement syncing filter logic in
page.tsx:- Filter repos with
latestIndexingJobIdin the set of syncing job IDs (active jobs) - Filter repos with
idin the set of syncing repo IDs (pending reindex jobs) - Filter repos with
indexedAt: nullANDfirstIndexingJobFinishedAt: null(first-time syncing, excludes failed-first-index)
- Filter repos with
- Add empty state message: "No repositories are currently syncing."
- Add tests for the new filter functionality
Review Comments Addressed
1. Syncing filter overlaps Failed (fixed)
The original indexedAt: null clause matched repos whose first index failed. Fixed by adding firstIndexingJobFinishedAt: null constraint, which excludes repos that already finished their first indexing job (whether succeeded or failed).
2. Pending reindex on already-indexed repos invisible (fixed)
Added getSyncingRepoIds() that extracts data.repoId from pending jobs. The syncing filter now matches repos by ID (not just by latestIndexingJobId), catching pending reindex jobs before the worker starts.
3. Scheduled future jobs counted as syncing (fixed)
Removed delayed and paused states from syncing job queries. These states include scheduled repeat jobs (future reindexing), not actual sync operations.
Testing
- All existing tests pass (28 reposTable tests, 17 BullMQClient tests)
- Added tests for:
- Reflecting syncing status filter from URL
- Empty state message for syncing filter
- Clear filters button visibility for syncing filter
getSyncingRepoIdsmethod
E2E Validation
Tested locally with real public GitHub repos (sourcebot-dev/sourcebot, torvalds/linux, laravel/laravel, dolthub/dolt):
Syncing Filter Empty State (Fixed)
Syncing filter showing empty state when no repos are syncing
Manual Sync Shows Syncing Badge
Manual sync on laravel showing Syncing badge
Manual sync on linux showing Syncing badge
Failed Filter Still Works
Failed filter showing empty state
Results
- Syncing filter correctly excludes failed-first-index repos (no overlap with Failed)
- Syncing filter correctly excludes scheduled future reindex jobs
- Manual sync triggers are correctly captured by the syncing filter
- Failed/Warning/all filters continue to work correctly
To show artifacts inline, enable in settings.


Summary by cubic
Adds a Syncing filter to the Repositories table status dropdown, showing repositories with pending or in-progress indexing jobs.
getSyncingJobIdslists jobs in waiting, waiting-children, prioritized, and active states;getSyncingRepoIdsextracts the repo IDs from those jobs.- A repository counts as syncing when its latest indexing job or repo ID is in that set, or when it has never been indexed (
indexedAtandfirstIndexingJobFinishedAtare both null). - Delayed and paused jobs are excluded so scheduled future reindexes don't show as syncing, and repos whose first index failed only appear under Failed.
- Adds the "No repositories are currently syncing." empty state.
Summary by CodeRabbit
- New Features
- Added a Syncing status filter to the Repositories table.
- Repositories currently being indexed or awaiting indexing are now included in Syncing results.
- Added an empty-state message when no repositories are syncing.
- The status filter and URL-based filtering now support Syncing alongside existing statuses.
- Clearing filters continues to work when Syncing is selected.