mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Learn: a /learn/ deep-dive section — markdown lessons as before/after spec progressions
This commit is contained in:
@@ -43,7 +43,9 @@ the spec_; do not port legacy code.
|
||||
view-state routing is unchanged by the base path). The landing reuses `src/core` and the
|
||||
`chart-renderer` service only — never stores, orchestration, modals, or components — and
|
||||
lazy-loads Vega, so `/` stays light. The PWA service worker and manifest are scoped to
|
||||
`/app/`, leaving the landing uncontrolled and always-fresh.
|
||||
`/app/`, leaving the landing uncontrolled and always-fresh. **`/learn/` is a second such
|
||||
entry** (`src/learn/`) — the markdown-authored deep-dive section, under the same rules
|
||||
(see architecture 11).
|
||||
|
||||
See [`docs/architecture/`](docs/architecture/00-overview.md) for the patterns behind each
|
||||
layer (state, persistence, modals, routing, rendering, inference, relationships) and
|
||||
@@ -57,9 +59,11 @@ external repo is needed to work from them.
|
||||
```
|
||||
index.html # Landing entry (served at /)
|
||||
app/index.html # App entry (served at /app/)
|
||||
learn/index.html # Learning-section entry (served at /learn/)
|
||||
src/
|
||||
├── main.tsx # App bootstrap (font wiring, startup, render)
|
||||
├── landing/ # Marketing landing at / — standalone page; reuses core + chart-renderer
|
||||
├── learn/ # /learn/ deep-dive — markdown lessons + the SpecProgression engine (arch 11)
|
||||
├── core/ # Portable spec engine (no browser/React/Monaco)
|
||||
├── app/
|
||||
│ ├── components/ # React UI (CSS Modules co-located)
|
||||
@@ -71,7 +75,7 @@ src/
|
||||
styles/ # Global CSS (tokens, base)
|
||||
docs/
|
||||
├── spec/ # Authoritative behavioral specification (00–10) — the WHAT
|
||||
├── architecture/ # Architecture playbook (00–10) — the HOW (self-contained)
|
||||
├── architecture/ # Architecture playbook (00–11) — the HOW (self-contained)
|
||||
│ └── visual-specimen.html # Standalone token sandbox + reusable-primitive catalog
|
||||
├── exploration/ # Point-in-time records (research, reviews, scope memos) — not maintained
|
||||
├── IMPLEMENTATION-PLAN.md # Milestone sequence (M0–M6)
|
||||
@@ -151,6 +155,13 @@ High coverage on `src/core/` (parsing, detection, profiling, reference resolutio
|
||||
transforms, import normalization). Lighter on components. Extract testable logic out of
|
||||
components into core/stores where practical.
|
||||
|
||||
Don't test static presentational components — copy, markup, and links with no logic behind
|
||||
them. Content assertions ("renders the heading X", "this link exists") are change-detectors:
|
||||
they break on intentional copy edits and catch no real bug. Test the logic a component
|
||||
carries — platform branches, state transitions, config-path writes, render serialization —
|
||||
not the strings it renders; if that logic is worth guarding, lift it into core/stores and
|
||||
test it there.
|
||||
|
||||
Component tests (happy-dom) share a harness shape: `createRoot` + `act` with
|
||||
`IS_REACT_ACT_ENVIRONMENT = true` set at module level, stores reset in `beforeEach`, and
|
||||
`vi.mock('../services/chart-renderer', …)` for anything that embeds a chart (vega-embed is
|
||||
|
||||
Reference in New Issue
Block a user