Commit History
-
Improve diagram layout, relationship correctness and validation; patch dependencies Running
DONG-WEI-YANG6ec5c72
-
chore(lint): add ESLint, fix mechanical violations, remove dead code
DONG-WEI-YANG +1: Claude Sonnet 5No lint tooling existed in this project at all. Added ESLint 9 flat config (eslint.config.js) with typescript-eslint, eslint-plugin-react, and only the two classic eslint-plugin-react-hooks rules (rules-of-hooks, exhaustive-deps) rather than its full v7 "recommended" preset — that preset bundles the entire React Compiler rule set (set-state-in-effect, immutability, purity, etc.) as errors, which flags common existing patterns (e.g. syncing a tRPC query's error into local state via useEffect) that are safe today since this codebase doesn't use the Compiler. Adopting those is a deliberate future decision, not a side effect of adding lint tooling. `npm run lint` / `lint:fix` added. Ran eslint --fix for the mechanically-safe violations (useless escapes, useless try/catch, prefer-const, unused eslint-disable directives), then fixed the rest by hand: - target="_blank" without rel="noreferrer" on 3 external links (Home.tsx, Privacy.tsx x2) — real reverse-tabnabbing risk in older browsers.…01fbb71
-
feat: family-unit-aware layoutGenogram with backward-compatible signature
DONG-WEI-YANG +1: Claude Sonnet 4.6Rewrites layoutGenogram() to accept an optional relationships parameter. When provided, couples are placed side-by-side (male left, female right) and children are centered below their parents' midpoint per McGoldrick standard. Old simple row-based layout is preserved as layoutGenogramSimple() and used as fallback when no relationships are given, keeping all existing callers intact. Adds 4 new tests covering couple placement, child centering, three generations, and no-relationships fallback (11/11 autoLayout tests passing). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a90b098 -
feat: add buildFamilyUnits(), FamilyUnit, LayoutRelationship types with tests
DONG-WEI-YANG +1: Claude Sonnet 4.6Extends LayoutMember with optional gender/is_client fields. Exports LayoutRelationship and FamilyUnit interfaces. buildFamilyUnits() groups members into couple/single-parent family units, deduplicates children linked by both parents, handles divorced/separated/partner couple types, and sorts children by birth_year. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>938f2c5
-
feat: complete McGoldrick-Gerson genogram + Hartman ecomap standard compliance
DONG-WEI-YANG +1: Claude Opus 4.6 (1M context)Genogram — new relationship qualities: - close_conflicted: double parallel line + zigzag overlay (親密衝突) - fused_hostile: triple parallel line + zigzag overlay (融合敵對) Genogram — new relationship types: - adopted: dashed line (收養) - foster: dotted line (寄養) - identical_twin / fraternal_twin: twin relationship types (雙胞胎) Genogram — new health type: - substance_abuse: dark amber color (物質濫用/酗酒/藥物成癮) Genogram — special member symbols: - pregnancy: small triangle, light blue (懷孕) - miscarriage: small triangle with X (流產) - stillbirth: small triangle with X, gray (死產) Genogram — layout: - autoLayout now sorts siblings by birth_year (oldest on left per standard) Ecomap — new system types: - recreation: emerald, musical note icon (休閒) - transportation: sky blue, bus icon (交通) - other: stone, asterisk icon (自訂) Ecomap — new flow option: - none: no arrows drawn (無流動) All Zod schemas, AI prompts, coercion enums, and offline extractor updated to match new types across 8 files. Co-Authored-…0aaeec3
-
feat: AI voice-to-structured-data for social worker records
DONG-WEI-YANG +1: Claude Opus 4.6 (1M context)Add HF Inference API client with Zod validation and retry, social worker system prompt and output schemas, AI tRPC router with structureFromVoice/supplementGenogram/supplementEcomap endpoints, auto-layout utilities for genogram and ecomap, and full frontend integration with AI fill button and supplement recording UI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>ade6ae8