Skip to content

Commit 93306c7

Browse files
committed
merge main into feature/money-mirror-issue-010; resolve PR conflicts
- Integrate origin/main (Phase 3 PR #17) with production-hardening work: lazy Gemini via attachCoachingFactsOnly + /api/dashboard/advisories, SCHEMA_DRIFT in txn/merchant APIs, split dashboard hooks, schema upgrades, Playwright smoke, docs. - Docs/state: combine CHANGELOG, README, CODEBASE-CONTEXT, project-state, and experiments/linear-sync/issue-010.json (closeout + VIJ-42 release sync). Made-with: Cursor
2 parents d9f4239 + 0845d2b commit 93306c7

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

apps/money-mirror/CODEBASE-CONTEXT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ MoneyMirror is a mobile-first PWA AI financial coach for Gen Z Indians (₹20K
3535
| `src/lib/advisory-engine.ts` | Rule-based advisories (perception gap, subscriptions, food, no investment, debt ratio, high Other bucket, discretionary mix, avoidable estimate, CC minimum-due risk). |
3636
| `src/lib/coaching-facts.ts` | Layer A Zod schema + `buildLayerAFacts` from `DashboardData` (deterministic server math only). |
3737
| `src/lib/gemini-coaching-narrative.ts` | Gemini structured JSON narratives + `cited_fact_ids` validation. |
38-
| `src/lib/coaching-enrich.ts` | `attachCoachingLayer` — merges AI narratives + PostHog `coaching_narrative_*` events. |
38+
| `src/lib/coaching-enrich.ts` | `attachCoachingFactsOnly` for fast `GET /api/dashboard`; `attachCoachingLayer` for `GET /api/dashboard/advisories` — Gemini narratives + PostHog `coaching_narrative_*` events. |
3939
| `src/components/FactsDrawer.tsx` | Renders cited Layer A rows for an advisory (read-only). |
4040
| `src/lib/format-date.ts` | UTC-safe date labels for statement periods (no raw ISO in UI). |
4141
| `src/app/api/statements/route.ts` | Authenticated GET — list processed statements for picker + month filter. |
@@ -63,14 +63,14 @@ MoneyMirror is a mobile-first PWA AI financial coach for Gen Z Indians (₹20K
6363
| Method | Path | Auth | Purpose |
6464
| ------ | ------------------------------------------ | -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
6565
| POST | `/api/statement/parse` | Neon session cookie | Upload PDF plus `statement_type` and optional `nickname`, `account_purpose`, `card_network` |
66-
| GET | `/api/dashboard` | Neon session cookie | Rehydrate processed statement + advisories + `coaching_facts` + optional Gemini `narrative` fields; unified or legacy query params |
66+
| GET | `/api/dashboard` | Neon session cookie | Fast path: Layer A `coaching_facts`, rule-based advisories (no Gemini). Unified or legacy query params |
6767
| GET | `/api/statements` | Neon session cookie | List all processed statements for the user |
6868
| GET | `/api/transactions` | Neon session cookie | Paginated txns + filters; `statement_id` or `statement_ids` (comma); dates optional; `merchant_key` optional; ownership enforced. On undefined-column errors, may return **500** with `code: SCHEMA_DRIFT` and `detail` hinting `npm run db:upgrade` / boot DDL |
6969
| GET | `/api/insights/merchants` | Neon session cookie | Top merchants (debit rollups) for same scope as transactions. Same **SCHEMA_DRIFT** behavior as transactions when columns are missing |
7070
| POST | `/api/insights/merchant-click` | Neon session cookie | `merchant_rollup_clicked` PostHog (bucketed key) |
7171
| POST | `/api/transactions/view-opened` | Neon session cookie | `transactions_view_opened` telemetry |
7272
| POST | `/api/transactions/backfill-merchant-keys` | Neon session cookie | Backfill `merchant_key` for current user’s rows |
73-
| GET | `/api/dashboard/advisories` | Neon session cookie | Same scope as dashboard; returns `advisories` + `coaching_facts` |
73+
| GET | `/api/dashboard/advisories` | Neon session cookie | Gemini coaching narratives; returns `advisories` + `coaching_facts` |
7474
| POST | `/api/dashboard/coaching-facts-expanded` | Neon session cookie | PostHog `coaching_facts_expanded` when user opens Sources |
7575
| POST | `/api/onboarding/complete` | Neon session cookie | Save onboarding income, score, and perceived spend to profiles |
7676
| GET | `/api/cron/weekly-recap` | `authorization: Bearer <CRON_SECRET>` or local `x-cron-secret` | Scheduled master fan-out |

project-state.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
- last_commit: (see `git log -1`)
2323
- open_pr_link: open a new PR when pushing MoneyMirror hardening / perf follow-ups
2424
- environments: local, production (`https://money-mirror-rho.vercel.app`)
25-
- implementation_focus: **Phase 3 (issue-010)**pipeline **complete** (`/learning` + `/linear-close`). **Follow-up engineering** (perf, E2E, CWV, dev ergonomics) tracked in repo; **does not** reopen VIJ-37. Use [`experiments/results/production-launch-checklist-010.md`](experiments/results/production-launch-checklist-010.md) before production promotion and GitHub merge.
26-
- linear_ops_note: **VIJ-42** (Done) — production-readiness mirror issue; comment **2026-04-06** on **VIJ-37** links VIJ-42 + post-close summary (`docs/PERFORMANCE-REVIEW.md`, `production-launch-checklist-010.md`, `SCHEMA_DRIFT.md`).
25+
- implementation_focus: **Phase 3 (issue-010)****T1–T4** complete through **`/learning`** + **`/linear-close`**. Linear project **Completed**; VIJ-37 + VIJ-38–VIJ-41 **Done**; [issue-010 Closeout Snapshot](https://linear.app/vijaypmworkspace/document/issue-010-closeout-snapshot-5ef07c9db6ee). **Follow-up engineering** (perf, E2E, CWV, schema drift, dev ergonomics) tracked in repo; **does not** reopen VIJ-37. Use [`experiments/results/production-launch-checklist-010.md`](experiments/results/production-launch-checklist-010.md) before production promotion. **Next:** `/create-issue` for the next project. **T5–T6** deferred.
26+
- linear_ops_note: **VIJ-42** (Done) — production-readiness mirror issue; comment **2026-04-06** on **VIJ-37** links VIJ-42 + post-close summary (`docs/PERFORMANCE-REVIEW.md`, `production-launch-checklist-010.md`, `SCHEMA-DRIFT.md`).
2727

2828
## Quality Gates
2929

@@ -239,7 +239,7 @@ All items sit in Linear project **issue-009 — MoneyMirror**. Feature work for
239239
- linear_cycle: <!-- Linear cycle/sprint, if assigned -->
240240
- linear_sync_map_path: experiments/linear-sync/issue-010.json <!-- path to durable id map -->
241241
- linear_last_sync: 2026-04-06T20:35:30Z <!-- VIJ-42 production-readiness sync + comment c595274e-311d-4990-afda-3cf7afc9b243 on VIJ-37 -->
242-
- linear_sync_status: success — issue-010 project **Completed**; VIJ-37 **Done**; closeout [issue-010 Closeout Snapshot](https://linear.app/vijaypmworkspace/document/issue-010-closeout-snapshot-5ef07c9db6ee); **VIJ-42** [production readiness](https://linear.app/vijaypmworkspace/issue/VIJ-42/moneymirror-production-readiness-sync-post-vij-37-closeout) **Done** (ops mirror for post-close hardening); prior ops comment `9137c798-bdbc-488c-b243-089dee8911aa`.
242+
- linear_sync_status: success — issue-010 project **Completed**; VIJ-37 **Done**; closeout [issue-010 Closeout Snapshot](https://linear.app/vijaypmworkspace/document/issue-010-closeout-snapshot-5ef07c9db6ee); **VIJ-42** [production readiness](https://linear.app/vijaypmworkspace/issue/VIJ-42/moneymirror-production-readiness-sync-post-vij-37-closeout) **Done** (ops mirror for post-close hardening); closeout comment id `8d7639f5-820f-4ddc-8f8c-7acc4b93fa2b`; prior ops comment `9137c798-bdbc-488c-b243-089dee8911aa`.
243243
- linear_follow_up_issue_identifier: VIJ-38
244244
- linear_follow_up_issue_url: https://linear.app/vijaypmworkspace/issue/VIJ-38/issue-010t1-transaction-surface-api-p0-foundation
245245
- linear_prior_cycle_map: experiments/linear-sync/issue-009.json (VIJ-11 root; VIJ-25 → Duplicate of VIJ-37 as of 2026-04-05)

0 commit comments

Comments
 (0)