Skip to content

chore: remove orphaned old_dashboard code and tests - #231

Draft
dccakes wants to merge 1 commit into
mainfrom
claude/sharp-feynman-j42zz1
Draft

dccakes wants to merge 1 commit into
mainfrom
claude/sharp-feynman-j42zz1

Conversation

@dccakes

@dccakes dccakes commented Aug 2, 2026

Copy link
Copy Markdown
Owner

📝 TLDR

Remove 15 orphaned source files and 3 stale test files in old_dashboard/ that are no longer imported anywhere in the active codebase.

📝 Description

During a daily product improvement review, an audit identified two directories — src/app/old_dashboard/ and src/components/old_dashboard/ — that are fully orphaned: no active page, component, or route imports from them. They represent an earlier iteration of the wedding website editor that was superseded by the current website/ manager and Etta AI panel.

Leaving dead code in place adds maintenance surface without benefit: it confuses contributors, inflates the codebase by ~1,700 lines, and the 3 unit tests for deleted components were running on every CI pass.

This Change

  • Deletes src/app/old_dashboard/layout.tsx and page.tsx (the orphaned route)
  • Deletes all 13 files under src/components/old_dashboard/ (~62 KB)
  • Deletes 3 unit tests under tests/unit/components/old_dashboard/ that tested the deleted components
  • Removes the stale jest.mock('@/components/old_dashboard/etta-panel', ...) from tests/unit/components/layout/authenticated-app-shell.test.tsx
  • Removes 'old_dashboard' from RESERVED_ROOT_SEGMENTS in src/proxy.ts (no longer a live route to protect)
  • Removes 'old_dashboard' from RESERVED_WEBSITE_ROOT_SEGMENTS in src/lib/website/reserved-root-segments.ts

Jira Ticket(s): N/A — daily product improvement task


Daily Product Improvement

Summary

Removed 18 orphaned files (old_dashboard app route, 13 components, 3 tests) and cleaned up two reserved-slug lists and one stale mock, reducing the codebase by ~1,700 lines with zero functional impact.

Recommendations Reviewed

  • Area: src/app/old_dashboard/, src/components/old_dashboard/
    Issue: 15 source files fully unreferenced by any active code path. Running 3 unit tests against deleted components on every CI pass.
    Recommendation: Delete both directories and their associated tests; clean up slug reservations.
    Type: Frontend cleanup | Priority: Medium | Effort: Small

  • Area: src/app/(authenicated)/settings/
    Issue: No loading.tsx skeleton for the settings page, which makes two API calls at load time. Users may see a blank layout momentarily.
    Recommendation: Add a settings-page skeleton matching the card/form layout.
    Type: UX/UI | Priority: Medium | Effort: Small

  • Area: src/components/forms/event-form.tsx, question-form.tsx, delete-confirmation.tsx
    Issue: 5 occurrences of text-pink-200 / bg-pink-100 hardcoded in active form processing/disabled states, inconsistent with the design token system being standardised across the codebase.
    Recommendation: Replace with appropriate semantic tokens (e.g. text-muted-foreground, bg-muted).
    Type: Frontend cleanup | Priority: Medium | Effort: Small

  • Area: src/components/vendor/vendor-status-select.tsx
    Issue: Three vendor status badge variants use hardcoded yellow-, blue-, orange- Tailwind colors instead of design tokens, inconsistent with the in-progress token migration.
    Recommendation: Map to semantic tokens or CSS custom properties once the token palette is extended.
    Type: Frontend cleanup | Priority: Low | Effort: Small

  • Area: package.json
    Issue: next-auth@^4.24.13 is listed alongside better-auth@^1.5.6. May be a migration artifact. If unused, it adds install weight and an unnecessary audit surface.
    Recommendation: Verify next-auth usage with a codebase grep and remove if truly unused.
    Type: Backend cleanup | Priority: Low | Effort: Small

Selected Improvement

Deleted the old_dashboard dead code (18 files total across source + tests).

Why This Was Selected

The orphaned directories were fully confirmed dead — zero imports outside themselves in the entire src/ and tests/ tree. The cleanup is zero-risk, immediately verifiable by running the full test suite, and removes ~1,700 lines that were silently taxing CI and confusing contributors. It is the cleanest possible targeted improvement: bounded, complete, and instantly reviewable.

Changes Made

  • Deleted src/app/old_dashboard/ (2 files)
  • Deleted src/components/old_dashboard/ (13 files)
  • Deleted tests/unit/components/old_dashboard/ (3 files)
  • Removed stale jest.mock for old_dashboard/etta-panel in authenticated-app-shell.test.tsx
  • Removed 'old_dashboard' entry from RESERVED_ROOT_SEGMENTS in src/proxy.ts
  • Removed 'old_dashboard' entry from RESERVED_WEBSITE_ROOT_SEGMENTS in src/lib/website/reserved-root-segments.ts

Files Changed

  • src/app/old_dashboard/layout.tsx — deleted
  • src/app/old_dashboard/page.tsx — deleted
  • src/components/old_dashboard/*.tsx and *.ts (13 files) — deleted
  • tests/unit/components/old_dashboard/ (3 test files) — deleted
  • tests/unit/components/layout/authenticated-app-shell.test.tsx — stale mock removed
  • src/proxy.ts — 'old_dashboard' removed from RESERVED_ROOT_SEGMENTS
  • src/lib/website/reserved-root-segments.ts — 'old_dashboard' removed from RESERVED_WEBSITE_ROOT_SEGMENTS

Verification

  • Confirmed zero imports of old_dashboard anywhere in src/ or tests/ before and after deletion
  • biome lint — 0 errors, 17 pre-existing warnings (unchanged)
  • Full unit test suite: 2003 tests passed, 0 failed (pre-commit hook ran automatically)

Future Recommendations

  • Settings page loading skeleton
    Priority: Medium | Effort: Small | Not included: different scope from dead-code removal, suits its own focused PR | Should become GitHub issue: No

  • Fix text-pink-200 / bg-pink-100 in active form components
    Priority: Medium | Effort: Small | Not included: color-token migration is a separate concern | Should become GitHub issue: No

  • Vendor status badge hardcoded colors
    Priority: Low | Effort: Small | Not included: low priority, part of broader token migration | Should become GitHub issue: No

  • Audit and remove next-auth dependency if unused
    Priority: Low | Effort: Small | Not included: needs investigation before removal | Should become GitHub issue: No

GitHub Issues Created or Proposed

No GitHub issues created. All unimplemented recommendations are small, low-risk, and well-suited for future daily improvement runs without needing separate issue tracking.


Generated by Claude Code

Delete the old_dashboard app route, all 13 component files, and their
3 unit tests — none were imported by any active code path. Also remove
the 'old_dashboard' slug from the reserved-segments lists in proxy.ts
and reserved-root-segments.ts, and drop the stale etta-panel mock from
the authenticated-app-shell test.

Co-Authored-By: AgenticDiego <noreply@carvallo.io>
@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
scv Error Error Aug 2, 2026 2:20pm

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Jest Test Coverage

Coverage Summary

Lines Statements Branches Functions
Coverage: 81%
81.6% (34867/42728) 82.78% (3698/4467) 67.85% (1026/1512)

This branch had an error being deployed

1 failed deployment
Preview — 039235ce Deployed Aug 2, 2026 by vercel[bot]
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.

1 participant