Skip to content

Feature: Support repository aliases and specific base branches #486

Closed

Description

@integry

Feature Request: Multi-Branch Monitoring & Repository Aliasing

Context

Currently, the system identifies repositories solely by their owner/repo name string. This prevents users from:

  1. Monitoring multiple branches of the same repository (e.g., main and develop) simultaneously.
  2. Defining a specific base branch for indexing/monitoring (it defaults to the repo default).
  3. Distinguishing between these configurations with a user-friendly name (Alias).

Requirements

  1. Data Structure Update: Update the configuration schema to identify repositories by a unique 'id' rather than 'name'.
  2. Configuration Fields: Add optional fields for 'alias' (string) and 'baseBranch' (string).
  3. Backend Logic:
    • Allow duplicate 'name' entries if IDs differ.
    • Pass the configured 'baseBranch' to the indexing and planning workers.
  4. UI Updates:
    • Update 'RepositoriesPage' to allow inputting Alias and Base Branch.
    • Display the Alias in the list view.
    • Handle unique IDs for removal/toggling.

Implementation Checklist

  • Update 'RepoToMonitor' interface in 'packages/core'.
  • Update 'configRoutes.ts' to generate UUIDs for new/legacy entries and validate new fields.
  • Update 'RepositoriesPage.tsx' to support the new form fields and list rendering.
  • Ensure backward compatibility for existing config files (auto-generate IDs on load/save).

Activity

  1. integry commented on Jan 1, 2026

    @integry
    OwnerAuthor

    Here is the suggested implementation plan.

    1. Update Core Configuration Types

    File: packages/core/src/config/configManager.ts

    Update the 'RepoToMonitor' interface to support the new fields.

    export interface RepoToMonitor {
        id: string;          // UUID, required for uniqueness
        name: string;        // owner/repo
        enabled: boolean;
        alias?: string;      // Optional display name
        baseBranch?: string; // Optional specific branch to monitor
    }
    

    2. Update Backend Route Logic

    File: packages/dashboard/routes/configRoutes.ts

    Update 'postRepos' to handle ID generation and validation.

    import { randomUUID } from 'crypto';
    
    // In postRepos function:
    const { repos_to_monitor } = req.body;
    
    const processedRepos = repos_to_monitor.map((repo: any) => ({
      ...repo,
      // Preserve existing ID or generate new one
      id: repo.id || randomUUID(),
      // Sanitize new fields
      alias: repo.alias?.trim() || undefined,
      baseBranch: repo.baseBranch?.trim() || undefined
    }));
    
    // Validation logic changes:
    // Allow duplicate 'name' but ensure 'id' is present (which it now is).
    // Save processedRepos to configManager.
    

    Update 'triggerIndexing' to respect the configured branch:

    // In triggerIndexing function:
    // ...
    const { repository, fullReindex } = req.body;
    
    // Note: Client should ideally pass the ID, or we pass baseBranch explicitly
    const job = await indexingQueue.add('indexRepository', {
      repository,
      repoPath,
      correlationId,
      priority: 'high',
      fullReindex: !!fullReindex,
      baseBranch: req.body.baseBranch // Pass this through
    });
    

    3. Update Frontend UI

    File: gitfix-ui/src/pages/RepositoriesPage.tsx

    Refactor the component to manage the new state and display.

    // Add helper for ID generation if adding completely new on client side
    const generateId = () => crypto.randomUUID();
    
    // Update interface
    interface Repo {
      id: string;
      name: string;
      enabled: boolean;
      alias?: string;
      baseBranch?: string;
    }
    
    // In React Component:
    const handleAddRepo = () => {
      if (!newRepo) return;
      
      const newEntry: Repo = {
        id: generateId(),
        name: newRepo,
        enabled: true,
        alias: newAlias || undefined,
        baseBranch: newBaseBranch || undefined
      };
      
      setRepos([...repos, newEntry]);
      // reset inputs...
    };
    
    // Render Logic:
    // Use repo.id as key
    // Display: {repo.alias ? `${repo.alias} (${repo.name})` : repo.name}
    // Show badge for baseBranch if present: [Branch: {repo.baseBranch}]
    
  2. propr-dev commented on Jan 1, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using claude agent with claude-opus-4-5-20251101 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-4-5-20251101
    • Branch: 486/claude-opus-4-5-20251101-feature-support-repositor-20260101-2239-sso
    • Base Branch: main
    • Worktree: issue-486-20260101-2239-claude-opus-4-5-20251101-sso

    🔍 Track Task Execution

  3. added a commit that references this issue on Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions