Repository navigation
TKW: bring the repo in line with CLAUDE.md - #109
Closed
codebend3r wants to merge 51 commits into
Closed
codebend3r wants to merge 51 commits into
codebend3r wants to merge 51 commits into
Conversation
- every schema in `lib/schemas.ts` is a `z.strictObject`, so a mistyped frontmatter key fails instead of being dropped - new `SlugSchema` gates `houses.seat` and `HouseInfoEntry.slug`; display text and `""` no longer pass - `seat` is nullable: 239 houses move from `seat: ""` to `seat: null` - `wull.md` seat was prose, now `null` (the location stays in the body) - `the-arbor`, `the-fingers`, `the-paps` become `arbor`, `fingers`, `paps` to match castle slugs - `HouseInfobox` drops the empty Seats row; house page description skips "seat at" when unknown and names the castle instead of the raw slug - `buildRelationGraph` and `findOrphanSlugs` skip null seats
- `referenceErrors` reads `battles.casualties` and `events.casualties` - both fields named character slugs that no rule ever checked
- `CLAUDE.md` names `lint:scss` / `lint:scss:fix`, not the nonexistent `lint:css` - add `lint` and `lint:actions`, and spell out what `system-check` runs - `component-scaffold`, `new-content-type`, `populate-entry` skills drop `bun run check`, which doesn't exist
- none of the five `netlify/plugins/*` is listed in `netlify.toml`, so they never ran - `lint-styles` called `bun run lint:styles`, which doesn't exist - CI already gates format, lint, typecheck, and test on every PR and on `main` - weekly security audit prompt no longer points at `netlify/plugins/`
- `lib/regions.ts`: `REGION_LABELS` becomes a `Map`; `isGreatHouseSlug` guard replaces the `in` check and `keyof` cast, and ignores inherited keys like `constructor`
- `lib/prose-links.ts`: mdast `Parent` children already accept `Text`/`Link`, so the `never` casts go
- `lib/family-tree.ts`: type-guard filter narrows spouse `slug` instead of `s.slug!`
- `components/MapStage/MapStage.tsx`: unmeasured pan-zoom `value` is `null` rather than `{} as Value`
- `components/FilteredHouseList/FilteredHouseList.tsx`: `isRankFilter` checks with `some` instead of widening `RANK_FILTERS`
- `components/FamilyTreeChart/FamilyTreeChart.tsx`: `currentTarget` is already an `SVGSVGElement`
- `lib/relations.test.ts`: fixtures read `slug` from the parsed frontmatter
- `test/dom.ts`: `expectElement({ element, type })` checks `instanceof` and returns the narrowed element, throwing an `Error` that names the expected and actual types
- `test/dom.test.ts` covers HTML, SVG, subclass, mismatch, and `null` cases
- replaces every `as HTMLInputElement`/`HTMLSelectElement[]`/`HTMLButtonElement[]`/`SVGGElement`/`HTMLElement` assertion across the component tests
- `FilteredCharacterList.test.tsx` locates the list with `findIndex` and reads the portrait `img` as a plain `Element`, so neither needs narrowing
- the local `asInput` in `CharacterSearchInput.test.tsx` and the inline `instanceof` throws in `SearchCombobox.test.tsx` and `CharacterPortrait.test.tsx` give way to the shared helper
- `lib/family-tree.ts`: `TreeSpouse`, `TreeNode` - `lib/family-tree-portraits.ts`: `EnrichedTreeSpouse`, `EnrichedTreeNode` become intersections over their bases - `lib/family-tree-layout.ts`: `LayoutPerson`, `LayoutSpouseEdge`, `LayoutChildEdge`, `LaidOutChart`, `PlacementCtx` - `lib/relations.ts`: `ContentSet`, `RelationGraph` - none rely on declaration merging; the module augmentations in `react-svg-pan-zoom.d.ts` and `css-custom-properties.d.ts` stay interfaces
- `MapMarker` `Glyph` switch over `MapLayer` gains a `default` that assigns to `never` - `TimelineChart` `ChartNode` switches on `node.kind` instead of an `if` that fell through to `single` - `nodeKey` replaces the inline `node.kind` ternary for the React `key`, with the same `never` check
- `lib/route-params.ts`: `SlugParamsSchema` requires a kebab-case `slug`; `slugFromParams` parses the awaited `params` and calls `notFound()` on failure - `SlugPageProps` types `params` as `Promise<unknown>` until parsed; Next's `PageProps` global needs `next typegen`, which `typecheck` and CI never run - `lib/route-params.test.ts` covers valid slugs, traversal and malformed slugs, a missing `slug`, and the `notFound` throw - `generateMetadata` and the page component of every `app/*/[slug]/page.tsx` read the slug through `slugFromParams`, so nothing unvalidated reaches `path.join` in `lib/content.ts` - `app/dragons/[slug]/page.tsx` and `app/weapons/[slug]/page.tsx` drop the `fm &&` re-check on frontmatter that is never nullish
- `ageAtDeath`, `formatBattleWhen`, `buildFamilyTree`, `regionForHouse`, `filterByName`, `findPortrait`, `enrichTreeWithPortraits` take one object
- `formatLabelText`, `estimateLabelWidth`, `distance`, `midpoint` follow suit
- private `loadFile`, `ref`, `probePaths`, `rankByName`, `bestAliasRank`, `lookup` too
- `renderMarkdown` flattens `opts` into `{ source, proseLinks }`, dropping the unpaired `?.`
- `FindPortrait` mirrors the new `findPortrait` shape; test mocks match
- every call site in `app/`, `components/`, `lib/` updated
- `getScreenToViewBox` takes `{ svg, bounds }`; its `point` takes `{ clientX, clientY }`
- `TimelineExplorer`'s `zoomTo` takes `{ nextIndex, focalViewportY }`
- test helpers `renderEntry`, `stubSize`, `centeredNaturalPoint`, `d`, `findNode`, `renderWith` follow suit
- every call site updated
- `TreeNode`, `TreeSpouse`, `LayoutPerson`: `placeholder`, `external`, `inHouse` to `isPlaceholder`, `isExternal`, `isInHouse` - `isLinkable` param, `RelationRef.linkable`, `NavItem.visible`, `memoize` `enabled` to predicate names - `EventItem.approximate`, `HouseItem.extinct`, `DragState.captured` to `isApproximate`, `isExtinct`, `isCaptured` - props: `Accordion` `isOpen`, `Sigil` `isDecorative`, `FiligreeFlourish` `isMirrored`, `ListSearchSkeleton` `hasControls`, `MainMenuTile` `isVisible`, `CharacterSearchInput` `hasAutocomplete` - locals and state in `SearchCombobox`, `FilteredHouseList`, `FilteredCharacterList`, `SiteHeader`, `SiteMenu`, `TimelineMinimap`, `WorldMap`, `battle-date`, `timeline`, `prose-links`, `spoilers`, `test/stubs.ts` - drop the always-true `handled` flag in `PortraitVariants` - `audit-wiring` parses `isVisible` from `NAV_ITEMS`; `audit-orphans` reads it - frontmatter keys, URL query keys, storage keys, CSS classes unchanged
- Swap widening annotations for `as const satisfies` on label, class, and bounds tables in `lib/`, `components/`, and `app/` - Key `TYPE_NOUN` and `MATERIAL_ADJ` in `app/weapons/[slug]/page.tsx` by `Weapon["type"]` and `Weapon["material"]` instead of `string` - Key `SiteMenu` `ART` by a new `NavHref` derived from `NAV_ITEMS`, widening to `MenuArt` at the read - Narrow `visibleNavItems` to the `NAV_ITEMS` element type - Accept `readonly` node arrays in `TimelineModel.columns` so `EMPTY_COLUMNS` stays literal
- Export `Loaded` from `lib/content.ts` and import it in `lib/map.ts`, `lib/relations.ts`, and `lib/family-tree.ts` instead of redeclaring it - Make `ContentSet` a `Pick` of `Collections` - Type `sex` as `Character["sex"]` on `TreeNode`/`TreeSpouse` and `TreeNode["sex"]` in `FamilyTree` - Build `LayoutPerson` from a `Pick` of `EnrichedTreeNode`, `NameProps` from `TreeSpouse`, and `RelationSource` from `Character` - Drop `VariantFile` for the identical `PortraitFile` - Type the `d()` precision in `lib/battle-date.test.ts` as `CalendarDate["precision"]`
- Key `REGION_FILE`, each list's `REGION_CARD_CLASS`, and `REGION_PORTRAIT_CLASS` with `as const satisfies Record<RegionSlug, string>` - Type `region` as `RegionSlug | null` on `sigilFile`, `Sigil`, and the `CharacterItem`, `DragonItem`, `WeaponItem`, and `HouseItem` view models - Drop the unmapped-region guard in `sigilFile` and its test, since an unknown region no longer type-checks
- Derive `ViewMode`, `TreeViewMode`, and `Grouping` from `as const` arrays and check `isViewMode`/`isGrouping` against them - Move `SortDirection` next to `SORT_DIRECTIONS` in `lib/listSearchParams.ts`, so `lib/` no longer imports a type from `SortToggle` - Import `SortDirection` from `lib/listSearchParams.ts` in `SortToggle`, `FilteredCharacterList`, and `FilteredHouseList`
- Add `exhaustiveList` in `lib/exhaustive-list.ts`, a compile-time check that a literal list names every member of a union - Check `ALL_CASTLE_TYPES`, `LANDMASSES`, and `RANK_FILTERS` with it, so a schema enum value they omit fails to compile - Keep those lists literal rather than reading `.options`, since client components import them and `zod` would follow - Derive `RankFilter` as `"all" | HouseRank` instead of re-listing the ranks - Derive `REGION_SLUGS` from `REGIONS` instead of re-listing the slugs
- Move `PAN_DIRECTIONS` into `lib/pan-zoom.ts` as `as const satisfies Record<string, Pointer>` and derive `PanDirection` with `keyof typeof` - Import it in `FamilyTreeChart`, `MapStage`, and `WorldMap` instead of keeping three identical copies
- Build `CharacterItem`, `DragonItem`, `WeaponItem`, `HouseItem`, and `EventItem` from a `Pick` of their schema type for `slug`, `name`, and `aliases` - Type `renderPagination` positions as `ComponentProps<typeof ListPagination>["position"]` - Share one `CardArgs` type between `renderCard` and the `RegionAccordion` prop in `FilteredHouseList`
- `lib/content.test.ts`: await `loadCastle`, `loadWeapon`, `loadDragon` rejection checks in async tests - `lib/memoize.test.ts`: await the `memoize` rejection propagation check
- `WorldMap`: handle `requestFullscreen()` and `exitFullscreen()` rejections instead of leaving them floating - `WorldMap.test.tsx`: cover a denied enter and a denied exit - `WorldMap.test.tsx`: restore the faked Fullscreen API in `afterAll`
- `lib/timeline.ts`: default `clusterColumn`'s last group to `[]` instead of chaining through it - `SiteMenu`, `FamilyTreeChart`, `WorldMap`: give value-producing `?.` reads a `??` fallback - `WorldMap`: compare the popover anchor through `!!prev` instead of `prev?.x` - Tests: `?? null` for scalar matches, `?? ""` for substring matches, `?? []` for arrays, so a missing node still fails - `portrait-variants.test.ts`, `map.test.ts`: assert absence with `toHaveProperty` so a missing entry cannot pass - `MapLayerToggle.test.tsx`: find checkboxes by role and name instead of chaining off a label lookup
- `lib/family-tree-layout.ts`: `placeSubtree` returns its persons and edges instead of pushing into a shared `ctx` - `lib/family-tree-layout.ts`: `placeRow` lays siblings and roots out left to right; child edges read each child's own `centerX` - `lib/family-tree-layout.ts`: `placeSubtree` and `placePerson` take a single object parameter; `spousePositions` reduces instead of pushing - `lib/relations.ts`: replace `pushTo` with `slugsByKey`, grouped through `Map.groupBy` - `lib/prose-links.ts`: `scanText` takes an object, walks `matchAll`, and returns the used keys instead of adding to a passed `Set` or resetting `lastIndex` - `lib/prose-links.ts`: `compileIndex` groups forms with `Map.groupBy` and sorts with `toSorted`; surface-form builders return arrays instead of pushing - Laid-out charts for every house and the rendered prose for every entry match the previous output
- `lib/regions.ts`: replace the `while` loop and mutable `seen` set with a recursive `climb` that carries a fresh set
- Replace every in-place `.sort()` and `.reverse()` in `lib/`, `components/`, and `app/`, tests included - Drop the defensive `[...x]` copies that only existed to protect an in-place sort
- `lib/battle-date.ts`: replace the `let label` if/else-if/else chain with guard-clause returns and a `const` asterisk suffix
- Remove doc comments that repeat the name they sit on: `ScreenToViewBox.point`, `PLACEHOLDER_EXTENSION`, `groupByStem`, `dateIntegrityDefects`, `ListSearchInput`, `MainMenuTile` - `WorldMap`: move the recentring rationale from `markerScreenPoint` onto `revealMarker`, which it describes - `ListPagination`: `noun` is singular and pluralized with `s`, not plural
- Add `lib/useIsMobile.test.ts`, driving `useIsMobile` through a stubbed `matchMedia` - Fold the orphan `lib/battles-content.test.ts` into `lib/content.test.ts`, which owns `loadAllBattles`, reusing `absoluteYear` instead of a local copy - Move the `testNuqs` helper from `lib/` to `test/` beside `preload.ts` and `stubs.ts`, updating its seven importers
- `personSlotWidth`, `spousePositions`, `pairMidpoint`, `placeSpouse` take one object - `pairMidpoint` reads the last spouse with `.at(-1)` instead of indexing
- add `.claude/**/*.ts` to `tsconfig.json` `include`; the `**/*.ts` glob skips dot-directories, so `tsgo` never saw the 14 skill scripts - point `test`, `test:watch`, and `coverage` at `./ ./.claude`; `bun test` skips hidden directories too - import `lineOf` into `a11y-audit/checks.ts`; `checkViewport` threw a `ReferenceError` on any locked viewport - type the `checkImages` `flatMap` callback as `Finding[]` so `"error"` and `"warn"` severities unify - skip optional `head.slug` / `member.slug` in `audit-portraits.ts` `inboundReferences` instead of counting `undefined` - add `a11y-audit/checks.test.ts` for the locked-viewport path, mixed severities, and multi-finding interactions
- file table in `a11y-audit/SKILL.md` gains the co-located rule tests and notes `bun run test` runs them
- `ScanState` and `advance` moved above the JSDoc so it documents `scanCharStates` again
- Gale reads each argument as a glob, so any staged `app/*/[slug]/*.scss` matched nothing and failed the pre-commit hook
- Move the `lint-staged` config from `package.json` to `lint-staged.config.mjs` so the stylesheet task can escape `[`, `]`, `{`, `}`, `*`, `?` per path
- Script and style tasks otherwise unchanged
- `app/castles/[slug]/page.tsx` rendered the markdown `<article>` unstyled, so with `globals.scss` zeroing `p`/`h*` margins the blocks ran together - New `app/castles/[slug]/page.module.scss` with the same `.body` grid + `gap: 20px` the other detail pages use, imported via `@/`
- `[data-placement="below"] .popover { animation-name: popBelow }` (0,2,0) outranked the reduced-motion `.popover { animation: fadeIn … }` (0,1,0), so the spring pop still ran for below-placed cards
- Reduced-motion block now targets `.popover, [data-placement] .popover`, matching the placement selector so the fade wins for every placement
- Re-checked every other `transition`/`animation` guard against its compiled selector: all already match
- `--bp-xs` … `--bp-xl` in `styles/globals.scss` had no consumer in `app/`, `components/`, `lib/`, or `styles/` - Their values had drifted from `styles/_breakpoints.scss` (`768px` vs `767.98px`), the real source of truth - Breakpoint comment now points only at the SCSS variables
- `app/layout.tsx` imported `../styles/globals.scss` relatively; every other stylesheet import goes through `@/`
- `PageHeading` and the house plate render their own subtitle `<p>`, so the `:global()` escape was avoidable - `components/PageHeading/PageHeading.tsx` adds `styles.lede` beside the `subtitle` primitive; `.heading .lede` keeps the old specificity - `app/houses/[slug]/page.tsx` adds `styles.words` for the house words; `.heading .words` replaces `:global(.subtitle)` - No `:global()` left in `app/` or `components/`
- `components/Accordion/Accordion.tsx` panel is a `<section aria-labelledby>` instead of `<div role="region">`; same implicit `region` role and name - `.heading` wrappers on the battle, dragon, event, house, and weapon plates are `<hgroup>`, matching `PageHeading` - Character plate `.heading` is a `<header>`: it holds the sigil link plus the existing `hgroup.titleGroup`, which an `<hgroup>` can't contain - Class names unchanged; no selector depended on `div`
- `styles/globals.scss` gains step tokens (`--fs-micro` 9px, `--fs-tag` 10px, `--fs-eyebrow` 12px, `--fs-caption` 13px, `--fs-small` 14px, `--fs-lead` 18px, `--fs-name` 20px, `--fs-wordmark` 25px) - Title ramps: `--fs-display-xl/lg/sm` (76/54/40px), `--fs-h1-detail` 62px, `--fs-h1-entry` 58px, `--fs-h1-lg` 44px, `--fs-h1-entry-lg` 42px, `--fs-h1-sm` 34px, `--fs-h1-entry-sm` 32px - `/design`-only sizes: `--fs-specimen-display` 48px, `--fs-specimen-h1` 38px, `--fs-specimen-shield` 27px - 134 module literals and the `h1` 44px override now read tokens; the `html, body` 16px/18px stay literal as the rem base - Visible changes, consolidated within 1px: `app/design` `.bannerName` 17→18px, `.ruleTitle` 22→21px, `.pageTitle` 23→24px, `.tokens` 12.5→12px; `app/houses/[slug]` `.words` 23→24px - rem/em sizes mapped to the step nearest their 16px-root value, so on `≤md` (18px root) they no longer scale up: - `FamilyTree` `.name` 1.05rem→16px (was 16.8/18.9px), `.alias` 0.8rem→13px (12.8/14.4), `.cross` 0.95rem→15px (15.2/17.1), `.gender` `.king` 0.85rem→14px (13.6/15.3) - `TimelineCluster` `.name` 1.05rem→16px; `TimelineChart` `.eventName` 1rem→16px (18 on `≤md`); `TimelineExplorer` `.zoomButton` 1.1rem→18px (17.6/19.8) - `SearchCombobox` `.option` 1.15rem→18px and 1.25rem→21px on `≤md` (was 22.5), `.optionDetail` 0.8rem→13px - `Infobox` `.note` 0.92em→14px (13.8); `app/design` `.inlineCode` 0.86em→14px (13.76)
- `styles/globals.scss` adds `--tkw-radius-xs` 3px, `--tkw-radius-sm` 4px, `--tkw-radius-md` 5px, `--tkw-radius-lg` 8px, and `--tkw-radius-pill` 999px around the existing `--tkw-radius` 7px - 45 module literals now read the scale; `50%` circles and `0` resets stay literal - Visible changes: `SiteHeader` `.wordmark` focus ring and `SiteMenu` `.linkIcon` 2→3px; `app/houses/[slug]` `.notableList li` 6→7px - `SpoilerToggle` `.track` 9px→`--tkw-radius-pill` renders the same on its 18px track
- `styles/globals.scss` adds `--lh-dropcap` 0.78, `--lh-heading` 1.15, `--lh-compact` 1.3, `--lh-blurb` 1.45, `--lh-lede` 1.6, `--lh-code` 1.85 - Adds `--ls-kicker` 1.4px, `--ls-data` 1px, `--ls-tight` 0.6px - 31 `line-height` and 33 `letter-spacing` literals now read tokens; `line-height: 0` resets stay literal - Visible line-height changes (±0.05): `app/design` `.faceDisplay` 1.1→1.15, `.faceMono` 1.2→1.15, `.quoteText` `.ruleBody` 1.55→1.6; `FilteredCharacterList` `.name` 1.2→1.15; `TimelineChart` `.eventName` 1.25→1.3; `HouseInfobox` `.caption` 1.35→1.3; `SiteFooter` 1.4→1.45 - Visible letter-spacing changes (≤0.2px): `app/page` `.title`, `app/battles` `.when`, `FilteredEventList` `.when` 0.5→0.6px; `app/design` `.swatchHex` 0.8→1px; `SiteHeader` `.title` 1.5→1.6px; `TimelineChart` `.eraLabel` 2.4→2.2px
- `styles/globals.scss` adds `--tkw-wash`, `--tkw-caption-wash`, sheen (`--tkw-silver`, `--tkw-silver-bright`, `--tkw-white`, `--tkw-glint`), and shadow tokens (`--tkw-black`, `--tkw-shadow`, `--tkw-drop`, `--tkw-scrim`) - The 0.16→0.04 caption gradient shared by `SiteMenu`, `HouseInfobox`, and `app/design` is now `--tkw-caption-wash`; the four register-row hovers use `--tkw-wash` - One-off gold alphas become `color-mix(in srgb, var(--tkw-gold) N%, transparent)`; the map glint mixes `--tkw-gold-bright`; `SearchCombobox` `.optionActive` reads `--tkw-hairline-faint` - `TimelineExplorer` and `TimelineMinimap` share `--tkw-drop`; `SiteMenu` and `WorldMap` shadows mix `--tkw-shadow`/`--tkw-black`; the `app/design` shield shade mixes `--tkw-black` - `app/page` silver sweep and `SiteHeader` glint read the sheen tokens - Atmosphere damask and compass rose in `globals.scss`, and the `app/design` `.searchDemo` glyph, are now alpha masks over `--tkw-gold` instead of `%23…` hexes in the SVG - `components/listSearch.module.scss` `.input` keeps its data-URI glyph: an `<input>` has no pseudo-element and a mask would clip the whole field - Visible changes: damask tile stroke `#e6c15c`→`--tkw-gold` at the layer's 4.5% opacity; vignette `rgba(8, 6, 5, 0.7)`→`--tkw-scrim` (0.72) - Remaining matches are the `Filigree` `#000` alpha stops in `mask-image`
- `styles/globals.scss` adds `--tkw-dur-fast` 150ms, `--tkw-dur` 180ms, `--tkw-dur-slow` 240ms, `--tkw-ease`, `--tkw-ease-out`, and `--tkw-sheathe` (6.5s linear infinite) - `--tkw-lift` and `--tkw-fade` are now composed from `--tkw-dur` + `--tkw-ease` - Every module `transition` reads the tokens; `SpoilerToggle` `.track` reuses `--tkw-lift` for its border and shadow parts - `SiteHeader` and `app/page` sheathe sweeps share `--tkw-sheathe`; `WorldMap` easings, the pulse/glint delay, and the reduced-motion fade read the tokens - `WorldMap` choreography stays literal (pulse 1.1s, pop 0.52s, glint 0.9s, reveal 0.4s, 0.16–0.4s stagger): one-off timings with no step on the scale - Visible changes: `FamilyTree` `a.name` and `app/houses/[slug]` `a.notableName` 120→150ms; `SiteMenu` `.backdrop` fade 220→180ms; `MapMarker` `.label` fade 150→180ms
- New `lib/design-tokens.ts` (`parseDesignTokens`, `loadDesignTokens`) reads the `:root` block of `styles/globals.scss` at build time and throws on an undeclared token; co-located tests - `app/design/page.tsx` shows each swatch's value, the type-scale specs, and the token listing from that block instead of hand-copied hex strings and a stale `TOKEN_CSS` excerpt - `styles/globals.scss` adds `--house-*-metal` / `--house-*-ink` for all ten houses; the heraldry grid, banner, and register-row demos read them instead of inline hex - `CORE_PALETTE`, `HOUSE_PALETTE`, `FACES`, `SCALE`, `STATUSES`, `RULES`, `PAGES` are `as const satisfies readonly …[]` - Visible changes: Stark banner metal `rgba(255,255,255,.75)`→`--house-stark-metal` (0.7); `--fs-label` spec reads `11px` instead of the hand-written `9 to 12px`; the token listing now prints the full `:root` block
- Radius check now accepts every `--tkw-radius-*` step and skips `0` resets and `50%` circles - Line-height check skips `line-height: 0;` resets - With both, the R9 greps print only the `Filigree` `#000` mask stops
✅ Deploy Preview for theknownworld ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This was referenced Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLAUDE.mdrule a full audit found brokenReferenceError, unspaced castle prose, a reduced-motion leak, unhandled fullscreen rejections, and 104 bad houseseatreferencesinterface(outside module augmentation),for…of/for…in, or@ts-ignoreremains inlib/,components/,app/,test/,types/, or.claude/--tkw-*/--fs-*/--lh-*/--ls-*tokensBugs
content.test.tsandmemoize.test.ts:.rejectsnow awaited; all 4 tests verified to fail when the code path breaks.claude/**/*.tsadded totsconfig.jsonincludeand to thetestscripts;a11y-audit/checks.tsimportedlineOfit never had (runtimeReferenceError), plus 3 other type errorsapp/castles/[slug]: prose gets the same.bodygrid as the other detail pagesWorldMap.module.scss:popBelowno longer outranks the reduced-motion guardWorldMap.tsx: deniedrequestFullscreen/exitFullscreencaught, with testsContent and schemas
z.strictObject; unknown frontmatter keys fail instead of being droppedSlugSchemagateshouses.seatand infobox entry slugsseat: ""→seat: null;wullprose seat →null;the-arbor/the-fingers/the-paps→arbor/fingers/papsbattles.casualtiesandevents.casualtiesnow checked as character referencesTypeScript
expectElementguard intest/dom.tsinterface→type; non-null!infamily-tree.tsreplaced by a guardMapMarker/TimelineChartswitches exhaustively checked withneverslugparams validated bylib/route-params.tsbefore reachingpath.joinas const satisfieson literal tables; types derived from schemas /Collections/as constlists instead of hand-written copiesexhaustiveListhelper keeps client-side enum lists complete without pullingzodinto the browser bundleCode style
?.paired with??(~140 sites)is/has/should/can(frontmatter keys left alone)family-tree-layout,relations,prose-links;toSorted/toReversedeverywhereuseIsMobilegains a test; battles corpus tests move intocontent.test.ts;testNuqsmoves totest/CSS
globals.scss: font size, radius, line height, letter spacing, colour, motion durations and easings, house metal/inkFamilyTree,TimelineCluster,TimelineChart,SearchComboboxsizes now px tokens, so they no longer grow at the 18px mobile root/designspecimens shift by 1px/designstyle guide reads live token values fromglobals.scssvialib/design-tokens.ts:global(.subtitle)overrides replaced by module classes<section>for the accordion panel;<hgroup>/<header>for detail headings--bp-*properties removed;globals.scssimported via@/Tooling and docs
CLAUDE.mdlistslint:scss,lint,lint:actions(not the nonexistentlint:css) and whatsystem-checkrunsbun run checknetlify/plugins/*removed (one called a nonexistentlint:styles)lint-staged.config.mjsescapes[slug]paths before passing them to Gale, which read them as globs and failed the hooktestscripts pass./ ./.claude, sobun run test <filter>now runs the whole suite; callbun test <filter>directly to filterNot addressed
main(fface13 WIP), old PR bodies, and old folder-style branch names can't be fixed without rewriting historynew-content-type/audit-wiring.tsalready reports 28 gaps onmain; its text checks have drifted fromlib/dl/ul) left for a separate pass