feat(field-guide): hub route + window activation + shared anchor-intercept (FG-3a) #95

Merged
manlycucumber merged 1 commit from feat/field-guide-hub into develop 2026-07-11 18:52:08 +00:00
manlycucumber commented 2026-07-11 18:51:14 +00:00 (Migrated from github.com)

FG-3a of v0.4.0 — the first visible Field Guide surface. Part of #92. Architecture: docs/architecture/field-guide.md.

What's here

  • /field-guide/ hub — a prerendered route that lays out every published creature both ways at once: by habitat, then by kind, inline, so a no-JS reader gets the whole index on one page. Each creature is a real <a href> into its existing Library article — no content duplicated. data-pagefind-ignore keeps the browsing chrome out of search (index stays at 2 records).
  • Window activationwin-fieldguide is promoted out of its kind:'soon' placeholder: a Desktop.svelte branch renders FieldGuideBody, the entry leaves ROOMS, the window grows (small:false), and its Home-door copy now describes browsing (the album is FG-5, not this PR).
  • Shared anchor-intercept — the Library window's click-intercept is extracted to src/lib/portal/anchorIntercept.ts; LibraryBody is refactored onto it (behaviour-equivalent). The Field Guide intercept claims both /field-guide/ and the FULL /library/ prefix, so a creature's article — and every cross-link inside it, to any category — opens in-window rather than tearing the desktop down. Every view transition (incl. Back) moves focus to the view heading.
  • New: axes.ts (habitat/kind labels + groupByHabitat/groupByKind), FieldGuideHome, FieldGuideBody, guide.svelte.ts (FieldGuideBrowser).
  • Guards: guard:offline now exercises /field-guide/ with real tokens (By habitat, Woodland, The Red Fox, …); guard:content gains a Field-Guide-only positive token (By habitat).

Scope fence

No axis routes yet (/field-guide/habitat|kind/[…] → FG-3b), no album (FG-4/FG-5), no diagrams/maps (FG-6/FG-7). The hub deliberately does not link to axis routes (they don't exist yet — strict prerender would fail).

Verification

CI gauntlet: check (0 err) · lint · guard:colour · build (hub prerenders; search stays 2) · guard:external · guard:content · guard:provenance · guard:offline (new /field-guide/ route) · 163 unit tests (+4).
e2e (local): Field Guide (3) — creature opens inline (URL unchanged), other windows survive, Back returns, cross-category cross-link opens inline (the full-/library/-claim guarantee); full Library (14) still green (intercept refactor is a no-op behaviourally); hub axe clean.
A focused adversarial review found no blockers/majors; its two findings (stale door copy, an unreachable focus-strand) are fixed. Fixed a green-kicker AA-contrast miss (→ --ink-green); flagged the identical latent bug in the Library's CategoryView as a separate task.

**FG-3a of v0.4.0** — the first *visible* Field Guide surface. Part of #92. Architecture: [`docs/architecture/field-guide.md`](docs/architecture/field-guide.md). ## What's here - **`/field-guide/` hub** — a prerendered route that lays out every published creature **both ways at once**: by habitat, then by kind, **inline**, so a no-JS reader gets the whole index on one page. Each creature is a real `<a href>` into its **existing** Library article — no content duplicated. `data-pagefind-ignore` keeps the browsing chrome out of search (index stays at 2 records). - **Window activation** — `win-fieldguide` is promoted out of its `kind:'soon'` placeholder: a `Desktop.svelte` branch renders `FieldGuideBody`, the entry leaves `ROOMS`, the window grows (`small:false`), and its Home-door copy now describes **browsing** (the album is FG-5, not this PR). - **Shared anchor-intercept** — the Library window's click-intercept is extracted to `src/lib/portal/anchorIntercept.ts`; `LibraryBody` is refactored onto it (behaviour-equivalent). The Field Guide intercept claims **both `/field-guide/` and the FULL `/library/` prefix**, so a creature's article — and every cross-link inside it, to *any* category — opens **in-window** rather than tearing the desktop down. Every view transition (incl. Back) moves focus to the view heading. - **New**: `axes.ts` (habitat/kind labels + `groupByHabitat`/`groupByKind`), `FieldGuideHome`, `FieldGuideBody`, `guide.svelte.ts` (`FieldGuideBrowser`). - **Guards**: `guard:offline` now exercises `/field-guide/` with real tokens (`By habitat`, `Woodland`, `The Red Fox`, …); `guard:content` gains a Field-Guide-only positive token (`By habitat`). ## Scope fence No axis routes yet (`/field-guide/habitat|kind/[…]` → FG-3b), no album (FG-4/FG-5), no diagrams/maps (FG-6/FG-7). The hub deliberately does **not** link to axis routes (they don't exist yet — strict prerender would fail). ## Verification CI gauntlet: `check` (0 err) · `lint` · `guard:colour` · `build` (hub prerenders; search stays 2) · `guard:external` · `guard:content` · `guard:provenance` · **`guard:offline` (new `/field-guide/` route)** · **163 unit tests (+4)**. e2e (local): **Field Guide (3)** — creature opens inline (URL unchanged), other windows survive, Back returns, **cross-category cross-link opens inline** (the full-`/library/`-claim guarantee); **full Library (14) still green** (intercept refactor is a no-op behaviourally); **hub axe** clean. A focused adversarial review found no blockers/majors; its two findings (stale door copy, an unreachable focus-strand) are fixed. Fixed a green-kicker AA-contrast miss (→ `--ink-green`); flagged the identical latent bug in the Library's `CategoryView` as a separate task.
Sign in to join this conversation.
No reviewers
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Bosco/bosco!95
No description provided.