Skip to content

feat: pin the seams with tests; one nav registry; one Crumbs (round 3) - #160

Open
ronaldtse wants to merge 1 commit into
refactor/deepen-content-chromefrom
refactor/deepen-tests-nav-crumbs
Open

feat: pin the seams with tests; one nav registry; one Crumbs (round 3)#160
ronaldtse wants to merge 1 commit into
refactor/deepen-content-chromefrom
refactor/deepen-tests-nav-crumbs

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Round 3 of the architecture deepening, stacked on #159 (merge #158, then #159, then this). Report: local architecture-review-20260903-114911.html.

1. Vitest on the pure seams (Strong)

The first two rounds built deep interfaces; this round makes them stay deep. 28 specs over frontmatter, newsIndex kind classification, seo builders, identity resolvers, and searchCore (sectionOf, debounce). npm test runs before the build in CI. The suite paid for itself on its first run: empty frontmatter blocks (---\n---) were silently unrecognized — grammar fixed in the reader and pinned by a spec.

2. One navigation registry (Strong)

lib/nav.ts — the six primary nav items declared once. Header, Footer, and 404 all consume it. Fixes real drift: the 404 advertised "Team, advisors, awards" (sections removed from the site) and a hardcoded "36 suites".

3. Crumbs (Strong, UX)

Crumbs.astro (links + current page as aria-current text) retires six hand-rolled breadcrumbs (ArticleShell, technologies/[id], platforms/[id], hall-of-fame, advisories, awards). PageHero gains a crumbs prop, and the three openings that skipped round 2's adoption (awards, advisories, hall-of-fame) now use PageHero — the page-opening rhythm covers every page.

4. Dead exports pruned (Worth exploring)

team(), advisors() (site sections removed by design), englishPosts/newsPosts/archivePosts/zhVariantOf (orphaned by the newsIndex refactor). Content collections under src/content/ are untouched — loaders can return when the pages do.

5. zh-hant chrome (Worth exploring, UX)

Base passes lang to Header/Footer; nav labels resolve via t(key, locale). The 79 zh-hant articles and the zh-hant listing now get Chinese navigation — the i18n dictionaries became load-bearing instead of speculative.

6. Programmatic OG cards — deferred (Speculative)

Feature work needing design input; explicitly not in this pass.

Verified

  • 28/28 specs green; full build green; CI now runs tests before the build.
  • zh-hant pages: header + footer nav render 平台 / 技術 / 最新消息 / 客戶 / 公司 / 安全; English pages unchanged.
  • 404 contains no stale copy; awards/hall-of-fame/advisories render Crumbs with aria-current.

- vitest on the pure modules (frontmatter, newsIndex kinds, seo
  builders, identity marks, searchCore sectionOf/debounce); npm test
  runs before the build in CI. First run caught a real grammar gap:
  empty frontmatter blocks were not recognized — fixed in the reader
- lib/nav.ts: the primary nav declared once; Header, Footer, and 404
  consume it (404 no longer advertises removed sections or a
  hardcoded suite count)
- Crumbs.astro + PageHero crumbs prop: retires six hand-rolled
  breadcrumbs; awards, advisories, and hall-of-fame adopt PageHero,
  completing the page-opening rhythm
- Base passes lang to Header/Footer: zh-hant pages get Chinese
  navigation (second real adapter for the i18n seam)
- pruned dead exports (team, advisors, englishPosts, newsPosts,
  archivePosts, zhVariantOf); content collections untouched
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant