Add batch URL submission for evaluating up to 50 repos sequentially (Vibe Kanban)#2
Merged
Add batch URL submission for evaluating up to 50 repos sequentially (Vibe Kanban)#2
Conversation
When --cloud is not set, users can now toggle between single URL and batch mode on the homepage. Batch mode accepts up to 50 Git URLs (one per line) and processes them strictly one at a time via a new BatchManager that listens for job completion callbacks before submitting the next URL. Backend: BatchManager orchestration, POST/GET batch API routes, JobManager onJobFinished hooks, shared git-url-validation, rate limit pre-check. Frontend: Single/Batch toggle in RepositoryUrlInput, BatchStatusPage with polling, batch API methods in useEvaluationApi hook. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
--cloudis not set at runtime), keeping the cloud experience unchangedWhy
Evaluating multiple repositories one-by-one through the UI is tedious. Users running the evaluator locally or on their own infrastructure need a way to queue up a batch of repos and let the tool work through them without manual intervention.
What changed
Backend
BatchManager(src/api/jobs/batch-manager.ts): New orchestration class that manages batch lifecycle — validates URLs, rate-limits upfront, submits jobs sequentially usingJobManager.onJobFinishedcallbacks, and auto-cleans stale batches after 2 hoursJobManagerhooks (src/api/jobs/job-manager.ts): AddedonJobFinishedcallback mechanism so BatchManager gets notified when each job reaches a terminal statesrc/api/routes/evaluation.ts,src/api/index.ts):POST /api/evaluate/batchto create a batch,GET /api/evaluate/batch/:batchIdto poll status. Routes are wired before/api/evaluate/:idto avoid route collisionsrc/shared/types/api.ts):BatchEntryStatus,IBatchEvaluateRequest,IBatchEvaluateResponse,IBatchStatusResponsesrc/shared/file-system/git-url-validation.ts): Backend mirror of the frontend URL validator (separate build targets prevent sharing)Frontend
frontend/src/components/RepositoryUrlInput.tsx): Single/Batch button group (hidden in cloud mode) with a textarea for pasting URLs one-per-line, real-time validation, and count feedbackfrontend/src/components/BatchStatusPage.tsx): New route at/batch/:batchIdwith 3-second polling, progress bar, status badges per job, and links to completed evaluation resultsfrontend/src/hooks/useEvaluationApi.ts): AddedsubmitBatch()andgetBatchStatus()methodsfrontend/src/App.tsx): Batch submit handler, route registration (conditionally excluded in cloud mode)Tests
src/api/jobs/batch-manager.test.ts): Covers batch creation, URL validation, sequential processing flow, status computation, and error handlingImplementation details
onJobFinishedcallback to submit job Add batch URL submission for evaluating up to 50 repos sequentially (Vibe Kanban) #2, and so on. This guarantees only one batch job runs at a time.BatchManageris instantiated asnullwhen cloud mode is active. The batch routes return403, and the frontend toggle is hidden.This PR was written using Vibe Kanban