Skip to content

Add a configurable Next steps screener component - #576

Draft
prestoncabe wants to merge 14 commits into
mainfrom
556-next-steps-component
Draft

prestoncabe wants to merge 14 commits into
mainfrom
556-next-steps-component

Conversation

@prestoncabe

@prestoncabe prestoncabe commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Screeners can now include a Next steps form component. It shows application instructions and contacts for eligible benefits, unmet requirements and an analyst note for ineligible benefits, and the benefits that still need more information. Analysts can show decisions as they arrive or wait until every benefit is decided.

Closes #556. Fourth PR for #552, following #574. Print summary and AI draft integration follow in #557 and #558.

The component copies benefit content into its own schema configuration on insertion. A modal lets analysts edit that screener's copy or reset an individual benefit from its source. Missing copies are flagged, removed benefits are ignored, and importing a schema preserves its saved content. Publishing uses the existing form-schema snapshot; public viewers do not fetch working benefit content.

Publishing preserves benefit IDs in the published subcollection so evaluation results match the schema's copied content. Screener transfers and example imports remap those content keys when allocating new benefit IDs, preserving analyst edits.

Markdown is sanitized without template evaluation, web links open in a new tab, and pending or failed evaluations suppress stale instructions. Forms with this component use its progress heading. Existing forms without it retain the legacy completion message, so previously published screeners keep their behavior.

Validation:

  • All 270 frontend tests passed across 45 files; the final source-load adjustment also passed all 12 editor tests.
  • Production frontend build passed.
  • All 227 builder API tests passed, including the nested component import regression.
  • Both public-screening Playwright tests passed locally, covering display modes, partial completion, eligibility changes, safe Markdown, pending evaluations, and failures.
  • Verified the viewer layout, content modal, and properties-panel edits in Chromium.
  • Authenticated end-to-end coverage passed in CI for copying, editing, resetting, saving, publishing content, and matching published benefit IDs.
  • All five CI checks passed: frontend, builder API, library API, end-to-end, and documentation.
  • git diff --check passed; branch rebased onto current main.

prestoncabe and others added 14 commits October 22, 2026 17:56
A leftover document from a failed delete made create() throw
ALREADY_EXISTS partway through publishing, leaving the published
screener with only some of its benefits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Saving rebuilt the editor's benefit, so the keyed Show remounted it
mid-save: the saved status never appeared and focus was lost.
Remount only for another benefit or a reset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Switching benefits, resetting, closing or pressing Escape in the
next steps modal silently dropped edits that hadn't been saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Next steps field hidden by a condition still suppressed the
page's completion message, so respondents saw no completion signal.
Fields now report whether they are rendered, and the page drops its
message only while one is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replacing the page's role="status" completion message with a plain
heading meant screen readers no longer heard that screening was
complete. Keep a live region in the field that announces it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The properties panel checked component content against the benefits
that loaded, so a benefit whose fetch failed was never flagged even
though the content modal reported it. Check against the screener's
benefits instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Links other than http(s) lost their href, so mailto: and tel: links
analysts wrote showed as plain text. They now stay clickable without
opening a new tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The canvas and Save waited for one request per benefit on every
visit to the Form Editor, and any benefit change refetched them all.
Load content in the background, fetch each benefit once, and fill
Next steps components added before it arrived.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The viewer's webLink re-implemented the editor's http(s) check and
had drifted: it skipped the hostname rules, so it showed links the
editor would refuse to save. Move normalizeHttpUrl to a shared util
and build webLink on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Switch shows its Saving branch first, so isSaving() is always
false in the other two branches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Now that the editor stays mounted through a save, its "Next steps
saved." status appeared next to the modal's own. Keep the modal's
message, which says the form still needs saving.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

Add a Next steps screener component

1 participant