docs(18-01): complete plan — remove forecast and manual quote builder routes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 12:09:17 +02:00
parent 268f56ccd2
commit c00ec25e48
2 changed files with 175 additions and 18 deletions
+19 -18
View File
@@ -1,17 +1,17 @@
--- ---
gsd_state_version: 1.0 gsd_state_version: 1.0
milestone: v2.2 milestone: v2.2
milestone_name: Sales Loop milestone_name: Sales Loop
status: planning status: executing
stopped_at: "RESET 2026-06-19 → milestone v2.2 'Sales Loop'. v2.1 chiuso (Offer Studio Phase 11+12, CRM Phase 14 fatti; 13/15/16/17 congelate/abbandonate/ri-scopate). Prossima: Phase 18 (R1) Cleanup." stopped_at: "Phase 12 re-scoped (mockup utente → editor offerte) e pianificata: 5 piani / 4 wave, planner + plan-checker pass. Pronta per /gsd-execute-phase 12"
last_updated: "2026-06-19T11:30:00.000Z" last_updated: "2026-06-19T10:19:00.000Z"
last_activity: 2026-06-19 -- Reset strategico v2.2 (piano approvato + planning docs aggiornati). Pronto per /gsd-plan-phase 18 last_activity: 2026-06-19 -- Phase 18 Plan 01 complete (forecast + quote builder routes removed)
progress: progress:
total_phases: 5 total_phases: 12
completed_phases: 0 completed_phases: 3
total_plans: 0 total_plans: 15
completed_plans: 0 completed_plans: 12
percent: 0 percent: 80
--- ---
# Project State # Project State
@@ -26,14 +26,15 @@ See: .planning/PROJECT.md (updated 2026-06-13)
## Current Position ## Current Position
Phase: 18 (R1) Cleanup & Consolidamento — ready to plan Phase: 18 (R1) Cleanup & Consolidamento
Plan: Plan: 01 complete (02 next)
Status: Reset v2.2 enacted nei planning docs. Pronto per `/gsd-plan-phase 18`. Status: Executing
Last activity: 2026-06-19 -- Reset strategico v2.2: ROADMAP/REQUIREMENTS/STATE aggiornati; fasi 13/15/16/17 chiuse, nuove 1822 (R1R5) Last activity: 2026-06-19 -- Phase 18 Plan 01 complete (forecast + quote builder routes removed)
Progress (v2.2): [░░░░░░░░░░] 0% — 0/5 fasi Progress (v2.2): [██░░░░░░░░] 20% — Phase 18 in progress (01 done)
### Fasi completate (v2.1, storico) ### Fasi completate (v2.1, storico)
Phase 11 (catalogo), Phase 12 (offer editor), Phase 14 (CRM Attio) — consegnate e in prod. 55 servizi reali + tag offerta caricati. Phase 11 (catalogo), Phase 12 (offer editor), Phase 14 (CRM Attio) — consegnate e in prod. 55 servizi reali + tag offerta caricati.
## Performance Metrics ## Performance Metrics
@@ -105,6 +106,6 @@ Items acknowledged and carried forward from previous milestone close:
## Session Continuity ## Session Continuity
Last session: 2026-06-14T19:04:45.211Z Last session: 2026-06-19T10:16:00.000Z
Stopped at: Phase 12 re-scoped (mockup utente → editor offerte) e pianificata: 5 piani / 4 wave, planner + plan-checker pass. Pronta per /gsd-execute-phase 12 Stopped at: Phase 18 Plan 01 complete — CLEAN-01 + CLEAN-02 done. Next: 18-02-PLAN.md
Resume file: .planning/phases/12-offer-composition-drag-drop-csv-import/12-01-PLAN.md Resume file: .planning/phases/18-cleanup-consolidamento/18-02-PLAN.md
@@ -0,0 +1,156 @@
---
phase: 18-cleanup-consolidamento
plan: "01"
subsystem: ui
tags: [next.js, admin, cleanup, sidebar, server-actions]
requires: []
provides:
- Forecast route removed (/admin/forecast → 404)
- Admin sidebar without Forecast entry
- project-actions.ts without revalidatePath forecast calls
- Quote builder route removed (/admin/quotes/new → 404)
- SendQuoteModal without navigation to quotes/new
- QuoteBuilderForm, OfferSelector, PriceOverrideInput, QuotePreview components deleted
affects: [phase-21-ai-quote-agent, any future admin nav changes]
tech-stack:
added: []
patterns:
- "Dead-code deletion: remove page files + directories + all entry points atomically before Sales Loop phase"
key-files:
created: []
modified:
- src/components/admin/AdminSidebar.tsx
- src/app/admin/projects/project-actions.ts
- src/components/admin/leads/SendQuoteModal.tsx
- src/lib/admin-queries.ts
deleted:
- src/app/admin/forecast/page.tsx
- src/app/admin/quotes/new/page.tsx
- src/app/admin/quotes/new/actions.ts
- src/components/admin/quotes/QuoteBuilderForm.tsx
- src/components/admin/quotes/OfferSelector.tsx
- src/components/admin/quotes/PriceOverrideInput.tsx
- src/components/admin/quotes/QuotePreview.tsx
key-decisions:
- "Kept lib/forecast-queries.ts and lib/quote-actions.ts as tolerable deadweight — no broken imports, no consumer"
- "SendQuoteModal Tabs UI replaced with flat single-form layout (only 'existing' flow remains)"
- "quotes/new/actions.ts (re-export shim) deleted along with page since its only consumer was QuoteBuilderForm"
- "Stale JSDoc comment in admin-queries.ts referencing /admin/quotes/new cleaned up (Rule 1 auto-fix)"
patterns-established:
- "Cleanup tasks: always grep for all entry points (revalidatePath, navigation, JSDoc) before marking done"
requirements-completed: [CLEAN-01, CLEAN-02]
duration: 12min
completed: 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 and `TrendingUp` import, stripped 3 `revalidatePath("/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.location` navigation removed entirely; "existing quote" flow unchanged
- Build passes clean: 0 TypeScript errors, 0 broken imports
## Task Commits
1. **Task 1: Rimuovi rotta Forecast** - `7d88409` (chore)
2. **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 import
- `src/app/admin/projects/project-actions.ts` - Removed 3 revalidatePath("/admin/forecast") calls
- `src/components/admin/leads/SendQuoteModal.tsx` - Removed "Crea Nuovo" tab and quotes/new navigation
- `src/lib/admin-queries.ts` - Removed stale JSDoc comment referencing /admin/quotes/new
**Deleted:**
- `src/app/admin/forecast/page.tsx`
- `src/app/admin/quotes/new/page.tsx`
- `src/app/admin/quotes/new/actions.ts`
- `src/components/admin/quotes/QuoteBuilderForm.tsx`
- `src/components/admin/quotes/OfferSelector.tsx`
- `src/components/admin/quotes/PriceOverrideInput.tsx`
- `src/components/admin/quotes/QuotePreview.tsx`
## Decisions Made
- Kept `lib/forecast-queries.ts` and `lib/quote-actions.ts` intact — 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 with `QuoteBuilderForm` as its only consumer — Rule 3 auto-fix (would have blocked clean directory removal)
- Stale JSDoc comment in `admin-queries.ts` updated — 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.ts` line 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.ts` was 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.tsx` after 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.ts` and `lib/quote-actions.ts` remain 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 results
- `grep -r "quotes/new" src/` → 0 results
- Build: 0 errors