v0.0.2.0 feat(module-3): drag-to-explore góc nội tiếp (lớp 9) (#2)

* chore: ignore .gstack/ deploy reports

/land-and-deploy writes per-deploy artifacts to .gstack/deploy-reports/. Those
shouldn't enter the repo. Captured here so future runs don't surface stale diffs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(geom-engine): circle module + inscribed-angle invariance test

Add the second pure module per autoplan eng decision E1: src/geom-engine/circle.ts
with circle(), pointOnCircle(), projectToCircle() (snap-to-circle for Module 3 drag),
and angleAtVertex() (clamped against IEEE-754 drift to prevent acos NaN at exactly
collinear angles).

The killer-demo property test pins the inscribed-angle theorem as a CI gate: pick
two fixed points A and B on a unit circle, sample 7 different M positions on the
major arc, and assert all sampled inscribed angles AMB stay within 0.5° of the
reference. If this test ever fails, Module 3's central premise is broken.

13 new unit tests, total 29 passing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(module-3): drag-to-explore góc nội tiếp page (lớp 9)

Ship the first interactive theorem demo. Page lives at /lop-9/goc-noi-tiep/.

Component: src/components/inscribed-angle.ts wires Pointer Events +
setPointerCapture per autoplan eng decision E1. Drag M; on every pointermove,
project the pointer to the circle (M = center + r·normalize(pointer − center))
so M never escapes the circle. Live readouts: ∠AMB at M (inscribed, pair1 red),
∠AOB at center O (central, pair2 teal). All listeners use AbortController
keyed on astro:before-swap so view-transition navigation doesn't leak.

Page: src/pages/lop-9/goc-noi-tiep.astro holds the SVG canvas (viewBox 400x400,
touch-action: none scoped to canvas), theorem panel, and one worked example
walking the 120°/60° canonical case. Astro bundles the script inline so the
single page ships ~7KB total (including the entire geom-engine + component).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(hub): link lớp 9 card to góc nội tiếp module

Hub landing page now branches each grade card on grade.href:
- live cards render as <a> with hover affordance (lớp 9 only, for now)
- coming-soon cards stay as <li> with opacity 0.7 and "Sắp ra mắt" badge

Status taxonomy extended: 'sap-ra-mat' | 'live' so future modules just flip the
status when their page ships.

i18n/vi.ts gains module3.* (intro, theorem, example, instruction copy) plus a new
'live' status string ("Khám phá") so every user-facing string stays inside vi.ts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: VERSION 0.0.2.0 + CHANGELOG entry

First feature release. v0.0.2.0 = scaffold + Module 3 góc nội tiếp.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: mark TODOS items completed by v0.0.2.0

- Drag M with circle constraint → DONE in src/components/inscribed-angle.ts
- TheoremCanvas primitive first cut → DONE (built directly in Astro)
- Theorem panel + worked examples → PARTIAL (1 of 3 examples shipped)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-30 00:03:34 +07:00
committed by GitHub
co-authored by Claude Opus 4.7
parent 6fdee1a5de
commit 776e155cd5
11 changed files with 427 additions and 19 deletions
+12 -4
View File
@@ -37,12 +37,9 @@ Tracked work, organized by component then priority (P0 highest → P4 lowest). S
## Module 3 — Lớp 9 Góc nội tiếp (weekend 2, hero module)
- **Drag M around circle, project to circle constraint**
**Priority:** P1
**What:** `M = center + r·normalize(pointer center)` every `pointermove`. No free movement. Per Eng failure mode #4.
- **Theorem panel + 3 worked SGK-style examples**
**Priority:** P1
**Status:** PARTIAL — v0.0.2.0 ships theorem panel + 1 worked example. 2 more examples remain.
- **First-load coaching state** (per Design F2.2)
**Priority:** P2
@@ -52,6 +49,14 @@ Tracked work, organized by component then priority (P0 highest → P4 lowest). S
**Priority:** P2
**What:** "Góc AMB bằng 47 độ" announced via `aria-live="polite"`. Per Design F6.4.
- **Multi-toggle theorem variants**
**Priority:** P2
**What:** Toggle between "góc nội tiếp" / "góc nội tiếp chắn nửa đường tròn = 90°" / "góc tạo bởi tiếp tuyến và dây cung". Each variant uses the same canvas with different fixed-point setup.
- **KaTeX inline rendering for theorem text**
**Priority:** P3
**What:** Currently uses Unicode (∠AMB, °) which renders fine in Be Vietnam Pro. Switch to KaTeX when notation gets richer (cung, đường tròn (O), etc.).
## Module 1 — Lớp 7 Tam giác bằng nhau (weekend 3)
- **SSS / SAS / ASA / AAS / cạnh huyền-góc nhọn / cạnh huyền-cạnh góc vuông detectors**
@@ -143,3 +148,6 @@ Tracked work, organized by component then priority (P0 highest → P4 lowest). S
- Teacher-tool / B2B2C demo mode (build after Module 3 ships)
## Completed
- **Drag M around circle, project to circle constraint** — `src/components/inscribed-angle.ts` + `src/geom-engine/circle.ts:projectToCircle`. **Completed:** v0.0.2.0 (2026-04-29)
- **TheoremCanvas primitive first cut** — vanilla TS in Astro `<script>` tag, AbortController teardown on `astro:before-swap`. **Completed:** v0.0.2.0 (2026-04-29). Note: built directly in Astro rather than as a single HTML prototype first; the inscribed-angle pattern proved the shape, and the next module (lớp 7 / 8) will reuse this pattern.