Skip to content

test(davinci-client): e2e tests for agreements, single checkbox, rich text#638

Open
ancheetah wants to merge 2 commits into
mainfrom
SDKS-5000-form-fields-e2e
Open

test(davinci-client): e2e tests for agreements, single checkbox, rich text#638
ancheetah wants to merge 2 commits into
mainfrom
SDKS-5000-form-fields-e2e

Conversation

@ancheetah
Copy link
Copy Markdown
Collaborator

@ancheetah ancheetah commented May 20, 2026

JIRA Ticket

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

Description

  • Extends e2e coverage for agreements, rich text, and single checkbox fields; fixes SingleCheckboxField type to match the actual server payload.
  • Moves Form Fields Test flow to new web tenant.
  • Adds appearance: string and optional richContent to ValidatedBooleanCollector, following the RichTextCollector pattern.

Key Changes

  • SingleCheckboxField type — flattened validation.errorMessage into a top-level errorMessage?: string to match the server shape. Updated collector.utils.ts and regenerated API reports.
  • booleanComponent — wired in Validator<ValidatedBooleanCollector> so the checkbox runs client-side validation and renders inline errors on change.
  • server-configs.ts — swapped client ID to a PingOne environment that includes the updated form fields flow.
  • form-fields.test.ts — added assertions for rich text link rendering, agreement visibility, single checkbox default state, and required-field error on uncheck.
  • SDKSingleCheckboxField extended with the new properties for appearance and rich text. ValidatedBooleanCollector refactored to an interface extending ValidatedSingleValueCollectorWithValue, intersecting output with the new fields. Factory logic updated to populate them via normalizeReplacements. API reports regenerated.
  • Tests — Unit tests for returnValidatedBooleanCollector (5 cases), a reducer-level richContent round-trip test, and updated existing assertions to include appearance.
  • E2E apprichContentInterpolation extracted as a shared helper. boolean.ts renders rich text labels via safe DOM node moves and fixes the error display to only call updater on valid input.

Review Change Stack

Summary by CodeRabbit

  • New Features

    • Added support for single checkbox form fields with validation
    • Implemented form field validation with customizable error messages
    • Introduced rich text content rendering in form fields, including link support
  • Tests

    • Enhanced form validation test coverage for checkbox fields and validation messaging
  • Chores

    • Updated Git configuration to ignore local artifacts

Review Change Stack

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 20, 2026

⚠️ No Changeset found

Latest commit: 4d1fbc0

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
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

Warning

Rate limit exceeded

@ancheetah has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 40 minutes and 17 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 20ceb6fe-e3ba-4061-82d0-8ddc07ea407a

📥 Commits

Reviewing files that changed from the base of the PR and between fa84047 and 4d1fbc0.

📒 Files selected for processing (13)
  • .changeset/single-checkbox.md
  • e2e/davinci-app/components/boolean.ts
  • e2e/davinci-app/components/label.ts
  • e2e/davinci-app/helper.ts
  • e2e/davinci-suites/src/form-fields.test.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/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
📝 Walkthrough

Walkthrough

SingleCheckboxField error moved to top-level errorMessage; ValidatedBooleanCollector output gains appearance and optional richContent; booleanComponent now accepts a validator, validates and inserts/removes ${collectorKey}-error, updater is called only when valid; helper, types, utils, tests, e2e wiring, and API/type reports updated.

Changes

Checkbox Validation Refactoring

