Skip to content

fix(onboarding): persist sharing for unanswered questions + save on click (43)#93

Merged
bmarshall511 merged 1 commit into
mainfrom
fix/intimacy-sharing-instant-save
Jun 27, 2026
Merged

fix(onboarding): persist sharing for unanswered questions + save on click (43)#93
bmarshall511 merged 1 commit into
mainfrom
fix/intimacy-sharing-instant-save

Conversation

@bmarshall511

Copy link
Copy Markdown
Contributor

The screenshot bug, root-caused and reproduced this time.

What you hit

On a fresh intimacy section, opening "Sharing for this section" and clicking Partner saved nothing. My two earlier fixes both tested the basics section with an answer already present — they never exercised the 18+-gated intimacy section or the share-before-answer path, which is exactly your screenshot.

Reproduced first (decrypt-level)

A new E2E drives the exact path — fresh intimacy section, ack 18+, open section sharing → Partner, nothing answered — then reads the encrypted vault. It fails on the current build (answerSharing comes back empty), proving the bug before any change.

Root causes + fix

  1. submitSectionForm only wrote answerSharing for ANSWERED questions. So clicking "share with Partner" before filling anything in persisted nothing. Now it persists a scope for every question the renderer explicitly scopes (answered ∪ the sharing payload). Safe: an unanswered question has no derived fact, so the scope shares nothing until it's answered — at which point your pre-set choice (Partner) is honored instead of reverting to the default.
  2. 600ms debounce isn't "right away." A sharing change now saves immediately on the click (saveScopesNow); only answer typing stays debounced.

Verification

  • New screenshot-repro E2E (fresh intimacy section → share Partner with nothing answered → every question's scope persists to the vault): fails on current code, passes here.
  • The first-time + edit-a-completed-section + intimacy-conditionals E2Es still green.
  • typecheck (all) + lint clean; 940 core + 855 desktop unit (+ a core test: persists a scope for an unanswered question without inventing an answer).
  • Re-amended spec 43.

🤖 Generated with Claude Code

…lick (43)

The screenshot bug: on a fresh intimacy section, clicking "share with Partner" on the
whole section saved nothing. Reproduced with a decrypt E2E driving that exact path
(fresh 18+ section, share before answering) — answerSharing came back empty.

Root cause: submitSectionForm wrote answerSharing for ANSWERED questions only, so a
share-before-answer persisted nothing. Now it persists a scope for every question the
renderer explicitly scopes (answered union the sharing payload) — safe, since an
unanswered question has no derived fact until it's answered, when the pre-set choice is
honored. Also: a sharing change now saves IMMEDIATELY (saveScopesNow on the click), not
on the ~600ms debounce; only answer typing stays debounced.

940 core + 855 desktop unit (+core: persists a scope for an unanswered question) + the
screenshot-repro E2E (fresh intimacy section, share Partner, nothing answered -> every
scope persists). Re-amended spec 43.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bmarshall511 bmarshall511 merged commit e44cf54 into main Jun 27, 2026
1 check passed
@bmarshall511 bmarshall511 deleted the fix/intimacy-sharing-instant-save branch June 27, 2026 00:14
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