refactor: extract dashboard, workspace, tool-types, and tool-configs components (Task 4.3)

- Extract DashboardSummary, ActiveSessionsList, ProjectsSection, QuickCreateForm,
  RecentSessionsSection from dashboard.tsx (480 → 110 lines)
- Extract WorkspaceSidebar from repo-workspace.tsx
- Extract ToolTypeList + ToolTypeForm from tool-types.tsx (409 → 135 lines)
- Extract ToolConfigList + ToolConfigForm from tool-configs.tsx (391 → 178 lines)
- Add use-dashboard-actions hook for shared dashboard action handlers
- Update feature barrels with new exports

Quality gates: tsc (pass), eslint (pass)
Refs: repo-restructure Task 4.3
This commit is contained in:
Developer
2026-06-02 22:23:13 +00:00
parent 6bd7443e68
commit a6eb6ec788
32 changed files with 1583 additions and 1104 deletions
+36 -30
View File
@@ -1,36 +1,42 @@
# Progress
## Status
In Progress — Task 4.2 completed
In Progress — Tasks 1.1 through 4.3 complete
## Tasks
- [x] 1.1 Centralize types and extract seed data
- [x] 1.2 Extract FileBrowser and shared UI primitives
- [x] 2.1 Extract global styles and tokens
- [x] 2.2 Extract CSS modules (terminal + git)
- [x] 2.3 Extract CSS modules (session/settings) + delete styles.css
- [x] 3.1 Extract shared auth dependencies
- [x] 3.2 Create Pydantic schemas directory
- [x] 3.3 Split services/docker.py
- [x] 3.4 Slim tool_instances router
- [x] 3.5 Slim git_repositories and config_profiles routers
- [x] 4.1 Split tool-workshop page into tabs
- [x] 4.2 Extract sessions page components
- [ ] 4.3 Extract dashboard and repo-workspace components
- [ ] 4.4 Rename files to naming convention
- [ ] 5.1 Add tests for extracted components
- [ ] 5.2 Documentation and cleanup
## Completed Tasks
## Files Changed (Task 4.2)
- NEW: components/ui/ConfirmDialog.tsx
- NEW: components/features/session/SessionCard.tsx
- NEW: components/features/session/SessionList.tsx
- NEW: components/features/session/CreateSessionForm.tsx
- NEW: components/features/session/index.ts
- MOD: pages/sessions.tsx (668 → 156 lines)
- MOD: components/ui/index.ts
| Task | Description | Status |
|------|-------------|--------|
| 1.1 | Centralize types and extract seed data | ✅ Complete |
| 1.2 | Extract FileBrowser and shared UI primitives | ✅ Complete |
| 2.1 | Extract global styles and tokens | ✅ Complete |
| 2.2 | Extract CSS modules (terminal + git) | ✅ Complete |
| 2.3 | Extract CSS modules (session/settings) + delete styles.css | ✅ Complete |
| 3.1 | Extract shared auth dependencies | ✅ Complete |
| 3.2 | Create Pydantic schemas directory | ✅ Complete |
| 3.3 | Split services/docker.py | ✅ Complete |
| 3.4 | Slim tool_instances router | ✅ Complete |
| 3.5 | Slim git_repositories and config_profiles routers | ✅ Complete |
| 4.1 | Split tool-workshop page into tabs | ✅ Complete |
| 4.2 | Extract sessions page components | ✅ Complete |
| 4.3 | Extract dashboard and workspace components | ✅ Complete |
## Notes
- Sessions page slimmed from 668 to 156 lines
- All quality gates pass: typecheck, lint, build
- No behavior changes
## Remaining Tasks
| Task | Description |
|------|-------------|
| 4.4 | Rename all files to naming convention |
| 5.1 | Add tests for extracted components |
| 5.2 | Documentation and cleanup |
## Key Metrics
- `styles.css`: 2,844 lines → DELETED
- `tool_instances.py`: 1,412 → 284 lines (-80%)
- `git_repositories.py`: 1,050 → 276 lines (-74%)
- `config_profiles.py`: 765 → 299 lines (-61%)
- `dashboard.tsx`: 480 → 110 lines (-77%)
- `tool-types.tsx`: 409 → 135 lines (-67%)
- `tool-configs.tsx`: 391 → 178 lines (-54%)
- `tool-workshop.tsx`: 700 → 77 lines (-89%)
- `sessions.tsx`: 668 → 156 lines (-77%)