Skip to content

Commit 696d966

Browse files
committed
refactor: split DashboardHome.tsx into focused components
Before: 489 lines, 5 concerns in one file After: 4 files, each with one concern Extracted: - RepoDetailView.tsx (140 lines): single-repo view with tabs, header, back navigation. Receives repo data + callbacks as props. - RepoListView.tsx (81 lines): repo grid with header, add/import buttons, stats. Pure presentational. - lib/api-errors.ts (32 lines): extractErrorMessage, isUpgradeError, safeStringify. Generic utilities, not dashboard-specific. DashboardHome.tsx (222 lines): now just state management, API handlers (addAndIndex, handleGitHubImport, handleReindex), and modal orchestration. Also: - Deduplicated addRepo and githubImport into shared addAndIndex helper - Moved AddRepoForm outside AnimatePresence (was incorrectly nested) - All modals rendered at the bottom of DashboardHome, not inside views Zero visual/behavioral changes. Build passes. 13 tests green. Closes OPE-16
1 parent 5cd9bc1 commit 696d966

4 files changed

Lines changed: 366 additions & 380 deletions

File tree

0 commit comments

Comments
 (0)