fix(client): open People & Organizations detail screens in read mode (#371) #372
No reviewers
Labels
No labels
area:auth
area:ci
area:db
area:infra
area:native
area:pwa
area:service
epic
feature
foundation
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
james/carol!372
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "371-network-read-mode"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Person (
network/[id].tsx) and Organization (network/orgs/[id].tsx) detail screens rendered every child section's add-form inline and always-visible, so they opened as one long edit form — unlike every other entity, which opens in a clean read view and reveals a form on demand. The basics card already did the right thing; the child sections didn't.Fix
Gate each child section's add-form behind a per-section
adding…toggle (matchingprofile.tsx's{editing && …}read-by-default pattern):Plus, matching the existingPencilicon idiom). Tapping it reveals the existing add-form (inputs + submit + Cancel); a successful add — or Cancel — collapses it back. On the org screen, Cancel also clears that section's error banner so a reopen starts clean.common.{add,cancel}for submit/cancel — no new strings. Lists, empty states, per-row deletes, and the basics card are unchanged.Verification (local, re-run in the worktree)
typecheck✓ ·lint✓ ·test✓ 172 · semgrep ✓ 0 findings on both screens⚠️ Needs maintainer verification
Client tests are
node-env — the read-vs-add collapse/expand and the Plus-icon affordance need an eye in the running app.Closes #371
🤖 Generated with Claude Code
Both network detail screens rendered every child section's add-form inline and always-visible, so they opened as one long edit form — unlike every other entity. Gate each section's add-form behind a per-section "adding" toggle (matching profile.tsx's read-by-default pattern). - Person: contacts, organizations, relatives, met-through, notes. - Org: links, key people. - Read (default): the list + a single "Add <thing>" button (Plus icon). Tapping it reveals the existing form (inputs + submit + Cancel); a successful add — or Cancel — collapses it back. Org Cancel also clears the section's error banner so a reopen starts clean. - Reuses existing section i18n + common.{add,cancel}; no new strings. Lists, empty states, per-row deletes, and the basics card unchanged. Closes #371 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>📊 Test coverage
Patch coverage: no testable lines changed.
Overall (
app/,lib/,db/, excluding UI per ADR-0019):Soft thresholds per ADR-0019. Coverage is informational and does not block merge.