# Notes

## Learner profile
- Frontend engineer; sibling tracks complete: SSE, Web Workers, IndexedDB, Cache API, OPFS, Service Workers, Session Storage, BroadcastChannel, Monorepos
- **Motivation:** general FE toolkit depth — design-review judgment for browser platform APIs
- **Prior knowledge:** structured clone as the *default message model* (Workers lesson 3: copy vs transfer vs share; functions/DOM → `DataCloneError`; ArrayBuffer transfer detaches; ~10–100 KiB cost framing). BroadcastChannel: same algorithm, **no transfer list**. IndexedDB: stored values are structured-clone shaped
- **Depth:** decisions + light hands-on
- **Why this topic:** GitHub issue [#13](https://github.com/ayv4zyan/teach/issues/13); owns the algorithm, type matrix, transfer, and `structuredClone()` — not another worker/BC tutorial

## Teaching preferences
- Decision frameworks, tradeoffs, deal-breakers
- ADHD-friendly: one win up front, short numbered sections, bullets over long prose, tight quizzes
- Cite high-trust sources; don’t invent clone/JSON behavior
- Build on Workers lesson 3 — deepen the algorithm, don’t re-teach postMessage from zero
- Prefer modern Chromium + Firefox + Safari; `structuredClone()` is baseline (Chrome 98+ / Firefox 94+ / Safari 15.4+)
- **Framework examples: React.** Learner does not use Vue. Lesson 4’s Vue Proxy quiz stays; later lessons/tracks use React. Workspace-wide: see `/AGENTS.md`.

## Accuracy watch-outs
- Surma’s 2021 web.dev article is the best *decision* primary, but two details are stale or sloppy: (1) `JSON.stringify` does **not** throw on `Date`/`Map`/`Set` — it silently loses them; (2) `Error` is now structured-cloneable (MDN / spec). Teach MDN + WHATWG over those two claims.

## Session log
- 2026-08-12: Mission established from [ayv4zyan/teach#13](https://github.com/ayv4zyan/teach/issues/13); resources seeded; lesson 1 (when structured clone fits)
- 2026-08-13: Lesson 1 passed except B (JSON document for HTTP) and D (custom serializer for class/versioned wire). Next: type matrix + retrieve those two.
- 2026-08-13: Lesson 2 passed (all correct; B/D retrieved). Next: transfer vs clone.
- 2026-08-14: Lesson 3 passed except C (orphan transfer list still detaches; clone never receives it). Next: deal-breakers + retrieve C.
- 2026-08-14: Learner preference — framework examples are React, not Vue (recorded in `/AGENTS.md`; lesson 4 Vue example kept).
- 2026-08-14: Lesson 4 passed (all correct; orphan-list retrieved). Next: decision playbook.
- 2026-08-14: Lesson 5 passed (all correct) → **core mission complete** (issue #13 decision fluency).
