Skip to content

fix(onboarding): intake sharing saves on one tap + auto-saves on edit (43)#89

Merged
bmarshall511 merged 1 commit into
mainfrom
fix/onboarding-share-autosave
Jun 26, 2026
Merged

fix(onboarding): intake sharing saves on one tap + auto-saves on edit (43)#89
bmarshall511 merged 1 commit into
mainfrom
fix/onboarding-share-autosave

Conversation

@bmarshall511

Copy link
Copy Markdown
Contributor

Fixes the reported bug: in onboarding (e.g. Intimacy & sexuality), clicking "share with partner all" then Save didn't persist.

Root cause (diagnosed, not assumed)

Intake sharing was written only by the "Save changes" button. On a sensitive section, the bulk "share all" didn't apply on the pick — it popped an inline confirm that replaced the picker, so clicking Save without first clicking "Share it" silently dropped the choice and Save persisted the old (Private) scopes. The single-scope intake:setAnswerSharing channel existed but the form never called it.

The fix (per your two decisions)

  • One tap, no confirm — picking a scope (per-question or the bulk "share all") applies immediately. Safety is preserved by the default: a sensitive answer still starts Private, so sharing it is still a deliberate, explicit choice. Removed the pendingShare/renderConfirm machinery.
  • Auto-save on edit (sharing + answers) — a new silent autoSaveForm + a debounced (600ms) effect persists answer & sharing changes the instant they happen, on a section you've already completed (i.e. are editing). The button becomes "Done". A first-time section is unchanged — it keeps the explicit Continue (which is what marks it complete; auto-save never completes a section being filled the first time, so no premature portrait).

Verification

  • typecheck (all) + lint clean; 855 desktop unit — 3 reworked RTL tests (per-question one-tap + auto-save, bulk "share all" auto-save = the reported bug, and a guard that a first-time section does not auto-save), the two confirm tests removed.
  • E2E (decrypt-level): the existing per-question-sharing test now also re-opens the completed basics section, widens its sharing to +Sibling, and asserts it persists to the vault with no Save click.
  • Visual QA (real Electron screenshot): the section reads clean — honest explainer, one-tap sharing chips, no confirm clutter.
  • Synced spec 43 (amendment).

🤖 Generated with Claude Code

… (43)

The reported bug: on a sensitive section, "share with partner all" popped a confirm that
REPLACED the picker, so clicking Save without first clicking "Share it" silently lost the
choice; and sharing only ever persisted via the Save button.

- One tap, no confirm: applyScope/applyBulk apply directly (a sensitive answer still
  STARTS Private, so sharing is still an explicit choice). Removed pendingShare/renderConfirm.
- Auto-save on edit: a new silent autoSaveForm + a debounced effect persists answer + sharing
  changes immediately on a COMPLETED section; the button becomes "Done". First-time sections
  keep the explicit Continue (auto-save never completes a section being filled the first time).

855 desktop unit (3 reworked RTL: one-tap+auto-save per-question, bulk share-all [the bug],
first-time-doesn't-auto-save) + E2E (re-open complete basics → widen to +Sibling → persists
with no Save click). Synced spec 43.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bmarshall511 bmarshall511 merged commit 6fb1413 into main Jun 26, 2026
1 check passed
@bmarshall511 bmarshall511 deleted the fix/onboarding-share-autosave branch June 26, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant