Skip to content

feat(davinci-client): add BooleanCollector and refactor ReadOnlyCollector/AgreementCollector#697

Open
ancheetah wants to merge 1 commit into
mainfrom
SDKS-5174-update-collectors
Open

feat(davinci-client): add BooleanCollector and refactor ReadOnlyCollector/AgreementCollector#697
ancheetah wants to merge 1 commit into
mainfrom
SDKS-5174-update-collectors

Conversation

@ancheetah

@ancheetah ancheetah commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

JIRA Ticket

https://pingidentity.atlassian.net/browse/SDKS-5174

Description

What

Adds a BooleanCollector for non-required SINGLE_CHECKBOX fields, removing the need to use ValidatedBooleanCollector when no validation is needed. Also consolidates AgreementCollector into ReadOnlyCollector by adding an optional title field, eliminating a redundant collector type.

Why

SINGLE_CHECKBOX fields without required: true were incorrectly mapped to ValidatedBooleanCollector, implying validation constraints that don't exist. Separately, AgreementCollector was a one-off type with bespoke output shape that duplicated ReadOnlyCollector's responsibility — agreement content is read-only display text with an optional title.

Changes

  • New BooleanCollector typeSINGLE_CHECKBOX fields with required: false now produce a BooleanCollector instead of ValidatedBooleanCollector; the node reducer branches on required to pick the correct collector
  • AgreementCollector removedAGREEMENT fields are now handled by returnReadOnlyCollector, which conditionally sets title when titleEnabled is true; ReadOnlyCollector gains an optional title?: string output property
  • returnAgreementCollector deleted — its logic folded into returnReadOnlyCollector; AGREEMENT field type added to the LABEL branch in node.reducer.ts
  • New ValidatedCollectors union type — extracted from the inline Validator<T> default, now used as a proper constraint (T extends ValidatedCollectors)
  • E2E appagreement.ts and label.ts components deleted; replaced by a unified read-only.ts that handles ReadOnlyCollector (with optional title) and RichTextCollector; main.ts updated to route both BooleanCollector and ValidatedBooleanCollector through the same boolean component
  • API reports updated to reflect all type additions and removals
  • Tests — added returnBooleanCollector unit tests, updated agreement collector tests to assert ReadOnlyCollector output, added a full BooleanCollector describe block in node.reducer.test.ts, and fixed ValidatedBooleanCollector test fixtures to use required: true

Summary by CodeRabbit

Release Notes

  • New Features

    • Added support for unvalidated boolean collectors in addition to validated variants.
    • Read-only outputs (including agreements) now support an optional title.
  • Changes / Bug Fixes

    • Checkbox boolean updates now follow the correct validated vs non-validated behavior.
    • E2E form rendering updated to use the unified read-only rendering and consolidated boolean handling.
  • Type Updates

    • Public collector/type surface updated: agreement collectors replaced by read-only output; new boolean collector added.
    • required for single-checkbox and title for agreement fields are now optional.

@changeset-bot

changeset-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 429e218

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes changesets to release 12 packages
Name Type
@forgerock/davinci-client Minor
@forgerock/device-client Minor
@forgerock/journey-client Minor
@forgerock/oidc-client Minor
@forgerock/protect Minor
@forgerock/sdk-types Minor
@forgerock/sdk-utilities Minor
@forgerock/iframe-manager Minor
@forgerock/sdk-logger Minor
@forgerock/sdk-oidc Minor
@forgerock/sdk-request-middleware Minor
@forgerock/storage Minor

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@ancheetah, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 52 minutes and 26 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dc83e46c-2243-40aa-9c91-f7494cc24bcf

📥 Commits

Reviewing files that changed from the base of the PR and between ae4d00f and 429e218.

📒 Files selected for processing (19)
  • .changeset/silent-ideas-joke.md
  • .changeset/single-checkbox.md
  • e2e/davinci-app/components/agreement.ts
  • e2e/davinci-app/components/boolean.ts
  • e2e/davinci-app/components/label.ts
  • e2e/davinci-app/components/read-only.ts
  • e2e/davinci-app/main.ts
  • packages/davinci-client/api-report/davinci-client.api.md
  • packages/davinci-client/api-report/davinci-client.types.api.md
  • packages/davinci-client/src/lib/client.types.ts
  • packages/davinci-client/src/lib/collector.types.test-d.ts
  • packages/davinci-client/src/lib/collector.types.ts
  • packages/davinci-client/src/lib/collector.utils.test.ts
  • packages/davinci-client/src/lib/collector.utils.ts
  • packages/davinci-client/src/lib/davinci.types.ts
  • packages/davinci-client/src/lib/node.reducer.test.ts
  • packages/davinci-client/src/lib/node.reducer.ts
  • packages/davinci-client/src/lib/node.types.test-d.ts
  • packages/davinci-client/src/lib/node.types.ts
