a8dfbd5dc6
Delete the old top-level page files whose content was migrated into service-page tabs in slices 5-9: - pages/Media.tsx, Applications.tsx (-> MediaTab) - pages/FileBrowser.tsx, FileBrowser.impl.tsx (-> FilesTab) - pages/Actions.tsx (-> ActionsTab) - pages/Users.tsx, UsersPage.impl.tsx (replaced by Authentik tabs) - components/BackupsPage.tsx (-> JobsTab) - components/ObservabilityPage.tsx (split into Alerts/Links/Metrics tabs) - hooks/useUsers.ts (orphaned after Users page deletion) - the corresponding page test files (Media, FileBrowser, Applications, Actions, UsersPage) that tested the deleted pages directly. The service-tab components are the live implementations; ServicePage renders them. No live code references the deleted files. Docs: append an Information Architecture section to REQUIREMENTS.md documenting the services-as-hub model (nav shape, service-page tabs, service type registry, Users->Authentik, Observability split, legacy route 404s, empty state). Add a CHANGELOG entry under [Unreleased]. 92 frontend tests pass (was 112; -20 deleted page tests); 271 backend tests pass; lint/build green. Refs openspec/changes/services-as-hub-ia/ (tasks slice 11).
47 lines
2.7 KiB
Markdown
47 lines
2.7 KiB
Markdown
# Follow-up 2 — Touch-target pass on default-size buttons
|
||
|
||
## Task
|
||
|
||
Apply `.mobile-touch-target` to default-size `<Button>` elements (32px tall, below the 44px WCAG 2.5.5 minimum) across `frontend/src/pages/` and `frontend/src/components/`.
|
||
|
||
## Files changed (9 files, +34/-32)
|
||
|
||
| File | Buttons touched |
|
||
|------|----------------|
|
||
| `frontend/src/pages/Dashboard.tsx` | 2 (Edit dashboard, Add shortcut) |
|
||
| `frontend/src/pages/ServicePage.tsx` | 4 (Delete service mobile, Save desktop, Delete desktop, Update connection) |
|
||
| `frontend/src/pages/Settings.tsx` | 10 (Validate SSH, Save SSH key, Generate key, Clear, Delete key, Reset DB, Edit machine, Delete machine ×2, Delete in sheet) |
|
||
| `frontend/src/pages/Media.tsx` | 3 (Build index, Stop build, Force stop build) |
|
||
| `frontend/src/pages/ServicesPage.tsx` | 2 (Add service type, Add service) |
|
||
| `frontend/src/pages/Actions.tsx` | 4 (Delete, Save action, Edit, Run) |
|
||
| `frontend/src/pages/FileBrowser.impl.tsx` | 3 (Open path, Refresh, Run job) |
|
||
| `frontend/src/components/DialogFooter.tsx` | 2 (Cancel, Confirm — shared by all ConfirmDialogs) |
|
||
| `frontend/src/components/WidgetConfigDialog.tsx` | 2 (Back/reset, Save widget) |
|
||
|
||
**Total: 32 default-size buttons upgraded to 44px minimum below md.**
|
||
|
||
## Deliberately skipped
|
||
|
||
- **Shared `ui/` primitives** (button.tsx, dialog.tsx close button, sheet.tsx close button, sheet-form.tsx footer): rule 3 — these are either the component definition itself or already handled/overridden by their consuming pages.
|
||
- **Desktop Sidebar buttons**: rule 4 — `Sidebar` renders `null` on mobile.
|
||
- **Buttons already carrying `mobile-touch-target`** from earlier slices.
|
||
|
||
## Validation
|
||
|
||
```
|
||
cd frontend && npm run lint → 0 errors (2 pre-existing warnings in UsersPage.impl.tsx, unrelated)
|
||
cd frontend && npm run build → ✓ built (tsc -b + vite)
|
||
cd frontend && npm run test → 28 files / 122 tests passed
|
||
```
|
||
|
||
No new tests — the `.mobile-touch-target` class applies via `@media(max-width: 767px)` which jsdom does not honor, making it untestable in Vitest without mocking computed styles. The change is a no-op at md+.
|
||
|
||
## Notes for parent
|
||
|
||
- A regex-based Python script was initially attempted but **broke multi-line Button declarations** by matching `>` inside `=>` arrow functions. The script was reverted and all edits were redone with targeted edits + a corrected script that tracks brace depth. The Settings.tsx Validate-SSH button needed a manual fix after the corrected script still misplaced the className inside a `disabled={...}` block.
|
||
- Unrelated formatter-only changes in test files (mobile-card.test.tsx, ServicePage.test.tsx) were discarded to keep the diff focused.
|
||
|
||
## skill_resolution
|
||
|
||
`none` — no project/user SKILL.md paths were injected; no `.atl/skill-registry.md` found.
|