Skip to content

Commit 2228785

Browse files
arch
1 parent 55d12b4 commit 2228785

23 files changed

Lines changed: 2801 additions & 2801 deletions

‎ARCHITECTURE.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The permanent guide to how this site is organised. **Read this before changing a
44
Migration steps (temporary) live in [MIGRATION_PLAN.md](MIGRATION_PLAN.md).
55

66
> **STATUS: migration in progress (Phase C).** Real `MB.define` modules: `js/core/` (namespace, utils, scheduler, state, particles, safe-zones), `js/gallery/` (artworks, gallery), `js/effects/` (petals, flower-fx, scroll-effects, text-effects, cursor), `js/navigation/` (navigation, scroll-sunflower) and `js/site/hero.js` (Steps 1-3, 6-9).
7-
> The remaining features live in `js/legacy/` (19 files; many are already just calls into the modules), `ecosystem.js` (155) and `style.css` (2,769).
7+
> The remaining features live in `js/legacy/` (19 files; many are already just calls into the modules), `ecosystem.js` (155) and the stylesheet (now split into `css/01…14-*.css`, loaded in that order).
88
> §1–§10 describe the **target**; §0 says where things live **right now**.
99
> As each migration step lands, update §0 (rows disappear as code reaches its home) and the global-debt table (§4).
1010
@@ -111,7 +111,7 @@ v13 living plants (2607). ≈ 72 of 631 class names are never referenced from JS
111111

112112
### index.html
113113
Structure and content only: SVG symbol sprite (≈ 15–37), sections `#home #about #experience #skills #gallery #contact`, footer,
114-
`#galleryModal`, `#lightbox`, `<template id="xpData">` (~340 lines) and `<template id="skData">`. Loads `style.css?v=28`,
114+
`#galleryModal`, `#lightbox`, `<template id="xpData">` (~340 lines) and `<template id="skData">`. Loads `css/01…14-*.css`,
115115
the `js/core`, `js/gallery`, 21 `js/legacy` files and `ecosystem.js` (all ordered `defer` scripts with `?v=` tags; see the manifest in §1b and the comment in `index.html`). No inline handlers. Keep it that way.
116116

117117
---

‎MIGRATION_PLAN.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,12 @@ Re-wrap only; code stays in `script.js`, in the same order, so nothing can reord
227227
5. **DONE** (`animals/art.js`: BIRD_SVG, CLOUD_SVG) Share creature/cloud art where two files use it (`animals/art.js`).
228228
- **T2 after each of 1–3.**
229229

230-
## Phase E: CSS (structural), separate from JS steps
230+
## Phase E: CSS (structural), separate from JS steps · **DONE (E1 only; E2 deliberately skipped, see STATUS.md)**
231231
- **E1 mechanical split (provably safe):** cut `style.css` at existing banner lines into ordered files; link in the same order; css-concat-check must be byte-identical.
232232
- **E2 regroup by responsibility** into `css/{base,layout,navigation,gallery,effects,botanical,plants,garden,animals,environment}.css`, moving a feature's CSS *after* its JS has moved. Before moving a rule check whether another rule targets the same element + property later in the cascade (148 `!important`s, v-layers override earlier ones); verify with style-snapshot + screenshots at 1440 / 1024 / 768 / 390 and RM. Media queries and reduced-motion rules travel with their feature.
233233
- **Exception to "no cleanup":** an obsolete rule is touched only if it directly blocks a move (record in the commit message).
234234

235-
## Phase F: dead-code cleanup (later, separate, approved)
235+
## Phase F: dead-code cleanup · **DONE (see STATUS.md)**
236236
- ≈ 72 CSS class names look unreferenced (`yard`, `yd-*`, `eco-*`, `chick`, `ch-*`, `eg-*`, `rock`, `gulp`, `row-*`, `sp-lv2/3`…); some may be built by string concatenation. Produce the list, confirm, delete in its own commits with before/after screenshots. Also: stale `explore.js` comments, the leftover `TODO(human)` near `clickGrowthLimit` (script.js ≈ 1101), unread globals, the Experience "fawn" CSS after commit `ba7d87c`.
237237

238238
## Risks and notes

‎STATUS.md‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# STATUS (handoff)
22

33
## Status
4-
- **Migration Steps 0–15 and Phase D items 3 and 5 complete and verified** (uncommitted). Phase D items 1 (core/pointer), 2 (unify safe-zone lists) and 4 (merge timers) are deliberately NOT done: they change observable behavior/timing and need approval. Next optional phases: E (CSS), F (dead code).
4+
- **Migration finished: Steps 0–15, Phase D items 3 and 5, Phase E (E1) and Phase F complete and verified** (uncommitted). Phase D items 1 (core/pointer), 2 (unify safe-zone lists) and 4 (merge timers) are deliberately NOT done: they change observable behavior/timing and need approval.
5+
- **Phase E:** `style.css` split at its existing layer banners into `css/01-base.css` … `css/14-side-vines-plants.css`, linked in the same order (`?v=2`); `tools/css_concat_check.py` proved the pure cut byte-identical (226,489 bytes) before the Phase F pruning. E2 (regrouping rules by feature) was deliberately NOT done: the cascade is layered by version with 148 `!important`s, so reordering is not provably safe and was not required. The old `style.css` was removed (original kept as `pre-modular:style.css`).
6+
- **Phase F:** removed 144 CSS rules/selectors that target only classes never referenced in `index.html` or `js/` (`yard`, `yd-*`, `eco-*`, `ch-*`, `eg-*`, `chick`, `rock`, `gulp`, `sp-lv2/3`, `vine-bud-stem`, old `mobile-*`/`writing-*`/`flip-*`/`skill-tag`…), skipping dynamic prefixes (`is-*`, `row-*`, `gs-*`, `vine-right`); removed dead `BF` constant, `addStems` (+ its resize listener) and unused `NS`/`rand` in `plants/vines.js`; fixed stale comments (`explore.js`, `style.css`) and the obsolete `TODO(human)` on `clickGrowthLimit`.
7+
- **Left unresolved on purpose:** `shouldVisit` placeholder (returns false) in `animals/butterflies.js`, still wired into `botanical/stage.js` (real, unimplemented design hook; its TODO stays); the passive `.w-nest/.w-story/.w-jade` `display:none !important` rules; `@keyframes` possibly orphaned by pruned rules; Phase D 1/2/4; `tools/` is still publicly served by Pages.
8+
9+
## Final verification (Chrome, headless)
10+
file://, local server and a Pages-style export (`css/` only, no `style.css`): desktop, desktop-rm, laptop, tablet, phone: 0 console errors/warnings, smoke 0 errors, computed-style snapshots 0 differences vs `tools/baseline`, `check_site.py paths` and `globals` PASS. Fingerprint differences are only the intentionally removed globals/`__story` hook plus known reduced-motion DOM-node noise. Screenshots differ only by known noise (photo fan tilt, bird, random decorations).
511

612
## Important architecture
713
- Classic `<script src defer>` files, **not ES modules** (modules break on `file://`).
@@ -50,4 +56,4 @@
5056
- Reuse existing tests; no new test infrastructure unless necessary.
5157
- Keep commentary concise. Targeted tests first; broad baseline only where required.
5258

53-
NEXT: Phase E (CSS) — only when asked
59+
NEXT: nothing required. Optional, needs approval: Phase D items 1, 2, 4.

0 commit comments

Comments
 (0)