Skip to content

Send saved next steps to connected CRM hosts - #579

Merged
prestoncabe merged 12 commits into
mainfrom
559-crm-next-steps
Oct 27, 2026
Merged

prestoncabe merged 12 commits into
mainfrom
559-crm-next-steps

Conversation

@prestoncabe

@prestoncabe prestoncabe commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Connected CRM hosts receive optional structured nextSteps with successful result messages. Screen, print, and CRM content share a projection of the saved screener copy, so application instructions and failed-check names stay consistent.

Closes #559. Sixth PR for #552, following #578.

This is an additive extension to protocol version 1, supported in object and JSON message modes. Only decided benefits are exported. Eligible entries include validated application/help links, a contact number, and Markdown instructions; ineligible entries include named unmet requirements and a Markdown note. No visible component omits the extension; whenComplete sends an empty object until every benefit is decided. Each new snapshot replaces previous instructions. A malformed optional extension is dropped without losing the decisions.

Print and CRM choose the first component whose own and ancestor conditions show it, using form-js's current expression context. Selection covers repeated scopes and dynamic lists with repetition disabled, and remains available during re-imports. Standalone screeners skip CRM projection. Existing stale-response and disconnection protections remain in force.

The browser and Salesforce examples save on the explicit Save action, render Markdown as text, omit empty sections, validate saved links with a shared adapter helper, and read older snapshots. Salesforce saves decisions without next steps when the optional instructions exceed its configured field size, and reports that omission. CRM example tests now run through devbox run test -- examples and in CI.

Validation:

  • All 314 frontend tests passed locally, including non-repeating group selection, visibility changes, projection consistency, and adapter compatibility.
  • Production frontend build passed.
  • All 12 public Playwright tests passed locally: iframe/popup, object/JSON messages, persistence, hidden-content clearing, absent components, display settings, and printing.
  • All 10 example tests passed through the shared runner.
  • All six CI checks passed on the rebased, reviewed commit: frontend, builder API, library API, examples, documentation, and end-to-end (25 browser tests).
  • git diff --check passed.

prestoncabe and others added 12 commits October 27, 2026 18:05
The optional field gated the required message, so a null or array
nextSteps left the CRM waiting with no result or error.

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

Adding nextSteps could push a snapshot that used to fit past the
131072-character field, and then nothing was saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed check with a blank alias and no name became null in the
string array sent to the host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The field and the CRM export each chose outcome content, links,
phone and unmet requirements, so they could drift and send hosts
instructions the person never saw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Print and the CRM export found the visible component through fields
that had mounted, so an export read before form-js repainted saw the
previous answers, and Screener had to read it before setting results.
They now evaluate hide conditions the way form-js does, including
groups and repeated items.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Standalone screeners projected every evaluation and threw it away.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Eligible benefits got an empty list that screen readers announced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A benefit with no usable copy showed an empty labeled region, and an
empty list when ineligible, unlike the Salesforce example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The example tests, including the new Salesforce URL and outcome
checks, ran only by hand, so regressions passed devbox run test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both example hosts hand-wrote a looser HTTP(S) check than the
screener's. host.js now exports safeHttpUrl, which both hosts use,
and a test keeps it in step with normalizeHttpUrl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@prestoncabe
prestoncabe marked this pull request as ready for review October 27, 2026 22:13
@prestoncabe
prestoncabe merged commit 38b2f35 into main Oct 27, 2026
6 checks passed
@prestoncabe
prestoncabe deleted the 559-crm-next-steps branch October 27, 2026 22:14
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.

Send next steps to connected CRM hosts

1 participant