Repository navigation
Add local print summaries and include results in AI-drafted forms - #578
Merged
Merged
Conversation
prestoncabe
force-pushed
the
557-print-summary-and-ai-drafts
branch
from
October 27, 2026 17:17
bc7d469 to
2880ef7
Compare
Mobile browsers return from window.print() before taking the print snapshot, so cleaning up right after the call printed a blank page or the person's answers. Clean up on afterprint, or when the print media query stops matching, and replace any tree a browser left behind. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Analyst Markdown can link to mailto: and tel: destinations, which printed as bare link text. Print the address or number after the link, unless the link text already shows it, as the help phone's does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A bare URL in analyst Markdown printed as "https://x (https://x)". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The printout used the first Next steps component in the schema, even when a condition hid it, so it could show different content and timing than the screen. Rendered Next steps fields now report their IDs, and the printout skips any that are hidden. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PrintSummary reused Text's create, so dragging it from the palette added text: "# Text" to the saved, published and exported schema. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI drafts left these benefits out of benefitContent, so the editor said
no content was copied for them. A Next steps component placed by hand
copies them as {}, and only flags content that was never copied, such
as a benefit that failed to load. Both paths now follow that rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The editor skipped key assignment for a hand-kept list of types, so new text, spacer, separator, image and other display fields were saved with key = id. AI draft validation kept two more copies of the list. Check each field type's keyed config instead, which also removes the "print_summary" string literals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Renaming a screener fired screeningResults.changed and re-rendered every results field and subscriber, although no results changed, and the editor passed a name it never used. The name now has its own accessor on the service, which the print summary reads when printing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
appendResultsComponents cast form.path("components") to ArrayNode, which
would throw ClassCastException if the array were ever missing. The broad
catch turned that into a generic 503 for every AI draft.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
prestoncabe
force-pushed
the
557-print-summary-and-ai-drafts
branch
from
October 27, 2026 20:37
2880ef7 to
a7467ba
Compare
prestoncabe
marked this pull request as ready for review
October 27, 2026 20:45
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.
Screeners can include a Print summary component that opens the browser's Print / Save as PDF dialog. It prints the screener name, date, benefit decisions, unmet requirements, and copied Next steps instructions. Printing stays on the device and excludes answers.
Closes #557. Closes #558. Fifth PR for #552, following #576.
The printout shares the Next steps renderer and uses the first visible Next steps component in schema order, including nested groups. Hidden components are skipped, and
whenDecided/whenCompleteis respected. Without a visible component, it prints decisions and unmet requirements without application instructions. Web addresses, email addresses, and phone numbers are added beside link text only when the text does not already show the destination. Markdown images are omitted.The print stylesheet hides the rest of the page. The temporary print tree stays available until
afterprintor print-media exit, supporting browsers whose print dialog returns asynchronously. It is also removed on navigation or a print error, and replaced on retry if the browser omitted its completion event. Printing is disabled for editor samples and stale or failed evaluations; click handlers recheck the latest result state.AI drafts append Next steps (
whenDecided) and Print summary server-side after the questions. Content is copied from configured benefits after generation; the model does not receive or generate application instructions, URLs, or contacts. Benefits without content copy as empty objects consistently with manually inserted components, and the editor warns about both missing and empty copies. Only answer-storing fields receive keys, and required answer bindings remain validated after draft import.Validation:
git diff --checkpassed.