Skip to content

Delete the last legacy UI: old loading screens, antd wizard, debug scripts - #120

Merged
ib823 merged 2 commits into
mainfrom
claude/codebase-audit-optimization-p6i6co
Aug 8, 2026
Merged

Delete the last legacy UI: old loading screens, antd wizard, debug scripts#120
ib823 merged 2 commits into
mainfrom
claude/codebase-audit-optimization-p6i6co

Conversation

@ib823

@ib823 ib823 commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Why

Navigating from /dashboard into /admin/users or /admin/security still flashed the retired HexCube loading animation, and browser tabs / installed PWAs still showed old-brand icons. A pixel-level audit found four legacy surfaces still live after the ds migration, plus repo clutter unsuitable for a public codebase.

What was found and fixed

1. Old loading screens (the reported bug)

  • src/app/loading.tsx — the root route-loading boundary shown on every navigation — still rendered the legacy HexCubeLoader on a hard-coded white overlay. It now renders the ds BeaconLoader on --ds-surface-app.
  • The root layout injected a Lottie hex-cube splash (public/animations/hex-loader.json + lottie-light.min.js) on every hard page load. Deleted entirely — BeaconLoader's built-in 400ms appear delay already keeps fast loads loader-free, per the brand motion spec.

2. Legacy account cluster on admin pages

  • /admin and /admin/security used the old LogoutButton with a hand-rolled email span; /admin/users, /admin/approvals, /admin/email-approvals and /admin/recovery-requests had no account cluster at all. All six now mount the ds UserMenu (admin pill, email link, confirmed logout) like every other screen.

3. The old antd architecture wizard was still a live URL

  • /architecture served the 2,700-line antd DiagramWizard, unreachable from the nav but fully deployed. It now redirects to /architecture/v3. The wizard tree, AntDThemeBridge, ant-table.css, the antd console suppressions in providers, and the antd, @ant-design/icons and lottie-web dependencies are all removed. StyleSelector moves from the orphan src/ui/components/Modal to the shared BaseModal.

4. Dead legacy component library

  • src/components/common/ (13 components: spinners, tooltips, modals, inputs) had no remaining consumers after the fixes above. Deleted, along with the unused src/ui/components/ Button/Modal.

5. Old-brand favicons and app icons

  • /favicon.ico did not exist, public/icon.svg was the old blue wave square, and every PWA icon was the retired green hex cube. All static icons are regenerated from the Brand spec's beacon construction: favicon.ico (16/32/48, transparent, per the spec's size ramp), icon.svg (full mark, transparent), slate-plate app icons at every referenced size, a safe-zone maskable icon, apple-touch-icon.png, and the monochrome notification badge. Root layout metadata now declares the static icons so the beacon shows before hydration; DynamicFavicon still swaps in the status-plated version on the client. Old "Bound" wave logos, hex-cube PNGs, hex loader demos, the unbranded site.webmanifest, dead shortcut icons and stale PWA screenshots are deleted, and manifest.json no longer references files that never existed.

6. Repo hygiene for public use

  • 64 one-off debug/ops scripts deleted from scripts/ (prod-user pokes, passkey diagnostics, client-named analyses). The seven scripts referenced by package.json, docs, tests or the build remain.
  • Secret scan of tracked files: only .env.example placeholders and canonical test dummies; no real credentials, no personal emails, .gitignore covers all env files.

Verification

  • tsc --noEmit clean, next lint --max-warnings=0 clean
  • 1,776 unit tests pass (90 files), all 23 bundle budgets pass
  • Production build succeeds; /architecture shrinks to a 342 B redirect stub and the shared first-load JS is antd-free

Net across both commits: +97 / −16,605 lines in 153 files.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TArsz4CrMDAKmeALMozkR5

…ripts

The route-loading boundary and the injected Lottie splash were the last
old-brand surfaces users still saw — every navigation into /admin/* flashed
the retired HexCube animation. Both now use the ds beacon pattern, and the
splash script is gone entirely since BeaconLoader's built-in 400ms delay
already keeps fast loads loader-free.

- Root loading.tsx renders BeaconLoader on --ds-surface-app; the layout's
  client-injected Lottie hex splash and public/animations/* are deleted.
- Every admin page's top bar now mounts the ds UserMenu (admin pill, email,
  confirmed logout); the legacy LogoutButton and manual email spans are gone.
- /architecture no longer serves the antd DiagramWizard (2,700 lines); it
  redirects to /architecture/v3, and antd, @ant-design/icons, lottie-web,
  AntDThemeBridge, ant-table.css and the antd console suppressions are all
  removed.
- src/components/common (13 unused legacy components) and the orphan
  src/ui/components Modal/Button are deleted; StyleSelector now uses
  BaseModal like its siblings.
- 64 one-off debug/ops scripts (prod user pokes, client-named analyses)
  are removed from scripts/; only the seven referenced by package.json,
  docs and the build remain. Secret scan of tracked files came back clean.

Typecheck, lint:strict, 1776 unit tests and all 23 bundle budgets pass;
the production build succeeds with /architecture down to a redirect stub.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TArsz4CrMDAKmeALMozkR5
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cockpit Ready Ready Preview Aug 8, 2026 11:17pm

…sets

The dynamic favicon API was already on the beacon, but everything static
around it was not: /favicon.ico did not exist (so the tab fell back to
nothing or a stale cache), public/icon.svg was the old blue wave square,
and every PWA icon was the retired green hex cube. Browsers and installed
PWAs kept showing the old brand.

- favicon.ico is generated from the Brand spec's size ramp with a
  transparent background: 16px (ring + dot), 32px and 48px (full mark),
  slate strokes, gold dot. icon.svg is the full mark, also transparent.
- All PWA and app icons (public/icons/*, icon-192/256/384/512,
  cockpit-icon, apple-touch-icon, maskable) are regenerated as the spec's
  app-icon composition: slate plate, light strokes, gold dot, mark at 72%
  (60% inside the maskable safe zone). The notification badge is the
  monochrome white form Android expects.
- Root layout metadata now declares the static icons, so the correct mark
  shows before hydration; DynamicFavicon still swaps in the status-plated
  version on the client.
- manifest.json loses its stale screenshots and its shortcut icons now
  point at real files (the referenced shortcut PNGs never existed).
- Deleted: the old-brand logo-dark/logo-light/logo-cockpit.png ("Bound"
  wave logos and hex cube), the hex loader demos loading.html and
  logoani.html, the unbranded site.webmanifest template, old shortcut
  SVGs and stale PWA screenshots.

Typecheck, lint:strict and the production build pass; component and
performance suites green (555 tests).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TArsz4CrMDAKmeALMozkR5
@ib823
ib823 marked this pull request as ready for review August 8, 2026 23:24
@ib823
ib823 merged commit 9ea2734 into main Aug 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants