fix(onboarding): persist sharing for unanswered questions + save on click (43)#93
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
basicssection 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 (
answerSharingcomes back empty), proving the bug before any change.Root causes + fix
submitSectionFormonly wroteanswerSharingfor 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 ∪ thesharingpayload). 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.saveScopesNow); only answer typing stays debounced.Verification
🤖 Generated with Claude Code