fix(client): People and Organizations detail screens open in edit mode (should be read-mode by default) #371
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
james/carol#371
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 render every child section's add-form inline and always-visible — contacts, organizations, relatives, met-through, notes (person) and links, key-people (org). So the screen opens as one long edit form, unlike every other entity, which opens in a clean read view and reveals an add/edit form only on demand.The "basics" card on both screens already does the right thing (
editingBasicsdefaults to false → read view + Edit button). The child sections don't follow suit.Expected (matches
profile.tsx)profile.tsxgates its contacts add-form behind aneditingtoggle ({editing && (…)}): read view by default, form revealed on demand. The network detail screens should match — open in read mode.Fix
For each child section in both screens, gate the add-form behind an "Add …" affordance:
adding<Section>boolean is the simplest gate. Reuse existing i18n for the open-button label (the section'saddButtonstring) andcommon.{add,cancel}for the form's submit/cancel — no new strings needed beyond an icon.Out of scope
Verify
pnpm -F @carol/client typecheck/lint/test; semgrep on the two screens. Visual read-vs-add behavior is maintainer-verified (client tests are node-env).