- 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)
1.0 KiB
1.0 KiB
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 case‑insensitive and matches a combined
searchfield per register (name, address, and keywords).
Deep links (query string)
- The search box syncs with the
qquery parameter so searches are shareable. - Example:
/registers?q=vram- When you open this URL, the search box is pre‑filled with
vramand the list is filtered immediately.
- When you open this URL, the search box is pre‑filled with
- Clearing the search removes
qfrom 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
qand updates local state. - On input change, the component updates state and calls
router.replace()to keep the URL in sync without scrolling.