📝 Walkthrough

Walkthrough

AgreementCollector is removed from the collector type system and replaced by extending ReadOnlyCollector with an optional title field. A new BooleanCollector is added for non-required SINGLE_CHECKBOX fields, while ValidatedBooleanCollector is retained for required ones. The node reducer, factory utilities, e2e rendering components, type-level tests, and generated API reports are all updated to reflect these changes.

Changes

Collector type system and e2e rendering refactor

Layer / File(s) Summary
Collector type contracts
packages/davinci-client/src/lib/collector.types.ts, packages/davinci-client/src/lib/davinci.types.ts
Removes AgreementCollector interface and updates NoValueCollectorTypes/InferNoValueCollectorType/NoValueCollectors unions to drop it; adds BooleanCollector interface and wires it into SingleValueCollectorTypes/InferSingleValueCollectorType/SingleValueCollectors; adds optional title?: string to ReadOnlyCollector.output; makes AgreementField.title and SingleCheckboxField.required optional.
Client type system
packages/davinci-client/src/lib/client.types.ts
Introduces ValidatedCollectors union type alias and updates Validator generic default to reference it; broadens CollectorValueType boolean branch to include both BooleanCollector and ValidatedBooleanCollector; adds JSDoc and inline comments clarifying updater constraints.
Collectors union
packages/davinci-client/src/lib/node.types.ts, packages/davinci-client/src/lib/node.types.test-d.ts
Updates exported Collectors union to include BooleanCollector and remove AgreementCollector; updates import list and type-level test assertions accordingly.
Collector factories
packages/davinci-client/src/lib/collector.utils.ts
Adds returnBooleanCollector factory delegating to returnSingleValueCollector with appearance and normalized richContent.replacements; extends returnReadOnlyCollector to accept both ReadOnlyField and AgreementField with conditional title output; removes standalone returnAgreementCollector.
Node reducer routing
packages/davinci-client/src/lib/node.reducer.ts
Routes LABEL and AGREEMENT fields to returnReadOnlyCollector; selects returnBooleanCollector vs returnValidatedBooleanCollector for SINGLE_CHECKBOX based on field.required; broadens node/update boolean assignment to cover both BooleanCollector and ValidatedBooleanCollector.
Type-level and collector utility tests
packages/davinci-client/src/lib/collector.types.test-d.ts, packages/davinci-client/src/lib/collector.utils.test.ts
Replaces AgreementCollector type test with ReadOnlyCollector assertion for AGREEMENT; adds returnBooleanCollector test suite covering structure, appearance propagation, and richContent normalization; migrates agreement tests from returnAgreementCollector to returnReadOnlyCollector.
Node reducer tests
packages/davinci-client/src/lib/node.reducer.test.ts
Updates AGREEMENT expectation to ReadOnlyCollector with conditional title; sets ValidatedBooleanCollector test fixtures to required: true with required validation rule; adds BooleanCollector describe block covering creation, value updates, and richContent.replacements normalization.
Generated API reports
packages/davinci-client/api-report/davinci-client.api.md, packages/davinci-client/api-report/davinci-client.types.api.md
Reflects all public surface changes: removes AgreementCollector, adds BooleanCollector interface, updates Collectors/CollectorValueType/NoValueCollectors/SingleValueCollectorTypes/ValidatedCollectors/Validator, adds title to ReadOnlyCollector, adjusts field optionality, and refines RTK Query cache error field typing.
E2e rendering components
e2e/davinci-app/components/read-only.ts, e2e/davinci-app/components/boolean.ts, e2e/davinci-app/main.ts
Removes label.ts and agreement.ts; introduces read-only.ts rendering ReadOnlyCollector with optional <h3> title and RichTextCollector with richContentInterpolation fallback; widens booleanComponent to handle both collector types with early-return path for BooleanCollector; merges boolean rendering into single renderForm branch.
Changeset notes
.changeset/silent-ideas-joke.md, .changeset/single-checkbox.md
Updates descriptions to reference ReadOnlyCollector with title for agreement support and BooleanCollector for non-required single-checkbox fields.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • ForgeRock/ping-javascript-sdk#579: This PR directly supersedes and replaces the AgreementCollector/returnAgreementCollector additions from that PR, consolidating agreement handling into ReadOnlyCollector with an added title field.
  • ForgeRock/ping-javascript-sdk#629: This PR builds on that PR's ValidatedBooleanCollector work by splitting SINGLE_CHECKBOX handling into BooleanCollector (non-required) vs ValidatedBooleanCollector (required) and widening the e2e booleanComponent accordingly.
  • ForgeRock/ping-javascript-sdk#568: This PR removes the label.ts component that the retrieved PR introduced/modified for ReadOnlyCollector rich-text rendering, replacing it with the new unified read-only.ts.

