aee3987c24
- Extract FileBrowser from inline definition in repo-workspace.tsx - Create components/features/git/FileBrowser.tsx with module CSS - Create reusable UI primitives: LoadingState, ErrorState, StatusBadge - Create barrel exports for components/ui/ and components/features/git/ - Replace inline loading/error patterns in dashboard, sessions, repo-workspace Quality gates: tsc (pass), eslint (pass) Refs: repo-restructure Task 1.2
1.7 KiB
1.7 KiB
Task 1.2 Apply Report: Extract FileBrowser and Shared UI Primitives
Status: Success
Files Created (8)
apps/web/src/components/features/git/FileBrowser.tsx— Extracted FileBrowser component from inline definition in repo-workspace.tsxapps/web/src/components/features/git/FileBrowser.module.css— CSS module for FileBrowser stylesapps/web/src/components/ui/LoadingState.tsx— Reusable loading component with customizable messageapps/web/src/components/ui/ErrorState.tsx— Reusable error component with optional retry buttonapps/web/src/components/ui/StatusBadge.tsx— Reusable status badge componentapps/web/src/components/ui/index.ts— Barrel export for UI primitivesapps/web/src/components/features/git/index.ts— Barrel export for git feature components
Files Modified (3)
apps/web/src/pages/repo-workspace.tsx— Removed inline FileBrowser, imported from features/git, replaced loading/error with LoadingState/ErrorStateapps/web/src/pages/dashboard.tsx— Replaced inline loading/error with LoadingState/ErrorStateapps/web/src/pages/sessions.tsx— Replaced inline loading/error with LoadingState/ErrorState
Quality Gate Results
npm run typecheck(frontend): PASS — zero errorsnpm run lint(frontend): PASS — zero warningsgrep -n "const FileBrowser" pages/repo-workspace.tsx: PASS — zero results (no inner component)- All 3 pages compile and import paths resolve correctly
Notes
- FileBrowser CSS module created but global CSS classes remain in styles.css for backward compatibility during Phase 2
- Icon import removed from repo-workspace.tsx since FileBrowser no longer uses it inline
- All page loading/error patterns now use shared UI primitives