You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -102,6 +111,18 @@ Cross-cutting work so the new SPA does not repeat **legacy `apps/client`** patte
102
111
-[ ]**Contract tests** for the fetch wrapper (MSW or recorded OpenAPI fixtures)—optional until multiple features consume the API.
103
112
-[ ]**E2E smoke** (Playwright recommended): login or session refresh with **httpOnly cookies** against **local compose** or **Cloudflare preview**—add CI job when stable enough (can start `manual`/`workflow_dispatch` if cost is a concern).
|**`@deepnotes/db`**| Drizzle + migrations |`template-db.test.ts`: clone template DB, smoke SQL | More assertions on FKs / critical columns after schema grows |
119
+
|**`@deepnotes/session`**| Auth, account, crypto orchestration |`login-rate-limit.test.ts` (Redis port in memory); **`encrypt-user-email.test.ts`** (round-trip, case exceptions, tamper); **`email-hash.test.ts`** (stability, secret sensitivity, exceptions); **`send-email-change-code.test.ts`** (SEND_EMAILS=false no fetch, missing key **503**, Resend **502**/OK) |**Integration:**`performUserRegister`, login, password/email change against **template DB** + mocked Redis; JWT cookie helpers |
120
+
|**`@deepnotes/api`**| Zod + OpenAPI |`openapi.test.ts` (health + route registry); **`schemas/users.test.ts`** (email/password change bodies, 6-digit code) | Schemas for sessions + remaining routes; optional **snapshot** of OpenAPI fragment for drift |
121
+
|**`@deepnotes/api-worker`**| Hono on Worker |`index.test.ts`: health, OpenAPI JSON, **503** when secrets/DB not bound (incl. email-change paths) |**200-path tests** with test `SessionEnv` + Hyperdrive stub + template DB (heavier CI job) |
122
+
|**`@deepnotes/web`**| SPA |`app.test.ts` (mount `App.vue`) | Auth UI + API client as in §5.8 |
123
+
124
+
**Principle:** keep **fast unit tests** on pure crypto, Zod, and mail/HTTP branches; add **Postgres-backed** flows incrementally (same template pattern as `@deepnotes/db`) so Phase 3 routes do not regress silently.
125
+
105
126
### Progress vs legacy (reference only)
106
127
107
128
| Legacy (`apps/client`) | New (`new-deepnotes/apps/web`) |
@@ -119,7 +140,7 @@ Cross-cutting work so the new SPA does not repeat **legacy `apps/client`** patte
119
140
-[ ] Cold API dev start under **2 s** (no `inspect-brk` by default) — validate on a typical laptop.
120
141
-[ ] Collab + realtime: at least one integration test each (Redis + deps).
0 commit comments