Skip to content

Frontend: Dynamic VCS provider in code reference badges #7135

@emyller

Description

@emyller

Context: #7000
Depends on: #7134

The feature-list badges are hardcoded to show the GitHub icon regardless of the actual provider.

Scope

Use the vcs_provider returned by the API (added in #7134) to show the correct icon per repository.

Changes

frontend/common/types/responses.ts (~line 633): Add vcs_provider: VCSProvider to the code_references_counts type.

Three locations hardcode vcsProvider={VCSProvider.GITHUB}:

  • frontend/web/components/feature-summary/FeatureTags.tsx (line 79)
  • frontend/web/components/feature-summary/ProjectFeatureRow.tsx (lines 70, 119)

Replace with dynamic provider from the data. When a feature is scanned from multiple providers, show one badge per provider. Consider extracting a shared component to avoid duplicating the grouping logic.

VCSProviderTag and GitlabIcon already exist and handle GitLab — no new UI components needed.

Acceptance criteria

  • Correct icon (GitHub/GitLab) shown per repository's provider
  • Features scanned by both providers show both icons
  • No hardcoded VCSProvider.GITHUB in badge rendering
  • npm run typecheck && npm run lint pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions