refactor: split Finder into NameCard/Wishlist/AiControls + useOtmSession/useWishlist hooks + availability-client (v0.4.1)

Pure code motion; Finder.tsx 754 → 347 lines. No behavior change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XStQKxPfEjrTvWo83KFCxG
This commit is contained in:
2026-08-16 22:28:46 -05:00
parent d7e3a4cd8e
commit 575feb7bdd
10 changed files with 587 additions and 451 deletions

View File

@@ -88,6 +88,14 @@ bare unstyled button (issue #2). Tailwind is configured with `preflight: false`
scoped to `.wrap`, and the widget mounts *outside* `.wrap`, so neither side can
restyle the other. Keep it that way when adding global CSS.
## Client layout
`components/Finder.tsx` is orchestration only (inputs → generate → lookup).
Cards are `NameCard.tsx`, the Saved panel `Wishlist.tsx`, the AI switch
`AiControls.tsx`; session and shortlist state are `hooks/useOtmSession.ts` and
`hooks/useWishlist.ts`; the availability result shape + batch fetch is
`lib/availability-client.ts`. Add UI to the piece it belongs to, not to Finder.
## Wishlist is browser-only
`src/lib/wishlist.ts``localStorage` key `names.wishlist`, capped at 60. It