Repository navigation
[500 by Claude Opus] Support multi-branch indexing for repositories - #501
Conversation
…itories Implemented by Claude Code using claude-opus-4-5-20251101 model. Implementation completed successfully.
❌ Checks FailedLinting or Build errors were detected. View Logs |
|
✅ Applied the requested follow-up changes in commit 5c227eb Summary of ChangesAll ESLint errors have been fixed. Here's a summary of the changes made: Summary of Fixes1.
|
…changes made: All ESLint errors have been fixed. Here's a summary of the changes made: ## Summary of Fixes ### 1. `src/indexing_worker.ts` (line 149) - max-params **Issue:** `queueIndexingJob` had 5 parameters (max 4) **Fix:** Created `QueueIndexingJobOptions` interface and refactored function to accept a single options object. ### 2. `packages/core/src/services/relevance/summaryMinerDirectories.ts` (line 30) - max-params **Issue:** `aggregateDirectories` had 5 parameters (max 4) **Fix:** Created `AggregateDirectoriesOptions` interface (exported) and refactored function to accept a single options object. Updated the call site in `summaryMiner.ts`. ### 3. `packages/core/src/services/relevance/summaryMinerHelpers.ts` (line 342) - max-params **Issue:** `saveBatchSummaries` had 5 parameters (max 4) **Fix:** Created `SaveBatchSummariesOptions` interface and refactored function to accept a single options object. Updated the call site. ### 4. `packages/core/src/services/relevance/summaryMiner.ts` (line 99) - complexity **Issue:** `indexRepo` had cyclomatic complexity of 21 (max 20) **Fix:** Extracted the agent setup logic (registry initialization, alias parsing, agent lookup, model override handling) into a new `setupAgent()` helper function. This reduced the complexity of `indexRepo` by moving the conditional logic for parsing agent aliases and handling model overrides into the helper function. Key changes: **Issue:** `queueIndexingJob` had 5 parameters (max 4) **Fix:** Created `QueueIndexingJobOptions` interface and refactored function to accept a single options object. **Issue:** `aggregateDirectories` had 5 parameters (max 4) **Fix:** Created `AggregateDirectoriesOptions` interface (exported) and refactored function to accept a single options object. Updated the call site in `summaryMiner.ts`. **Issue:** `saveBatchSummaries` had 5 parameters (max 4) **Fix:** Created `SaveBatchSummariesOptions` interface and refactored function to accept a single options object. Updated the call site. **Issue:** `indexRepo` had cyclomatic complexity of 21 (max 20) **Fix:** Extracted the agent setup logic (registry initialization, alias parsing, agent lookup, model override handling) into a new `setupAgent()` helper function. This reduced the complexity of `indexRepo` by moving the conditional logic for parsing agent aliases and handling model overrides into the helper function. PR: #501 Comment by: @github-actions[bot] (ID: 3737583301) Model: claude-opus-4-5-20251101
|
UI still shows the same progress for 2 projects with the same repo: while the API response looks correct: |
|
✅ Applied the requested follow-up changes in commit 008b1d5 Summary of ChangesAll changes have been implemented. Here's a summary of the fixes made: Summary of ChangesThe issue was that the UI was showing the same indexing progress for two projects with the same repository but different branches ( Files Modified:
Key changes:
🤖 Implementation Details
Undo Changes • View Task Execution Processing comment ID: 3737639165✓ |
…fixes made: All changes have been implemented. Here's a summary of the fixes made: ## Summary of Changes The issue was that the UI was showing the same indexing progress for two projects with the same repository but different branches (`integry/forex` with branch `HEAD` and `integry/forex` with branch `goforex-code-dedup`). The root cause was that the frontend was using only `full_name` as the key for storing and looking up repository indexing statuses. ### Files Modified: 1. **`gitfix-ui/src/api/repoIndexingApi.ts`**: - Added `branch: string` field to `RepositoryIndexingStatus` interface - Added `getRepoStatusKey()` helper function that generates a composite key (`full_name:branch` for non-HEAD branches, `full_name` for HEAD) - Updated `stopRepositoryIndexing()` to accept optional `branch` parameter - Updated `triggerRepositoryIndexing()` to accept optional `baseBranch` parameter 2. **`gitfix-ui/src/pages/RepositoriesPage.tsx`**: - Imported `getRepoStatusKey` helper - Updated `loadIndexingStatuses()` to store status using composite key - Updated `handleStopIndexing()` to accept and pass `baseBranch` parameter - Updated `handleReindexRepo()` to accept and pass `baseBranch` parameter - Updated `IndexingStatusIndicator` component usage to lookup status with composite key and pass branch to handlers 3. **`packages/dashboard/routes/configRoutes.ts`**: - Updated `stopIndexing` endpoint to extract `branch` from request body - Updated to pass `branch` to `stopIndexingJob` helper - Enhanced activity log message to include branch info 4. **`packages/dashboard/routes/configHelpers.ts`**: - Updated `stopIndexingJob()` to accept optional `branch` parameter - Updated job filtering logic to match both `repository` AND `baseBranch` - Updated `updateRepositoryStatus()` call to pass branch parameter Key changes: 1. **`gitfix-ui/src/api/repoIndexingApi.ts`**: - Added `branch: string` field to `RepositoryIndexingStatus` interface - Added `getRepoStatusKey()` helper function that generates a composite key (`full_name:branch` for non-HEAD branches, `full_name` for HEAD) - Updated `stopRepositoryIndexing()` to accept optional `branch` parameter - Updated `triggerRepositoryIndexing()` to accept optional `baseBranch` parameter 2. **`gitfix-ui/src/pages/RepositoriesPage.tsx`**: - Imported `getRepoStatusKey` helper - Updated `loadIndexingStatuses()` to store status using composite key - Updated `handleStopIndexing()` to accept and pass `baseBranch` parameter - Updated `handleReindexRepo()` to accept and pass `baseBranch` parameter PR: #501 Comment by: @integry (ID: 3737639165) Model: claude-opus-4-5-20251101
🚀 Preview Environment DeployedYour PR preview environment is now available: UI: https://pr-501.gitfix.dev This comment is automatically updated on each deployment. |
AI Implementation Summary
Closes #500
Model Used: claude-opus-4-5-20251101
Status: ✅ Implementation Completed
Branch:
500/claude-opus-4-5-20251101-support-multi-branch-inde-20260112-0910-puqCommits: ✅ Changes committed (092f1fe)
AI Processing Completed
Execution Details:
Summary:
All the changes are in place. Let me provide a summary of the implementation:
Summary of Implementation
I have successfully implemented multi-branch indexing support for GitHub issue #500. Here's what was done:
1. Database Migration (
packages/core/src/db/migrations/20260109000000_add_branch_to_indexing.js)branchcolumn torepositories,file_summaries, anddirectory_summariestablesfull_name+branch) for repositories and (path+branch) for summaries'HEAD'to maintain backward compatibility2. Core Logic Updates (
packages/core/src/services/relevance/summaryMiner.ts)IndexingOptionsinterface to accept an optionalbranchparameterindexRepo()to pass branch through all phases of indexingupdateRepositoryStatus()to use composite key (full_name,branch)identifyStaleFiles()to filter by branchdeleteFileSummaries()to filter by branchgetFileSummary,getDirectorySummary,getRepositorySummaries,clearRepositorySummaries) to accept optional branch parameter3. Batch Processing Updates (
packages/core/src/services/relevance/summaryMinerHelpers.ts)ProcessBatchesOptionsto includebranchparametersaveBatchSummaries()to insert records with branch and use composite key for upsert4. Directory Aggregation Updates (
packages/core/src/services/relevance/summaryMinerDirectories.ts)aggregateDirectories()to accept and use branch parameter5. Worker Updates (
src/indexing_worker.ts)loadMonitoredRepos()toloadMonitoredReposRaw()to access full repo config includingbaseBranchprocessRepositoryForIndexing()to acceptRepoToMonitorconfig object and use branchcloneRepositoryForIndexing()to pass branch toensureRepoCloned()queueIndexingJob()to include branch in job data and job IDscanAndQueueRepositories()to iterate over full config objectsupdateRepositoryStatus()6. Config Manager Updates (
packages/core/src/config/configManager.ts)RepositoryIndexingStatusinterface to includebranchfieldgetRepositoriesIndexingStatus()to return branch informationgetRepositoryIndexingStatus()to accept optional branch parameterAcceptance Criteria Met:
repositoriestable can store separate rows for the same repo with different branchesfile_summariesare isolated by branchbaseBranchfromrepos_to_monitorconfigDetailed Logs:
Log files stored at:
/tmp/claude-logs/issue-500-2026-01-12T09-18-53-697Z-output.txtLatest Conversation Messages
Powered by Claude Code v1.0.0
This PR was created automatically by Claude Code after processing issue #500.