feat(home-a): conversation-first parent home prototype (synthetic data) - #32
Draft
obvious-autobuild[bot] wants to merge 3 commits into
Draft
obvious-autobuild[bot] wants to merge 3 commits into
obvious-autobuild[bot] wants to merge 3 commits into
Conversation
Candidate A of the parent-home A/B comparison. One conversation surface owns capture (text + simulated-voice transcript through the SAME pipeline), in-thread review/edit/publish of proposed events, append-only post-publish corrections, read-only catch-up/questions with citations, and fail-closed authorization for non-members and caregivers. - in-memory journal store over the canonical v0.3 domain schemas: raw-before-events, captureId idempotency, extraction envelope (stale suppression / idempotent no-op), publish receipts with provenance, audience-filtered reads, append-only lineage - deterministic rule-based extraction double: clause splitting, per-clause child attribution, six canonical categories, numeric quantities, health content stays raw, producedBy lineage - synthetic September 2026 Polanco household (24 captures, 2 children, invited caregiver, parents-only example, Sep 12 30->60 correction) - Expo RN app: sign-in (known members + anonymous), conversation screen, proposal review cards, receipts, correction forms - 25 vitest tests: both input paths, edits before publish, publish provenance, correction lineage, read-only answers, fail-closed Co-authored-by: Gilbert Polanco <gilbertpolanco42@gmail.com>
- drop "type": "module" so Metro loads babel.config.js as CommonJS - extensionless relative imports (Metro has no .js->.ts mapping) - add react-dom + react-native-web for the Expo web demo surface Co-authored-by: Gilbert Polanco <gilbertpolanco42@gmail.com>
…s lost `this` The conversation screen passed controller.publish/controller.correct as bare method references, so invoking them from the UI ran with `this` undefined and `this.now` threw before any turn could be pushed (browser-verified: uncaught "Cannot read properties of undefined (reading 'now')"). Convert both to arrow class fields, matching the existing subscribe/getVersion pattern. Re-verified in Expo web after the fix: publish emits a receipt turn, the correction form appends lineage (before 50 min → after 60 min), catch-up and month view render, anonymous entry sees nothing and capture attempts produce a denied · fail-closed turn, and Rosa's catch-up excludes the Sep 6 parents-only entry. Gates: tsc clean, vitest 25/25. Co-authored-by: Gilbert Polanco <gilbertpolanco42@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Candidate A of the parent-home A/B comparison — DO NOT AUTO-MERGE.
Human author: Gilbert Polanco (gilbertpolanco42@gmail.com)
Acceptance criteria
pnpm turbo run typecheck&&pnpm turbo run test(plus the app's Vitest suite).Why
The parent-home A/B comparison needs two equally complete candidates to test whether a conversation surface beats a feed-first home for capture→review→correction→catch-up. Candidate A builds the conversation-first thesis end-to-end so the comparison is between real implementations, not stubs.
What changed
New self-contained workspace app
apps/home-a(@journal/home-a) — no shared code touched:src/journal/store.ts— in-memory store mirroring Convex adapter semantics: schema-decoded entries/events throughpackages/domainEffect v4 schemas, raw-before-events capture,captureIdreplay protection, stale-extraction suppression, reviewable proposals, publish receipts with provenance, append-only corrections, audience-filtered reads, citations, read-only questions, catch-up/month views, mutation counter for no-write assertions.src/conversation/controller.ts— unified text/simulated-voice routing, question detection, review/publish/correct/catch-up/month-view, per-member principal switching (publish/correct are arrow class fields so the UI can pass them as bare references).src/capture/extraction.ts— deterministic rule-based extraction double (no LLM): mixed-topic clause splitting, per-child attribution, six canonical categories + school transition, quantity/time parsing, unknown content (e.g. health) stays raw, v0.3 canonicalExtractionRequest/ExtractionResultenvelope withproducedBylineage.src/fixtures/— synthetic Polanco household + September 1–16, 2026 dataset (24 captures): Sep 2 pre-K start, Sep 5 park photo note, Sep 8 balance-bike milestone, Nana Rosa's Sep 3/10/15 notes, a parents-only entry (Sep 6), the Sep 12 nap 30→60 lineage example, and the two required mixed-topic utterances.src/ui/+ app shell — sign-in (Dana / Gilbert / Rosa / anonymous fail-closed), conversation surface, editable review cards, receipts with correction affordance, answer citations.Tradeoffs
apps/mobile, backend, domain, CI), at the price of some duplicated UI primitives; consolidation is a post-selection follow-up.Shared-change requests
None blocking. If Candidate A wins, follow-ups that would touch shared files: wire
apps/home-ainto CI's affected graph; native voice transcriber behind a device gate.Verification
All commands run against exact HEAD
0089db9483840ca1881c51a9ced522acea96949c(post-rebase):pnpm install --frozen-lockfile— cleanpnpm turbo run typecheck— 11 tasks OKpnpm turbo run test— 8 tasks OKcd apps/home-a && npx vitest run— 2 files, 25/25 passedBrowser walkthrough (Expo web, real Chromium): sign-in ×4 profiles, mixed-topic voice capture → 3 attributed review cards, read-only naps answer with 9 cited records, publish receipt, correction before 50 min → after 60 min, catch-up digest with citations, month view, anonymous fail-closed (empty thread + denied turn), Rosa's digest excluding the parents-only Sep 6 entry. Screenshots: project files
home-a tc-1..tc-11(details in the evidence artifact). The walkthrough also caught and fixed a real defect unit tests missed: bare method references lostthis(reading 'now'TypeError) — fixed in0089db9.🔗 Obvious Project · 🧵 Obvious Thread