-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Problem
The CodeSource interface is copy-pasted identically in 7 files:
components/analytics/AnalyticsHeader.vuecomponents/analytics/SourceManager.vuecomponents/analytics/CodebaseAnalytics.vuecomponents/analytics/AddSourceModal.vuecomponents/analytics/ShareSourceModal.vuecomponents/analytics/panels/CodebaseAnalyticsHeader.vuecomponents/analytics/CodebaseAnalyticsLanding.vue
Each file defines:
interface CodeSource {
id: string
name: string
source_type: 'github' | 'local'
repo: string | null
branch: string
status: string
clone_path: string | null
[key: string]: unknown
}This violates DRY and makes it easy for definitions to drift out of sync.
Discovered During
Code review of PR #2225 (refactor/issue-1469 — decompose CodebaseAnalytics.vue).
Impact
Severity: low — No runtime impact today, but any field addition/change must be repeated in 7 places.
Suggested Fix
Extract to a shared types file (e.g., types/analytics.ts or types/codeSource.ts) and import from all 7 components.
Reactions are currently unavailable