-
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Problem
After the initial decomposition in PR #2225 (#1469), CodebaseAnalytics.vue was reduced from 5500 to 4519 lines. However, the script section remains at 3200+ lines with 503 functions/consts — the template extractions were effective but the orchestration logic was left untouched.
The parent component still owns:
- All reactive state declarations (~200 refs/reactives)
- All data-loading/fetching functions (~40 async functions)
- All event handlers for child components
- All WebSocket/polling setup
- Type interfaces used only by specific sub-components
Discovered During
Implementation of #1469 (PR #2225)
Suggested Approach
Extract into focused composables under composables/analytics/:
useCodebaseState.ts— shared reactive state (rootPath, analyzing, sources, selectedSource, etc.)useCodebaseIndexing.ts— indexing job management, progress polling, phase/batch trackinguseCodebaseSourceRegistry.ts— source CRUD, selection, sharing- Wire the already-created
useCodebaseDataLoaders.ts(see related issue)
Target: reduce parent script to <500 lines of pure orchestration (composable wiring + child event routing).
Impact
Medium — the file is still a maintenance burden. Changes to one data-loading function risk side effects across 500 other declarations.
Reactions are currently unavailable