Delete unreachable frontend scaffolding #47

Closed
opened 2026-08-15 13:34:40 +02:00 by myrmidex · 1 comment
Owner

Pure dead-code removal. No behaviour change — nothing here is reachable from a routed page.

Context

Verified by tracing imports from the two pages: the layout/chrome cluster imports itself but no page imports any of it. dashboard.tsx renders a bare <div className="min-h-screen bg-black">.

Scope

Layout / chrome cluster (unreachable):

  • components/Display/: AppShell, AppSidebar, AppSidebarHeader, AppHeader, AppContent, NavMain, NavUser, NavFooter, Breadcrumbs, AppLogo, AppLogoIcon
  • layouts/app-layout.tsx, layouts/app/ (2), layouts/auth-layout.tsx, layouts/auth/ (3)

Settings components (no settings page exists):

  • components/Settings/: DeleteUser, UserInfo, UserMenuContent

Unused shadcn primitives (0 importers outside ui/):

  • alert, badge, checkbox, collapsible, icon, PlaceholderPattern, select, separator, skeleton, toggle, ToggleGroup
  • sidebar.tsx — 7 importers, all inside the dead cluster above

Unrouted page:

  • pages/welcome.tsx — Laravel starter landing page, not referenced in routes/web.php

Out of scope

ssr.tsx, app.tsx, Ziggy and the Inertia/React deps stay for now — they come out with the Livewire migration.

Acceptance criteria

  • npm run build succeeds
  • Dashboard renders and behaves identically (LED → progress → stats → form chain intact)
  • No remaining imports resolve to a deleted file
  • Lint clean
Pure dead-code removal. No behaviour change — nothing here is reachable from a routed page. ## Context Verified by tracing imports from the two pages: the layout/chrome cluster imports itself but **no page imports any of it**. `dashboard.tsx` renders a bare `<div className="min-h-screen bg-black">`. ## Scope **Layout / chrome cluster (unreachable):** - `components/Display/`: `AppShell`, `AppSidebar`, `AppSidebarHeader`, `AppHeader`, `AppContent`, `NavMain`, `NavUser`, `NavFooter`, `Breadcrumbs`, `AppLogo`, `AppLogoIcon` - `layouts/app-layout.tsx`, `layouts/app/` (2), `layouts/auth-layout.tsx`, `layouts/auth/` (3) **Settings components (no settings page exists):** - `components/Settings/`: `DeleteUser`, `UserInfo`, `UserMenuContent` **Unused shadcn primitives (0 importers outside `ui/`):** - `alert`, `badge`, `checkbox`, `collapsible`, `icon`, `PlaceholderPattern`, `select`, `separator`, `skeleton`, `toggle`, `ToggleGroup` - `sidebar.tsx` — 7 importers, all inside the dead cluster above **Unrouted page:** - `pages/welcome.tsx` — Laravel starter landing page, not referenced in `routes/web.php` ## Out of scope `ssr.tsx`, `app.tsx`, Ziggy and the Inertia/React deps stay for now — they come out with the Livewire migration. ## Acceptance criteria - [ ] `npm run build` succeeds - [ ] Dashboard renders and behaves identically (LED → progress → stats → form chain intact) - [ ] No remaining imports resolve to a deleted file - [ ] Lint clean
myrmidex added this to the (deleted) milestone 2026-08-15 13:34:40 +02:00
myrmidex added the
enhancement
label 2026-08-15 13:34:40 +02:00
myrmidex self-assigned this 2026-08-15 13:34:40 +02:00
myrmidex modified the milestone from (deleted) to v0.4.0 2026-08-15 13:42:19 +02:00
Author
Owner

Done

Two commits on release/0.4.0:

  • d379f00 — 51 files deleted, resources/js 74 → 23, −4169 lines
  • 1a7b913.dockerignore fix

Deletion method

Rather than working from the hand-traced list in the ticket, computed transitive import reachability from the three real entry points (app.tsx, ssr.tsx, dashboard.tsx). That found 54 of 74 files unreachable — more than originally listed. The extras were all only referenced by the dead layout cluster: avatar, breadcrumb, card, dialog, sheet, tooltip, DropdownMenu, NavigationMenu, heading, icon, TextLink, HeadingSmall, and 3 hooks.

Deviations

Kept 3 files the analysis called deadtypes/global.d.ts, types/index.d.ts, types/vite-env.d.ts are ambient declarations pulled in by tsconfig.json include, not by imports. Deleting them breaks the build.

