세션 청소 — 버그 수정, dedupe, 죽은 코드

Refactorkamolos
Shipped
2026년 5월 16일 오후 11:43 UTC
Author
Kamo
Commit
e5762d9

Three-agent review surfaced real problems and copy-paste — addressing them: Bug fixes: - useEnsurePrimaryBorrower returned dead state (primaryUid, creating) and double-fetched the app (createPair + explicit refetch). Now returns just the ensure() function and reads the new BorrowerPair off the mutation result; useCreatePair's onSuccess keeps the cache fresh. - Six waypoints that wrote through mortgageAppsApi directly were missing the cache invalidation that the existing React Query hooks do automatically. Added qc.invalidateQueries({ queryKey: ['mortgageApp', uid] }) after every direct write; property-cards already used usePatchProperty so it was fine. - Sequential awaits in connect-first flows: startConn vs ensure()+borrower writes are independent. Now Promise.all'd in front-door, paystub-clipboard, bank-vault, credit-ledger. Dedupe: - New <StatusBanner tone="success|warn"> in lib/world/sheet/ replaces 24 copy-pasted teal/amber banner divs across 11 waypoints (driven by a Python sweep — verified output is identical). - 8 ceremony scene files (Ceremony*.tsx) collapsed into descriptor data on the registry; CeremonyClient renders the Ceremony primitive directly. Deleted lib/world/ceremony/scenes/ + the unused CeremonyStage.tsx. - Magic asset/liability type ids extracted to lib/los/urla-type-ids.ts. Dead code / stringly-typed: - Removed unused homeState/persona override props from JourneyShell, WorldShell, MobileCrest — no consumer ever passed them. Shells now just call useHomeState/usePersona once. - usePersona's hand-rolled persona Set replaced with PERSONAS_IN_ORDER (single source of truth — drift risk gone). - app/page.tsx now uses useAppUid instead of re-implementing the searchParams + onboarding-store lookup inline. - app/waypoints/[id]/page.tsx now returns notFound() instead of a stale M1 placeholder sheet (all 14 real slugs have static routes). Perf: - WorldScene wrapped in React.memo so r3f Canvas doesn't reconcile when unrelated parent state changes. Net: −300 lines in code we wrote, +1 reusable component, +1 constants file, 0 behavior regressions. tsc clean, 137 tests pass, build green.

All changes

배송을 보는 것과 같이?

작업 공간의 모든 업데이트 땅은 자동으로. 일주일 후 무료로 시청하십시오.

무료 영원히 시작가격 비교