Suggested reviewers

  • cerebrl
  • ryanbas21
  • vatsalparikh

Poem

🐇 Hop hop, the agreement's reborn,
No AgreementCollector left to mourn!
A BooleanCollector joins the pack,
ReadOnlyCollector picks up the slack—
With a title field tucked in its output today,
The rabbit refactored the old types away! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main changes: introducing BooleanCollector and refactoring AgreementCollector into ReadOnlyCollector.
Description check ✅ Passed The description includes the required JIRA Ticket section and a comprehensive Description section covering What, Why, and detailed Changes with full context.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch SDKS-5174-update-collectors

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit 429e218

Command Status Duration Result
nx run-many -t build --no-agents ✅ Succeeded <1s View ↗
nx affected -t build lint test typecheck e2e-ci ✅ Succeeded 1m 29s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-06-23 01:07:22 UTC

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/davinci-client/src/lib/collector.utils.ts (1)

617-625: 💤 Low value

Minor JSDoc inaccuracy: SingleCheckboxField does not have a validation property.

The comment mentions "validation" as one of the field properties, but SingleCheckboxField only contains required, errorMessage, appearance, and richContent for validation-adjacent concerns.

📝 Suggested doc fix
 /**
  * `@function` returnBooleanCollector - Creates a BooleanCollector (no validation).
- * `@param` {SingleCheckboxField} field - The field object containing key, label, type, required, and validation.
+ * `@param` {SingleCheckboxField} field - The field object containing key, label, type, required, appearance, and optional richContent.
  * `@param` {number} idx - The index to be used in the id of the BooleanCollector.
  * `@returns` {BooleanCollector} The constructed BooleanCollector object.
  */
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/davinci-client/src/lib/collector.utils.ts` around lines 617 - 625,
The JSDoc comment for the returnBooleanCollector function incorrectly lists
"validation" as a property of SingleCheckboxField. Update the `@param` description
for the field parameter to remove the mention of "validation" and instead
accurately list the actual properties that SingleCheckboxField contains:
required, errorMessage, appearance, and richContent. This ensures the
documentation matches the actual type definition.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@e2e/davinci-app/main.ts`:
- Around line 292-297: The booleanComponent function call at lines 292-297
unconditionally passes davinciClient.validate(collector), but should follow the
PasswordCollector pattern shown at lines 249-251. Add a conditional check to
only call davinciClient.validate(collector) when collector.type equals
'ValidatedBooleanCollector', otherwise pass undefined. This ensures validate()
is only invoked for collectors in validated categories, preventing errors from
calling validate() on a standard BooleanCollector which is not supported by the
validation API.

---

Nitpick comments:
In `@packages/davinci-client/src/lib/collector.utils.ts`:
- Around line 617-625: The JSDoc comment for the returnBooleanCollector function
incorrectly lists "validation" as a property of SingleCheckboxField. Update the
`@param` description for the field parameter to remove the mention of "validation"
and instead accurately list the actual properties that SingleCheckboxField
contains: required, errorMessage, appearance, and richContent. This ensures the
documentation matches the actual type definition.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 856b6b4d-4202-41ed-a52c-0a93e2e5c47c

📥 Commits

Reviewing files that changed from the base of the PR and between 35816b4 and 0329782.

