c00ec25e48
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
7.1 KiB
7.1 KiB
phase, plan, subsystem, tags, requires, provides, affects, tech-stack, key-files, key-decisions, patterns-established, requirements-completed, duration, completed
| phase | plan | subsystem | tags | requires | provides | affects | tech-stack | key-files | key-decisions | patterns-established | requirements-completed | duration | completed | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 18-cleanup-consolidamento | 01 | ui |
|
|
|
|
|
|
|
|
12min | 2026-06-19 |
Phase 18 Plan 01: Cleanup — Remove Forecast and Manual Quote Builder Routes Summary
Deleted /admin/forecast and /admin/quotes/new routes with all entry points (sidebar, revalidatePath, navigation button, exclusive components) to clear the codebase for the Sales Loop AI phase.
Performance
- Duration: ~12 min
- Started: 2026-06-19T10:04:00Z
- Completed: 2026-06-19T10:16:00Z
- Tasks: 2
- Files modified/deleted: 11
Accomplishments
- Removed Forecast route: deleted
src/app/admin/forecast/page.tsx, removed sidebar nav entry andTrendingUpimport, stripped 3revalidatePath("/admin/forecast")calls from project-actions.ts - Removed Quote Builder route: deleted
quotes/new/page.tsx,quotes/new/actions.ts, and all 4 exclusive components (QuoteBuilderForm, OfferSelector, PriceOverrideInput, QuotePreview) - Simplified SendQuoteModal from two-tab layout to single flat form — "Crea Nuovo" tab and
window.locationnavigation removed entirely; "existing quote" flow unchanged - Build passes clean: 0 TypeScript errors, 0 broken imports
Task Commits
- Task 1: Rimuovi rotta Forecast -
7d88409(chore) - Task 2: Rimuovi rotta Quote Builder -
268f56c(chore)
Plan metadata: (see final commit below)
Files Created/Modified
src/components/admin/AdminSidebar.tsx- Removed Forecast NAV_ITEMS entry and TrendingUp importsrc/app/admin/projects/project-actions.ts- Removed 3 revalidatePath("/admin/forecast") callssrc/components/admin/leads/SendQuoteModal.tsx- Removed "Crea Nuovo" tab and quotes/new navigationsrc/lib/admin-queries.ts- Removed stale JSDoc comment referencing /admin/quotes/new
Deleted:
src/app/admin/forecast/page.tsxsrc/app/admin/quotes/new/page.tsxsrc/app/admin/quotes/new/actions.tssrc/components/admin/quotes/QuoteBuilderForm.tsxsrc/components/admin/quotes/OfferSelector.tsxsrc/components/admin/quotes/PriceOverrideInput.tsxsrc/components/admin/quotes/QuotePreview.tsx
Decisions Made
- Kept
lib/forecast-queries.tsandlib/quote-actions.tsintact — they have no broken imports and are tolerable deadweight; removing them was explicitly out of scope per the plan - Deleted
quotes/new/actions.ts(not listed in plan) because it was a server re-export shim withQuoteBuilderFormas its only consumer — Rule 3 auto-fix (would have blocked clean directory removal) - Stale JSDoc comment in
admin-queries.tsupdated — Rule 1 auto-fix (stale reference counts as dead code)
Deviations from Plan
Auto-fixed Issues
1. [Rule 1 - Bug] Removed stale JSDoc comment referencing deleted route
- Found during: Task 2 (final grep verification)
- Issue:
admin-queries.tsline 862 had a* Used by: /admin/quotes/new form (OfferSelector dropdown)comment — the route no longer exists - Fix: Removed the stale line from the JSDoc block
- Files modified: src/lib/admin-queries.ts
- Verification:
grep -r "quotes/new" src/→ 0 results - Committed in:
268f56c(Task 2 commit)
2. [Rule 3 - Blocking] Deleted quotes/new/actions.ts (unlisted file)
- Found during: Task 2 — directory was non-empty after deleting page.tsx
- Issue:
src/app/admin/quotes/new/actions.tswas a re-export shim (export { createQuote } from "@/lib/quote-actions") with QuoteBuilderForm as its only consumer. It would leave a broken directory if not removed. - Fix: Confirmed no other consumers via grep, then deleted the file
- Files modified: src/app/admin/quotes/new/actions.ts (deleted)
- Verification:
grep -r "createQuote" src/shows only lib/quote-actions.ts (the source) — no broken references - Committed in:
268f56c(Task 2 commit)
Total deviations: 2 auto-fixed (1 Rule 1 stale comment, 1 Rule 3 blocking unlisted file) Impact on plan: Both auto-fixes necessary for completeness and clean directory state. No scope creep.
Issues Encountered
- A linter hook reverted
SendQuoteModal.tsxafter the first Write. On re-read, the linter had actually applied the intended changes (removed Tabs imports, removed tab state, flattened to single form). Confirmed the file was correct before staging.
User Setup Required
None — no external service configuration required.
Next Phase Readiness
- CLEAN-01 and CLEAN-02 complete: codebase is clear of forecast and manual quote builder dead routes
- Ready for Phase 21 (AI Quote Agent) which will provide the replacement quote creation flow
lib/forecast-queries.tsandlib/quote-actions.tsremain as inert deadweight — can be cleaned in a future pass if desired
Phase: 18-cleanup-consolidamento Completed: 2026-06-19
Self-Check: PASSED
src/components/admin/AdminSidebar.tsx— FOUND (modified)src/app/admin/projects/project-actions.ts— FOUND (modified)src/components/admin/leads/SendQuoteModal.tsx— FOUND (modified)src/lib/admin-queries.ts— FOUND (modified)src/app/admin/forecast/page.tsx— MISSING (deleted as intended)src/app/admin/quotes/new/page.tsx— MISSING (deleted as intended)- Commit
7d88409— FOUND - Commit
268f56c— FOUND grep -r "admin/forecast" src/→ 0 resultsgrep -r "quotes/new" src/→ 0 results- Build: 0 errors