refactor: extract FileBrowser and shared UI primitives (Task 1.2)
- 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
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# 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.tsx
|
||||
- `apps/web/src/components/features/git/FileBrowser.module.css` — CSS module for FileBrowser styles
|
||||
- `apps/web/src/components/ui/LoadingState.tsx` — Reusable loading component with customizable message
|
||||
- `apps/web/src/components/ui/ErrorState.tsx` — Reusable error component with optional retry button
|
||||
- `apps/web/src/components/ui/StatusBadge.tsx` — Reusable status badge component
|
||||
- `apps/web/src/components/ui/index.ts` — Barrel export for UI primitives
|
||||
- `apps/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/ErrorState
|
||||
- `apps/web/src/pages/dashboard.tsx` — Replaced inline loading/error with LoadingState/ErrorState
|
||||
- `apps/web/src/pages/sessions.tsx` — Replaced inline loading/error with LoadingState/ErrorState
|
||||
|
||||
## Quality Gate Results
|
||||
|
||||
- `npm run typecheck` (frontend): **PASS** — zero errors
|
||||
- `npm run lint` (frontend): **PASS** — zero warnings
|
||||
- `grep -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
|
||||
Reference in New Issue
Block a user