📒 Files selected for processing (18)
  • .changeset/silent-ideas-joke.md
  • .changeset/single-checkbox.md
  • e2e/davinci-app/components/agreement.ts
  • e2e/davinci-app/components/boolean.ts
  • e2e/davinci-app/components/label.ts
  • e2e/davinci-app/components/read-only.ts
  • e2e/davinci-app/main.ts
  • packages/davinci-client/api-report/davinci-client.api.md
  • packages/davinci-client/api-report/davinci-client.types.api.md
  • packages/davinci-client/src/lib/client.types.ts
  • packages/davinci-client/src/lib/collector.types.test-d.ts
  • packages/davinci-client/src/lib/collector.types.ts
  • packages/davinci-client/src/lib/collector.utils.test.ts
  • packages/davinci-client/src/lib/collector.utils.ts
  • packages/davinci-client/src/lib/node.reducer.test.ts
  • packages/davinci-client/src/lib/node.reducer.ts
  • packages/davinci-client/src/lib/node.types.test-d.ts
  • packages/davinci-client/src/lib/node.types.ts
💤 Files with no reviewable changes (2)
  • e2e/davinci-app/components/agreement.ts
  • e2e/davinci-app/components/label.ts

Comment thread e2e/davinci-app/main.ts
@pkg-pr-new

pkg-pr-new Bot commented Jun 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

@forgerock/davinci-client

pnpm add https://pkg.pr.new/@forgerock/davinci-client@697

@forgerock/device-client

pnpm add https://pkg.pr.new/@forgerock/device-client@697

@forgerock/journey-client

pnpm add https://pkg.pr.new/@forgerock/journey-client@697

@forgerock/oidc-client

pnpm add https://pkg.pr.new/@forgerock/oidc-client@697

@forgerock/protect

pnpm add https://pkg.pr.new/@forgerock/protect@697

@forgerock/sdk-types

pnpm add https://pkg.pr.new/@forgerock/sdk-types@697

@forgerock/sdk-utilities

pnpm add https://pkg.pr.new/@forgerock/sdk-utilities@697

@forgerock/iframe-manager

pnpm add https://pkg.pr.new/@forgerock/iframe-manager@697

@forgerock/sdk-logger

pnpm add https://pkg.pr.new/@forgerock/sdk-logger@697

@forgerock/sdk-oidc

pnpm add https://pkg.pr.new/@forgerock/sdk-oidc@697

@forgerock/sdk-request-middleware

pnpm add https://pkg.pr.new/@forgerock/sdk-request-middleware@697

@forgerock/storage

pnpm add https://pkg.pr.new/@forgerock/storage@697

commit: 429e218

@codecov-commenter

codecov-commenter commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 22.03%. Comparing base (eafe277) to head (429e218).
⚠️ Report is 32 commits behind head on main.

