Files
explorer/docs/registers.md
D. Rimron-Soutter 417fd997a7 feat(registers): deep‑linkable search via ?q=; docs: add docs/ and update README
- Register Explorer:
  - Sync search input with URL query param `q` for shareable deep links
  - Initialize search from `q` on load; update URL on input; remove `q` when cleared
  - Implemented with Next.js `useSearchParams`, `useRouter`, `usePathname`
  - File: src/app/registers/RegisterBrowser.tsx

- Documentation:
  - Add docs/ hub and initial guides
    - docs/index.md (docs index)
    - docs/getting-started.md (install/dev/build/start/lint/deploy)
    - docs/architecture.md (structure, theming, styling, key paths, scripts)
    - docs/registers.md (Register Explorer overview, search, deep links, implementation notes)
  - Rewrite README.md with project overview, features, quick start, scripts, and links to docs

Notes:
- Dev server uses port 4000 (Turbopack) via package.json
- Example deep link: /registers?q=vram

Date: 2025-12-11 13:11 (Junie@lucy.xalior.com)
2025-12-11 13:11:56 +00:00

1.0 KiB
Raw Blame History

Register Explorer

Overview The Register Explorer lets you browse and search Spectrum Next registers parsed from data/nextreg.txt. Each register page shows address, access details, bit tables, and notes.

Searching

  • Use the search input to filter registers in real time.
  • The query is caseinsensitive and matches a combined search field per register (name, address, and keywords).

Deep links (query string)

  • The search box syncs with the q query parameter so searches are shareable.
  • Example: /registers?q=vram
    • When you open this URL, the search box is prefilled with vram and the list is filtered immediately.
  • Clearing the search removes q from the URL.

Implementation notes

  • Component: src/app/registers/RegisterBrowser.tsx
  • Uses Next.js navigation hooks: useSearchParams, useRouter, usePathname.
  • On mount and when the URL changes, the component reads q and updates local state.
  • On input change, the component updates state and calls router.replace() to keep the URL in sync without scrolling.