Restore Copy from Spouse CTA on freshly created clients #70

Merged
parkerhdavis merged 1 commit from fix-copy-from-spouse-cta into main 2026-06-16 15:11:20 -06:00
parkerhdavis commented 2026-06-16 15:11:14 -06:00 (Migrated from github.com)

Problem

Creating a new client no longer surfaced the Copy from Spouse CTA on the fresh Client Hub workspace.

Cause

The CTA is gated on the isFreshWorkspace flag in ClientsHub.tsx, which still required !lilyFile.questionnaire_id. That was a valid "brand-new client" signal when the CTA was added (#53), because clients were created without a questionnaire stamped.

#63 ("Replace global active questionnaire with point-of-use selection") changed the Create Client flow to pre-select a questionnaire and stamp its questionnaire_id onto the .lily at creation. From then on every new client immediately had a questionnaire_id, so isFreshWorkspace was always false and the CTA never appeared.

Fix

Drop the obsolete questionnaire_id condition. The remaining checks — no documents, no contacts, no variables, no required documents — correctly identify an empty, just-created client. create_lily_file populates nothing but the questionnaire fields, so those conditions still hold for a fresh client.

Verification

make typecheck, make lint, and make test (96 passed) all pass.

## Problem Creating a new client no longer surfaced the **Copy from Spouse** CTA on the fresh Client Hub workspace. ## Cause The CTA is gated on the `isFreshWorkspace` flag in `ClientsHub.tsx`, which still required `!lilyFile.questionnaire_id`. That was a valid "brand-new client" signal when the CTA was added (#53), because clients were created without a questionnaire stamped. #63 ("Replace global active questionnaire with point-of-use selection") changed the Create Client flow to pre-select a questionnaire and stamp its `questionnaire_id` onto the `.lily` at creation. From then on every new client immediately had a `questionnaire_id`, so `isFreshWorkspace` was always false and the CTA never appeared. ## Fix Drop the obsolete `questionnaire_id` condition. The remaining checks — no documents, no contacts, no variables, no required documents — correctly identify an empty, just-created client. `create_lily_file` populates nothing but the questionnaire fields, so those conditions still hold for a fresh client. ## Verification `make typecheck`, `make lint`, and `make test` (96 passed) all pass.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
parker/lily!70
No description provided.