Took 2 files from #48AssetSetupForm.tsx and UpdatePriceForm.tsx, orphaned by bace06d and carrying the only remaining ESLint errors. Noted on #48.

Folded in dev-container fixes (approved during the work):

  • docker/dev/docker-compose.yml: added name: incr, prefixed volumes to incr_db_data / incr_app_node_modules. Both this project and ffr had compose files under docker/dev/, so podman-compose derived the same pod name pod_dev for both — incr's dev-down was tearing down ffr's running containers, and the shared unprefixed db_data volume is the leading suspect for an InnoDB corruption that crash-looped MySQL.
  • .dockerignore: excluded docker/dev while the dev Dockerfile does COPY docker/dev/container-start.sh, so the dev image could not rebuild. Un-ignored that one path with !. Pre-existing since fe3711e, latent until a rebuild was forced.

Gates

Gate Result
npm run build PASS — 2264 modules
npx eslint . PASS — exit 0
Dangling-import scan PASS — none
Pint PASS — 49 files
PHPUnit PASS — 4 tests, 10 assertions

Found along the way

code-reviewer surfaced that GET /register is brokenRegisteredUserController:28 renders auth/register, but that page component has not existed since 04fbda4. Pre-existing, not caused by this ticket, and invisible to build/lint because Inertia resolves pages at runtime. Recorded on #53, which deletes the controller and route outright.

.claude/PLATFORM.md updated: volume names, plus new gotchas for the pod collision, the incr/ffr port conflict (8000/5173/3307 — only one stack can run at a time), and the .dockerignore negation.

## Done Two commits on `release/0.4.0`: - `d379f00` — 51 files deleted, `resources/js` 74 → 23, −4169 lines - `1a7b913` — `.dockerignore` fix ### Deletion method Rather than working from the hand-traced list in the ticket, computed transitive import reachability from the three real entry points (`app.tsx`, `ssr.tsx`, `dashboard.tsx`). That found **54 of 74** files unreachable — more than originally listed. The extras were all only referenced by the dead layout cluster: `avatar`, `breadcrumb`, `card`, `dialog`, `sheet`, `tooltip`, `DropdownMenu`, `NavigationMenu`, `heading`, `icon`, `TextLink`, `HeadingSmall`, and 3 hooks. ### Deviations **Kept 3 files the analysis called dead** — `types/global.d.ts`, `types/index.d.ts`, `types/vite-env.d.ts` are ambient declarations pulled in by `tsconfig.json` `include`, not by imports. Deleting them breaks the build. **Took 2 files from #48** — `AssetSetupForm.tsx` and `UpdatePriceForm.tsx`, orphaned by `bace06d` and carrying the only remaining ESLint errors. Noted on #48. **Folded in dev-container fixes** (approved during the work): - `docker/dev/docker-compose.yml`: added `name: incr`, prefixed volumes to `incr_db_data` / `incr_app_node_modules`. Both this project and ffr had compose files under `docker/dev/`, so podman-compose derived the same pod name `pod_dev` for both — incr's `dev-down` was tearing down ffr's running containers, and the shared unprefixed `db_data` volume is the leading suspect for an InnoDB corruption that crash-looped MySQL. - `.dockerignore`: excluded `docker/dev` while the dev Dockerfile does `COPY docker/dev/container-start.sh`, so the dev image could not rebuild. Un-ignored that one path with `!`. Pre-existing since `fe3711e`, latent until a rebuild was forced. ### Gates | Gate | Result | |---|---| | `npm run build` | PASS — 2264 modules | | `npx eslint .` | PASS — exit 0 | | Dangling-import scan | PASS — none | | Pint | PASS — 49 files | | PHPUnit | PASS — 4 tests, 10 assertions | ### Found along the way `code-reviewer` surfaced that **`GET /register` is broken** — `RegisteredUserController:28` renders `auth/register`, but that page component has not existed since `04fbda4`. Pre-existing, not caused by this ticket, and invisible to build/lint because Inertia resolves pages at runtime. Recorded on #53, which deletes the controller and route outright. `.claude/PLATFORM.md` updated: volume names, plus new gotchas for the pod collision, the incr/ffr port conflict (8000/5173/3307 — only one stack can run at a time), and the `.dockerignore` negation.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lvl0/incr#47
No description provided.