docs(plan3): correct phantom App.jsx route-bug (Windows grep artifact); routes verified correct
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
- **`OwnerSnapshot.jsx`** already reduces over `projects` for `totalBudget`/`totalSpent`/`avgHealth`/status counts, but computes **no** pipeline value, funnel, win-rate, revenue/profit, commission-by-rep, sub performance, or storm attribution; it reads `owner.portfolioSize`/`owner.riskScore` as static fields. It does **not** look at `kanbanLeads`.
|
||||
- **`Dashboard.jsx`** (admin/field) and **`LeaderboardPage.jsx`** exist; no shared analytics module.
|
||||
- **`src/data/selectors.js` does not exist.**
|
||||
- **`App.jsx` route bug:** the pre-sale lead-detail routes are written with backslashes and a missing slash — `path="\emp\fa\leads:leadId"` (line ~129), `path="\owner\leads:leadId"` (~211), `path="\admin\leads:leadId"` (~341). React Router never matches these, so clicking a pre-sale lead 404s. Correct form: `/emp/fa/leads/:leadId`, `/owner/leads/:leadId`, `/admin/leads/:leadId`.
|
||||
- **`App.jsx` lead routes — verified correct (no fix needed).** An earlier review flagged these as backslash paths (`path="\owner\leads:leadId"`), but that was a **Windows grep/terminal display artifact**; the committed file already has correct forward-slash routes (`/emp/fa/leads/:leadId`, `/owner/leads/:leadId`, `/admin/leads/:leadId`), confirmed in both the working tree and HEAD. T4 below is therefore a no-op verification, not a code change.
|
||||
|
||||
## Scope boundary with Phase 4 (read before authoring)
|
||||
|
||||
@@ -35,7 +35,7 @@ Appendix B's table is **illustrative**. Some scenario beats require models that
|
||||
| T1 Pre-sale lead realism | `src/data/mockStore.jsx` | A (sequential) |
|
||||
| T2 Scenario curation + lost lead | `src/data/mockStore.jsx` | A (sequential, after T1) |
|
||||
| T3 `selectors.js` (new) | `src/data/selectors.js` | B (after A committed) |
|
||||
| T4 Route-path fix | `src/App.jsx` | B (parallel, independent) |
|
||||
| T4 Lead-route verify (no-op) | `src/App.jsx` (read-only) | B (parallel, independent) |
|
||||
| T5 Wire owner dashboard | `src/pages/owner/OwnerSnapshot.jsx` | B (parallel, after T3) |
|
||||
| T6 Wire admin dashboard | `src/pages/Dashboard.jsx` | B (parallel, after T3) |
|
||||
| T7 Verify | (read-only) | C |
|
||||
@@ -188,19 +188,14 @@ export function stormAttribution(kanbanLeads = [], projects = []) {
|
||||
- [ ] **Step 3 (reconcile against real data):** confirm the module imports cleanly (no syntax error): `npm run build` → `✓ built` (note: until a dashboard imports it, the bundler tree-shakes it; that's fine — also do `node -e "import('./src/data/selectors.js').then(m=>console.log(Object.keys(m)))"` to prove it loads and exports all 7 names).
|
||||
- [ ] **Step 4:** commit `git commit -am "feat(analytics): add pure selectors for pipeline, revenue, commission, sub performance, storm"`.
|
||||
|
||||
## Task 4: Fix broken pre-sale lead route paths
|
||||
## Task 4: Verify pre-sale lead routes (no-op)
|
||||
|
||||
**Files:** `src/App.jsx` only. **Independent — may run any time in Phase B.**
|
||||
**Files:** `src/App.jsx` (read-only). **Independent.**
|
||||
|
||||
The three pre-sale lead-detail routes use backslashes and a missing slash, so React Router never matches them and clicking a pre-sale lead 404s.
|
||||
The previously-suspected backslash route bug was a Windows grep display artifact; the routes are already correct. This task just confirms it — **no code change, no commit.**
|
||||
|
||||
- [ ] **Step 1:** Replace the three malformed `path` strings:
|
||||
- `path="\emp\fa\leads:leadId"` → `path="/emp/fa/leads/:leadId"`
|
||||
- `path="\owner\leads:leadId"` → `path="/owner/leads/:leadId"`
|
||||
- `path="\admin\leads:leadId"` → `path="/admin/leads/:leadId"`
|
||||
(Edit only the `path` attribute strings; leave the `<ProtectedRoute>`/element unchanged.)
|
||||
- [ ] **Step 2 (verify):** `npm run build` → `✓ built`. `git grep -nE "path=\"\\\\" -- src/App.jsx` → no backslash route paths remain.
|
||||
- [ ] **Step 3:** commit `git commit -am "fix(routes): repair backslash lead-detail route paths so pre-sale leads open"`.
|
||||
- [ ] **Step 1 (verify):** `git grep -nE 'path="\\\\' -- src/App.jsx` → no matches. `git grep -nE 'path="[^"]*leads/:leadId"' -- src/App.jsx` → shows `/emp/fa/leads/:leadId`, `/owner/leads/:leadId`, `/admin/leads/:leadId`.
|
||||
- [ ] **Step 2 (dev-run, folded into T7):** clicking a pre-sale lead opens `LeadProjectPage`.
|
||||
|
||||
## Task 5: Wire the owner dashboard to selectors
|
||||
|
||||
|
||||
Reference in New Issue
Block a user