Skip to content

Hide questions no remaining benefit needs - #506

Merged
prestoncabe merged 3 commits into
mainfrom
503-eligibility-checks-should-vote-for-questions-on-the-form
Sep 22, 2026
Merged

prestoncabe merged 3 commits into
mainfrom
503-eligibility-checks-should-vote-for-questions-on-the-form

Conversation

@prestoncabe

@prestoncabe prestoncabe commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #503 (though the strategy has been altered a bit from the initial idea)

Summary

  • include each eligibility check input path in screener evaluation results and use benefit votes to hide questions only when every interested benefit is ineligible
  • provide one persistent show/hide toggle for unneeded questions in preview and published screeners
  • preserve live form data when visibility changes re-import the schema, avoiding stale answers during debounced evaluation
  • format eligibility check aliases consistently with Manage Benefits
  • preserve boolean yes/no values across form re-imports

Testing

  • builder frontend: 56 tests passed
  • builder API: 113 tests passed
  • builder frontend production build passed

@prestoncabe prestoncabe linked an issue Sep 22, 2026 that may be closed by this pull request
prestoncabe and others added 3 commits September 21, 2026 22:03
Hiding was opted out of per ineligible benefit, and every evaluation
reset that opt-out. A benefit with two unanswered questions re-hid them
after the first answer was submitted, so the user had to reopen it for
each field. The per-benefit button was also offered whenever a benefit
was ineligible, even when another benefit still voted for its questions
and nothing was hidden.

Replace it with a single showAllQuestions toggle that only the user
writes. The form now ends with a notice counting the questions no
remaining benefit needs; once shown, they stay visible through every
re-evaluation until the user toggles back.

Also preserve the live form state across a schema re-import. The
re-import restored the last submitted data, so answers typed while a
debounced submit was in flight were silently dropped from the form
while the pending submit still sent them to the server.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@prestoncabe
prestoncabe force-pushed the 503-eligibility-checks-should-vote-for-questions-on-the-form branch from 16fedbd to c02c6f1 Compare September 22, 2026 15:33
@prestoncabe
prestoncabe merged commit 49f2370 into main Sep 22, 2026
4 checks passed
@prestoncabe
prestoncabe deleted the 503-eligibility-checks-should-vote-for-questions-on-the-form branch September 22, 2026 15:42
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.

Eligibility checks should "vote" for questions on the form

1 participant