Layer / File(s) Summary
Type & API contract changes
packages/davinci-client/src/lib/davinci.types.ts, packages/davinci-client/api-report/*, packages/davinci-client/api-report/*.types
SingleCheckboxField moves validation.errorMessage to top-level errorMessage?: string; ValidatedBooleanCollector becomes an interface and its output adds appearance and optional richContent; API/type report unions and RTK Query error unions reordered.
Collector utils & tests
packages/davinci-client/src/lib/collector.utils.ts, packages/davinci-client/src/lib/collector.utils.test.ts, packages/davinci-client/src/lib/node.reducer.test.ts
normalizeReplacements moved earlier; returnValidatedBooleanCollector includes appearance/richContent, prefers field.errorMessage for required rule and has explicit return type; tests updated to match new shapes and normalization behavior.
Boolean component validation and typing
e2e/davinci-app/components/boolean.ts, e2e/davinci-app/components/text.ts, e2e/davinci-app/main.ts
booleanComponent gains a validator parameter, derives collectorKey for id/name, validates on change, inserts/removes ${collectorKey}-error, and calls updater(checked) only when validation passes; textComponent validator typing narrowed to Validator<ValidatedTextCollector>; main app passes davinciClient.validate(collector) into booleanComponent.
Rich-text helper and label usage
e2e/davinci-app/helper.ts, e2e/davinci-app/components/label.ts
Introduce richContentInterpolation helper to build paragraph + anchors from richContent, and replace inline interpolation in label component with helper call.
E2E tests and server config
e2e/davinci-suites/src/form-fields.test.ts, e2e/davinci-app/server-configs.ts
Playwright tests updated for new clientId, rich-text/link assertions, checkbox toggle/validation behavior, and adjusted expected POST payload; server tenant config updated for form-fields tests.
Git configuration & small typing sample
.gitignore, packages/davinci-client/src/lib/collector.types.test-d.ts
Added .polaris and .playwright-mcp to .gitignore; test sample collector now includes appearance: 'CHECKBOX'.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • cerebrl
  • ryanbas21
  • vatsalparikh

"🐰
I hopped through code with careful cheer,
Brought errors out so they appear,
Check, uncheck—tests pass clear,
Rich links stitched and types held near,
Hooray for forms without a fear!"

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 77.78% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: extending e2e tests for agreements, single checkbox, and rich text features in davinci-client, which aligns with the primary objective of the changeset.
Description check ✅ Passed The pull request description comprehensively covers the changes with a JIRA ticket reference and detailed Key Changes section explaining the rationale and implementation details across multiple components.
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-5000-form-fields-e2e

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 and usage tips.

@ancheetah ancheetah requested review from cerebrl and ryanbas21 May 20, 2026 16:17
@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented May 20, 2026

View your CI Pipeline Execution ↗ for commit fa84047

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

☁️ Nx Cloud last updated this comment at 2026-05-20 22:16:28 UTC

Copy link
Copy Markdown
Contributor

@nx-cloud nx-cloud Bot left a comment

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 is proposing a fix for your failed CI:

We updated the test fixture in node.reducer.test.ts to use the new flattened errorMessage field on SingleCheckboxField, which fixes the assertion failure caused by the PR's intentional type change. The implementation in collector.utils.ts was already reading field.errorMessage directly, but the test was still supplying the old nested validation: { errorMessage: '...' } shape, causing the message to fall back to 'Value cannot be empty'.

Tip

We verified this fix by re-running @forgerock/davinci-client:test.

diff --git a/packages/davinci-client/src/lib/node.reducer.test.ts b/packages/davinci-client/src/lib/node.reducer.test.ts
index 3db2cbd..75d66e7 100644
--- a/packages/davinci-client/src/lib/node.reducer.test.ts
+++ b/packages/davinci-client/src/lib/node.reducer.test.ts
@@ -1699,7 +1699,7 @@ describe('The node collector reducer with ValidatedBooleanCollector', () => {
             key: 'accept-terms',
             label: 'Accept Terms',
             required: true,
-            validation: { errorMessage: 'You must accept the terms' },
+            errorMessage: 'You must accept the terms',
           },
         ],
         formData: {},

Apply fix via Nx Cloud  Reject fix via Nx Cloud


Or Apply changes locally with:

npx nx-cloud apply-locally 2XKE-yVlk

Apply fix locally with your editor ↗   View interactive diff ↗



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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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/components/boolean.ts`:
- Around line 51-64: The checkbox handler currently only calls updater when
validation passes, causing collector state to lag when validation fails; always
invoke updater((event.target as HTMLInputElement).checked) (the updater call in
this block) regardless of the validation result so the collector state stays in
sync, then run the existing validation logic that creates/removes the
`${collectorKey}-error` element based on result; keep the existing error logging
path (checking 'error' in the updater return) and ensure you do not
remove/create error DOM nodes prematurely (use updater first, then handle
Array.isArray(result) and error DOM updates using result, collectorKey, formEl).
🪄 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: 59f71200-eefc-4560-b9b1-eea5176a5604

📥 Commits

Reviewing files that changed from the base of the PR and between 9f93d5e and 128e211.

📒 Files selected for processing (10)
  • .gitignore
  • e2e/davinci-app/components/boolean.ts
  • e2e/davinci-app/components/text.ts
  • e2e/davinci-app/main.ts
  • e2e/davinci-app/server-configs.ts
  • e2e/davinci-suites/src/form-fields.test.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/collector.utils.ts
  • packages/davinci-client/src/lib/davinci.types.ts

Comment thread e2e/davinci-app/components/boolean.ts
@ancheetah ancheetah force-pushed the SDKS-5000-form-fields-e2e branch from 128e211 to 89d04ee Compare May 20, 2026 17:23
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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)
e2e/davinci-suites/src/form-fields.test.ts (1)

92-94: ⚡ Quick win

Use consistent navigation pattern with asyncEvents helper.

The second test uses page.goto() with a hardcoded URL, while the first test uses the asyncEvents helper with a relative URL. Using the helper provides consistent event handling and avoids hardcoding the port/protocol/host.

♻️ Refactor to use asyncEvents helper
 test('should render form validation fields', async ({ page }) => {
-  await page.goto('http://localhost:5829/?clientId=e4ef2896-8d90-4abd-bf0f-7b8034995927');
+  const { navigate } = asyncEvents(page);
+  await navigate('/?clientId=e4ef2896-8d90-4abd-bf0f-7b8034995927');
 
   await expect(page.getByText('Select Form Fields Test Form')).toBeVisible();
🤖 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 `@e2e/davinci-suites/src/form-fields.test.ts` around lines 92 - 94, The test
"should render form validation fields" currently calls page.goto with a
hardcoded full URL; update it to use the existing asyncEvents helper and a
relative path like the other test to keep event handling consistent and avoid
embedding host/port. Replace the
page.goto('http://localhost:5829/?clientId=...') call inside the test body with
the asyncEvents call used elsewhere (refer to the asyncEvents helper and the
test name "should render form validation fields") so the test navigates to
'/?clientId=e4ef2896-8d90-4abd-bf0f-7b8034995927' via asyncEvents instead of a
hardcoded URL.
🤖 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/components/boolean.ts`:
- Line 25: The code constructs DOM selectors using the raw collectorKey (const
collectorKey = collector.output.key) and then passes it to
document.querySelector for id/class selectors, which breaks when keys contain
CSS-special characters (e.g., dots); update each querySelector call that uses
collectorKey (the selectors around where collectorKey is interpolated) to wrap
the key with CSS.escape(collectorKey) when building id or class selectors so the
selectors are valid for any key value.

---

Nitpick comments:
In `@e2e/davinci-suites/src/form-fields.test.ts`:
- Around line 92-94: The test "should render form validation fields" currently
calls page.goto with a hardcoded full URL; update it to use the existing
asyncEvents helper and a relative path like the other test to keep event
handling consistent and avoid embedding host/port. Replace the
page.goto('http://localhost:5829/?clientId=...') call inside the test body with
the asyncEvents call used elsewhere (refer to the asyncEvents helper and the
test name "should render form validation fields") so the test navigates to
'/?clientId=e4ef2896-8d90-4abd-bf0f-7b8034995927' via asyncEvents instead of a
hardcoded URL.
🪄 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: c29145f7-cabe-4a6a-b6d0-2690b2d520dc

📥 Commits

Reviewing files that changed from the base of the PR and between 128e211 and 89d04ee.

📒 Files selected for processing (11)
  • .gitignore
  • e2e/davinci-app/components/boolean.ts
  • e2e/davinci-app/components/text.ts
  • e2e/davinci-app/main.ts
  • e2e/davinci-app/server-configs.ts
  • e2e/davinci-suites/src/form-fields.test.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/collector.utils.ts
  • packages/davinci-client/src/lib/davinci.types.ts
  • packages/davinci-client/src/lib/node.reducer.test.ts
✅ Files skipped from review due to trivial changes (1)
  • .gitignore

Comment thread e2e/davinci-app/components/boolean.ts Outdated
@ancheetah ancheetah force-pushed the SDKS-5000-form-fields-e2e branch from 89d04ee to afc0584 Compare May 20, 2026 19:42
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
e2e/davinci-suites/src/form-fields.test.ts (3)

56-56: 💤 Low value

Fix typo in comment.

"abscence" should be "absence".

📝 Proposed fix
-  // Toggle the single checkbox and assert that it is optional by the abscence of an error message
+  // Toggle the single checkbox and assert that it is optional by the absence of an error message
🤖 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 `@e2e/davinci-suites/src/form-fields.test.ts` at line 56, Fix the typo in the
test comment: replace "abscence" with the correct spelling "absence" in the
inline comment that reads "Toggle the single checkbox and assert that it is
optional by the abscence of an error message" in the form-fields.test.ts file so
the comment reads "...by the absence of an error message".

93-93: 💤 Low value

Consider using the asyncEvents helper consistently.

Line 13 uses the asyncEvents helper's navigate method, but this test uses page.goto directly with a hardcoded base URL. For consistency and to ensure event tracking is uniform across tests, consider refactoring:

-  await page.goto('http://localhost:5829/?clientId=e4ef2896-8d90-4abd-bf0f-7b8034995927');
+  const { navigate } = asyncEvents(page);
+  await navigate('/?clientId=e4ef2896-8d90-4abd-bf0f-7b8034995927');
🤖 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 `@e2e/davinci-suites/src/form-fields.test.ts` at line 93, Replace the direct
use of page.goto with the asyncEvents helper to keep navigation and event
tracking consistent: locate the test that calls
page.goto('http://localhost:5829/?clientId=...') and change it to use
asyncEvents.navigate(...) (passing the path/query string or using the test's
base URL configuration rather than a hardcoded host) and await the call so
navigation is tracked the same way as other tests that use asyncEvents.navigate.

110-113: 💤 Low value

Consider adding an assertion that re-checking removes the error message.

The test validates that unchecking the required checkbox displays the error message, but doesn't verify that checking it again removes the error. For more complete coverage:

// Toggle the single checkbox to assert error message
await page.locator('`#single-checkbox-field`').check();
await page.locator('`#single-checkbox-field`').uncheck();
await expect(page.getByText('Select the checkbox to continue.')).toBeVisible();
await page.locator('`#single-checkbox-field`').check();
await expect(page.getByText('Select the checkbox to continue.')).not.toBeVisible();
🤖 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 `@e2e/davinci-suites/src/form-fields.test.ts` around lines 110 - 113, Add a
follow-up assertion that re-checking the required checkbox clears the validation
error: after the existing assert that the message "Select the checkbox to
continue." is visible, call the same locator ('`#single-checkbox-field`') to check
the checkbox again and then assert that page.getByText('Select the checkbox to
continue.') is no longer visible; update the test around the existing calls to
page.locator('`#single-checkbox-field`').check()/uncheck() and expect(...) to
include this removal assertion.
🤖 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.

Nitpick comments:
In `@e2e/davinci-suites/src/form-fields.test.ts`:
- Line 56: Fix the typo in the test comment: replace "abscence" with the correct
spelling "absence" in the inline comment that reads "Toggle the single checkbox
and assert that it is optional by the abscence of an error message" in the
form-fields.test.ts file so the comment reads "...by the absence of an error
message".
- Line 93: Replace the direct use of page.goto with the asyncEvents helper to
keep navigation and event tracking consistent: locate the test that calls
page.goto('http://localhost:5829/?clientId=...') and change it to use
asyncEvents.navigate(...) (passing the path/query string or using the test's
base URL configuration rather than a hardcoded host) and await the call so
navigation is tracked the same way as other tests that use asyncEvents.navigate.
- Around line 110-113: Add a follow-up assertion that re-checking the required
checkbox clears the validation error: after the existing assert that the message
"Select the checkbox to continue." is visible, call the same locator
('`#single-checkbox-field`') to check the checkbox again and then assert that
page.getByText('Select the checkbox to continue.') is no longer visible; update
the test around the existing calls to
page.locator('`#single-checkbox-field`').check()/uncheck() and expect(...) to
include this removal assertion.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c5dce5de-914d-475e-ab88-400f177f1c7b

📥 Commits

Reviewing files that changed from the base of the PR and between 89d04ee and afc0584.

📒 Files selected for processing (11)
  • .gitignore
  • e2e/davinci-app/components/boolean.ts
  • e2e/davinci-app/components/text.ts
  • e2e/davinci-app/main.ts
  • e2e/davinci-app/server-configs.ts
  • e2e/davinci-suites/src/form-fields.test.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/collector.utils.ts
  • packages/davinci-client/src/lib/davinci.types.ts
  • packages/davinci-client/src/lib/node.reducer.test.ts
✅ Files skipped from review due to trivial changes (2)
  • .gitignore
  • packages/davinci-client/api-report/davinci-client.api.md

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 20, 2026

Open in StackBlitz

@forgerock/davinci-client

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

@forgerock/device-client

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

@forgerock/journey-client

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

@forgerock/oidc-client

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

@forgerock/protect

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

@forgerock/sdk-types

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

@forgerock/sdk-utilities

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

@forgerock/iframe-manager

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

@forgerock/sdk-logger

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

@forgerock/sdk-oidc

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

@forgerock/sdk-request-middleware

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

@forgerock/storage

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

commit: 4d1fbc0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

Deployed c67e704 to https://ForgeRock.github.io/ping-javascript-sdk/pr-638/c67e7044a79a12e80550f7c062ce02bebe62b0d5 branch gh-pages in ForgeRock/ping-javascript-sdk

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

📦 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 (-91.9 KB, -100.0%)

📊 Minor Changes

📈 @forgerock/davinci-client - 54.3 KB (+0.2 KB)

➖ No Changes

@forgerock/storage - 1.5 KB
@forgerock/sdk-request-middleware - 4.5 KB
@forgerock/iframe-manager - 2.4 KB
@forgerock/sdk-oidc - 4.8 KB
@forgerock/sdk-logger - 1.6 KB
@forgerock/sdk-types - 7.9 KB
@forgerock/protect - 144.6 KB
@forgerock/device-client - 10.0 KB
@forgerock/sdk-utilities - 11.2 KB
@forgerock/oidc-client - 25.2 KB
@forgerock/journey-client - 91.9 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

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 18.26%. Comparing base (eafe277) to head (4d1fbc0).
⚠️ Report is 7 commits behind head on main.

❌ Your project status has failed because the head coverage (18.26%) 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     #638      +/-   ##
==========================================
+ Coverage   18.07%   18.26%   +0.18%     
==========================================
  Files         155      155              
  Lines       24398    24455      +57     
  Branches     1203     1217      +14     
==========================================
+ Hits         4410     4466      +56     
- Misses      19988    19989       +1     
Files with missing lines Coverage Δ
packages/davinci-client/src/lib/collector.types.ts 100.00% <ø> (ø)
packages/davinci-client/src/lib/collector.utils.ts 86.08% <100.00%> (+0.93%) ⬆️
packages/davinci-client/src/lib/davinci.types.ts 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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/helper.ts`:
- Line 1: The import of CollectorRichContent is being treated as a runtime
symbol; change it to a type-only import and import from the /types sub-path so
TypeScript will erase it at compile time — replace the current import of
CollectorRichContent with a type import (use the type keyword) from
'`@forgerock/davinci-client/types`' to enable proper tree-shaking and follow the
codebase pattern.
🪄 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: 6649dba0-bccd-45d8-a181-6050c46b4acf

📥 Commits

Reviewing files that changed from the base of the PR and between afc0584 and fa84047.

📒 Files selected for processing (13)
  • .changeset/single-checkbox.md
  • e2e/davinci-app/components/boolean.ts
  • e2e/davinci-app/components/label.ts
  • e2e/davinci-app/helper.ts
  • e2e/davinci-suites/src/form-fields.test.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/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
✅ Files skipped from review due to trivial changes (1)
  • .changeset/single-checkbox.md

Comment thread e2e/davinci-app/helper.ts Outdated
@@ -1,3 +1,5 @@
import { CollectorRichContent } from '@forgerock/davinci-client';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Where CollectorRichContent is declared =="
rg -n "export (interface|type) CollectorRichContent" --type ts

echo
echo "== Current imports in e2e app =="
rg -n "CollectorRichContent|`@forgerock/davinci-client/types`|`@forgerock/davinci-client`" e2e/davinci-app --type ts

echo
echo "== Package root/type entry re-exports (if present) =="
rg -n "collector.types|CollectorRichContent|export .* from" packages/davinci-client --type ts

Repository: ForgeRock/ping-javascript-sdk

Length of output: 7562


Add type keyword to import for TypeScript tree-shaking.

Line 1 imports a type as a runtime symbol. Since CollectorRichContent is an interface, use type keyword to ensure TypeScript strips it at compile time and allows proper tree-shaking. The codebase pattern is to import types from the /types sub-path.

🔧 Proposed fix
-import { CollectorRichContent } from '`@forgerock/davinci-client`';
+import type { CollectorRichContent } from '`@forgerock/davinci-client/types`';
🤖 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 `@e2e/davinci-app/helper.ts` at line 1, The import of CollectorRichContent is
being treated as a runtime symbol; change it to a type-only import and import
from the /types sub-path so TypeScript will erase it at compile time — replace
the current import of CollectorRichContent with a type import (use the type
keyword) from '`@forgerock/davinci-client/types`' to enable proper tree-shaking
and follow the codebase pattern.

@ancheetah ancheetah force-pushed the SDKS-5000-form-fields-e2e branch from fa84047 to 4d1fbc0 Compare May 20, 2026 22:12
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.

2 participants