❌ Your project status has failed because the head coverage (22.03%) is below the target coverage (40.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #697      +/-   ##
==========================================
+ Coverage   18.07%   22.03%   +3.95%     
==========================================
  Files         155      157       +2     
  Lines       24398    25206     +808     
  Branches     1203     1479     +276     
==========================================
+ Hits         4410     5554    +1144     
+ Misses      19988    19652     -336     
Files with missing lines Coverage Δ
packages/davinci-client/src/lib/client.types.ts 100.00% <ø> (ø)
packages/davinci-client/src/lib/collector.types.ts 100.00% <ø> (ø)
packages/davinci-client/src/lib/collector.utils.ts 86.38% <100.00%> (+1.22%) ⬆️
packages/davinci-client/src/lib/davinci.types.ts 100.00% <ø> (ø)
packages/davinci-client/src/lib/node.reducer.ts 72.03% <100.00%> (+1.54%) ⬆️
packages/davinci-client/src/lib/node.types.ts 100.00% <ø> (ø)

... and 15 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Deployed 5b333d8 to https://ForgeRock.github.io/ping-javascript-sdk/pr-697/5b333d823a11d70cb2ec09569111e7bc3e171199 branch gh-pages in ForgeRock/ping-javascript-sdk

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle Size Analysis

📦 Bundle Size Analysis

🚨 Significant Changes

🔻 @forgerock/device-client - 0.0 KB (-10.0 KB, -100.0%)
🔻 @forgerock/journey-client - 0.0 KB (-93.0 KB, -100.0%)

📊 Minor Changes

📉 @forgerock/davinci-client - 53.8 KB (-0.0 KB)
📉 @forgerock/device-client - 10.0 KB (-0.0 KB)

➖ No Changes

@forgerock/oidc-client - 35.2 KB
@forgerock/sdk-types - 7.9 KB
@forgerock/sdk-utilities - 11.9 KB
@forgerock/journey-client - 93.0 KB
@forgerock/protect - 144.6 KB
@forgerock/iframe-manager - 3.2 KB
@forgerock/sdk-logger - 1.6 KB
@forgerock/storage - 1.5 KB
@forgerock/sdk-request-middleware - 4.6 KB
@forgerock/sdk-oidc - 5.7 KB


14 packages analyzed • Baseline from latest main build

Legend

🆕 New package
🔺 Size increased
🔻 Size decreased
➖ No change

ℹ️ How bundle sizes are calculated
  • Current Size: Total gzipped size of all files in the package's dist directory
  • Baseline: Comparison against the latest build from the main branch
  • Files included: All build outputs except source maps and TypeScript build cache
  • Exclusions: .map, .tsbuildinfo, and .d.ts.map files

🔄 Updated automatically on each push to this PR

@vatsalparikh vatsalparikh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good!

Tested Form Validation page and clicked Submit by skipping I agree to the terms and conditions. The page returned success, which seems surprising. Question, is this how davinci server works? Does it ignore validation even though validation is set to true for ValidatedBooleanCollector? I want to make sure I understand this before I approve.

Comment thread e2e/davinci-app/components/boolean.ts Outdated
Comment thread packages/davinci-client/src/lib/collector.utils.ts

@SteinGabriel SteinGabriel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial review.

output: {
...base.output,
content: field.content,
...(field.type === 'AGREEMENT' && field.titleEnabled && { title: field.title ?? '' }),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that returnReadOnlyCollector discards AgreementField.enable, which is a required field in the AgreementField type. This could have a real behavioral impact, since disabled agreements could still render. Wanted to flag it and confirm this is intentional rather than a regression.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good question. What I've observed is that if you disable agreements then DaVinci will not send the field at all. However this behavior could change in the future. @cerebrl what do you think about exposing enabled in the collector? And if we do then where should it go, on the collector output?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, we could check for field.enabled in the node reducer and skip producing the collector if enabled: false

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the enabled refer to the Agreement itself? If so, we don't really have that concept at all in collectors. A collector is either present or not present. I don't think we have the idea of present, but disabled, yeah?

Comment thread packages/davinci-client/src/lib/node.reducer.test.ts
@ancheetah

ancheetah commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator Author

@vatsalparikh According to DaVinci, validation is a client-side responsibility and we have not found a way to hit the error branch server side if required: true but you send false or null. The e2e app should block you from proceeding if you don't check the box, so I need to revisit this if you're saying you can get through. Thanks for testing it.

Okay, then we just need to update the e2e davinci app for it to validate client side.

@cerebrl cerebrl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we get clarity around the agreement field having enabled: false, this is good to merge.

@ancheetah

ancheetah commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator Author

@vatsalparikh According to DaVinci, validation is a client-side responsibility and we have not found a way to hit the error branch server side if required: true but you send false or null. The e2e app should block you from proceeding if you don't check the box, so I need to revisit this if you're saying you can get through. Thanks for testing it.

Okay, then we just need to update the e2e davinci app for it to validate client side.

I take it back. Each input in the validation form behaves like this. We don't actually block submission in our e2e, we just check for the error message in the test suite. In the sample app I will make sure to block submission if the box isn't checked.

@ancheetah ancheetah force-pushed the SDKS-5174-update-collectors branch from f802fd8 to ae4d00f Compare June 22, 2026 23:04
nx-cloud[bot]

This comment was marked as outdated.

@ancheetah ancheetah force-pushed the SDKS-5174-update-collectors branch from ae4d00f to 429e218 Compare June 22, 2026 23:11

@nx-cloud nx-cloud Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.

Nx Cloud has identified a possible root cause for your failed CI:

We investigated the E2E test failure in @forgerock/davinci-suites:e2e-ci--src/form-fields.test.ts and determined it is unrelated to this PR, as @forgerock/davinci-suites was not modified by these changes. The identical timeout failure was confirmed to exist in an independent branch (684), indicating a pre-existing environment or infrastructure issue with the test setup.

No code changes were suggested for this issue.

Trigger a rerun:

Rerun CI

Nx Cloud View detailed reasoning on Nx Cloud ↗


🎓 Learn more about Self-Healing CI on nx.dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants