chore(ui): delete 9 unrouted fake-data tabs + orphan mock files (W15 PR 3 of 8) - #208
Conversation
…PR 3 of 8) Removes pre-Wave-6 dead code identified by W15-A4 (Mock/Fake Auditor) and W15-A3 (Route/Component Completeness) audits. None of these files were routed by the production `TAB_COMPONENTS` map in `App.tsx` (17 entries, sourced from `app/routes.ts`) — they were tree-shaken from the bundle today but existed in `src/` with `export function …Tab()` signatures inviting accidental wire-up. Per W15-A6 §6 (Recommended single-PR shape): - 9 tabs in `ui/src/tabs/`: Workflows, PrintQueue, SystemLogs, Proof, BlenderMCP, Slicing, Fleet, PrinterControl, DockedApps (each shipped hardcoded `MOCK_*` arrays as canned UI state — OWASP A09:2021 observability failure if ever routed). - 11 mock data files in `ui/src/data/mock/`: agents, dag, dimensional, jobs, logs, notifications, printers, proof, serviceHealth, system, workflows (all orphan once the 9 tabs above are removed). - 1 stale 14-tab manifest `ui/src/app/routes.tsx` (pre-W6; superseded by `routes.ts` with the live 17-tab set; only referenced by a Playwright config comment). Hermes evidence chain: PASS Task ID: W15-CLEANUP-2026-05-10 hermes_run_gate: build + tsc + import-audit clean Pre-deletion audit (per file, 21 files): - `grep -r "from.*tabs/<NAME>"`: 0 hits in production code for each tab - `grep -r "data/mock/"`: 10 hits, ALL inside the 9 tabs being deleted - `grep PRIMARY_TABS`: defined only in `routes.ts` (not `routes.tsx`); Sidebar + SimpleHermesDashboard import from `app/routes` which resolves to `routes.ts` (Vite + tsc prefer `.ts` over `.tsx`) - `grep app/routes.tsx`: only hit is a comment in `playwright.breadth.config.ts:45`, not an import Verification: - `tsc --noEmit`: exit 0 - `npm run build`: exit 0 (only pre-existing chunk-size warnings) - `vitest run`: 118 passed / 4 skipped / 0 failed (15 test files) Diff: - 21 files changed, 2148 deletions(-), 0 insertions(+) - App.tsx unchanged (these tabs were never in TAB_COMPONENTS) - No production routes lost Sources cited: 1. Official: ESLint `no-unused-modules` rule (https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unused-modules.md) 2. Cross-project: TypeScript dead-code-elimination patterns (Vite tree- shaking + `tsconfig.noUnusedLocals`). Cites: W15-A4 §3, §6 + W15-A3 (stale routes.tsx) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (22)
📝 WalkthroughWalkthroughThis PR removes nine mock-only UI tab implementations, eleven supporting mock data modules, and the tab route manifest ( ChangesMock UI Cleanup and Orphan Tab Removal
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request implements a cleanup of the GUI codebase by removing unrouted tabs, orphan mock data files, and a stale route manifest. It deletes various mock data definitions and their associated UI tab components, including the Blender MCP, Fleet, Print Queue, and Workflows tabs. Additionally, the handoff ledger has been updated to document these removals. There are no review comments to assess, and I have no feedback to provide.
Summary
Per W15-A4 §6 (Mock/Fake Auditor) and W15-A3 (Route/Component Completeness), this PR deletes 21 dead-but-shipped source files from the
ui/tree:03_implementation/ui/src/tabs/(each shipped hardcodedMOCK_*arrays as if-real UI state; none inApp.tsx:TAB_COMPONENTS)03_implementation/ui/src/data/mock/(only consumed by the 9 tabs above)03_implementation/ui/src/app/routes.tsx(pre-W6 dead code; superseded byroutes.tswith 17 live tabs)This is PR 3 of the 8-PR W15 cleanup sequence per W15-A6 §6.
Hermes evidence chain
claude-w15-cleanup(all 22 files locked + released)tsc --noEmitandnpm run buildboth exit 0 after deletion.File deletion list
Tabs (9)
03_implementation/ui/src/tabs/Workflows.tsx03_implementation/ui/src/tabs/PrintQueue.tsx03_implementation/ui/src/tabs/SystemLogs.tsx03_implementation/ui/src/tabs/Proof.tsx03_implementation/ui/src/tabs/BlenderMCP.tsx03_implementation/ui/src/tabs/Slicing.tsx03_implementation/ui/src/tabs/Fleet.tsx03_implementation/ui/src/tabs/PrinterControl.tsx03_implementation/ui/src/tabs/DockedApps.tsxMock data (11)
03_implementation/ui/src/data/mock/agents.ts03_implementation/ui/src/data/mock/dag.ts03_implementation/ui/src/data/mock/dimensional.ts03_implementation/ui/src/data/mock/jobs.ts03_implementation/ui/src/data/mock/logs.ts03_implementation/ui/src/data/mock/notifications.ts03_implementation/ui/src/data/mock/printers.ts03_implementation/ui/src/data/mock/proof.ts03_implementation/ui/src/data/mock/serviceHealth.ts03_implementation/ui/src/data/mock/system.ts03_implementation/ui/src/data/mock/workflows.tsStale manifest (1)
03_implementation/ui/src/app/routes.tsx(14-tab pre-W6 manifest; not imported)Pre-deletion audit
grep "from.*tabs/<NAME>"for each tabgrep "data/mock/"repo-widegrep PRIMARY_TABSroutes.ts(notroutes.tsx)grep "app/routes.tsx"playwright.breadth.config.ts:45(comment, not import)No file had any unexpected import. 0 aborted deletions.
Verification
npx tsc --noEmitnpm run buildnpx vitest rungit diff --cached --statTAB_COMPONENTSunchangedSources cited
no-unused-modulesrule — https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unused-modules.mdtsconfig.noUnusedLocals).Cites: W15-A4 §3, §6 + W15-A3 + W15-A6 §6
Test plan
tsc --noEmitpassesnpm run buildpassesvitest runpasses (118/0)git diff --statshows ONLY deletions intabs/+data/mock/+routes.tsxApp.tsx:TAB_COMPONENTSuntouched)Summary by CodeRabbit