Skip to content

fix(davinci-client): fix challenge polling headers#575

Merged
ancheetah merged 1 commit intomainfrom
fix-poll-headers
Apr 23, 2026
Merged

fix(davinci-client): fix challenge polling headers#575
ancheetah merged 1 commit intomainfrom
fix-poll-headers

Conversation

@ancheetah
Copy link
Copy Markdown
Collaborator

@ancheetah ancheetah commented Apr 21, 2026

Fixes challenge polling /status endpoint headers now addressed by https://pingidentity.atlassian.net/browse/DV-23136. No CORS error when hitting /status.

Summary by CodeRabbit

  • Refactor
    • Improved consistency in API request handling across all endpoint types.

@ancheetah ancheetah requested a review from cerebrl April 21, 2026 13:38
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 21, 2026

⚠️ No Changeset found

Latest commit: fe733e9

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 no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@ancheetah ancheetah requested a review from ryanbas21 April 21, 2026 13:38
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 31327c71-8ba6-4300-b86c-0d2a2d2a4bcc

📥 Commits

Reviewing files that changed from the base of the PR and between 9088443 and fe733e9.

📒 Files selected for processing (1)
  • packages/davinci-client/src/lib/davinci.api.ts

📝 Walkthrough

Walkthrough

Modified RTK Query header preparation logic in the davinci API client to remove endpoint-specific conditional logic, ensuring that x-requested-with and x-requested-platform headers are now set for all requests rather than being skipped for the poll endpoint.

Changes

Cohort / File(s) Summary
RTK Query Header Configuration
packages/davinci-client/src/lib/davinci.api.ts
Removed endpoint parameter from prepareHeaders function and eliminated conditional logic that previously excluded certain headers from the poll endpoint. Headers now consistently applied across all request types.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Headers now flow so free and bright,
No special cases, pure delight!
From poll to all, consistency rings,
A simple change that small things bring! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description references a JIRA ticket (DV-23136) and explains the fix resolves CORS errors for the /status endpoint, but the required template sections (JIRA Ticket and Description headers) are not properly structured. Ensure the description follows the template structure with proper section headings (# JIRA Ticket, ## Description) and confirm a changeset was added as noted in the template.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: fixing headers for challenge polling, which aligns with the changeset that removes conditional logic to set headers for all requests including poll.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-poll-headers

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.

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Apr 21, 2026

View your CI Pipeline Execution ↗ for commit fe733e9

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

☁️ Nx Cloud last updated this comment at 2026-04-21 13:41:52 UTC

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 21, 2026

Open in StackBlitz

@forgerock/davinci-client

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/davinci-client@575

@forgerock/device-client

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/device-client@575

@forgerock/journey-client

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/journey-client@575

@forgerock/oidc-client

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/oidc-client@575

@forgerock/protect

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/protect@575

@forgerock/sdk-types

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/sdk-types@575

@forgerock/sdk-utilities

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/sdk-utilities@575

@forgerock/iframe-manager

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/iframe-manager@575

@forgerock/sdk-logger

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/sdk-logger@575

@forgerock/sdk-oidc

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/sdk-oidc@575

@forgerock/sdk-request-middleware

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/sdk-request-middleware@575

@forgerock/storage

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/storage@575

commit: fe733e9

@github-actions
Copy link
Copy Markdown
Contributor

Deployed 744bb3e to https://ForgeRock.github.io/ping-javascript-sdk/pr-575/744bb3e743c491ed8267b25d8e2fcae639d7d59c branch gh-pages in ForgeRock/ping-javascript-sdk

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.30%. Comparing base (5d6747a) to head (fe733e9).
⚠️ Report is 32 commits behind head on main.

Files with missing lines Patch % Lines
packages/davinci-client/src/lib/davinci.api.ts 33.33% 2 Missing ⚠️

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

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #575       +/-   ##
===========================================
- Coverage   70.90%   54.30%   -16.60%     
===========================================
  Files          53       22       -31     
  Lines        2021     2379      +358     
  Branches      377      335       -42     
===========================================
- Hits         1433     1292      -141     
- Misses        588     1087      +499     
Files with missing lines Coverage Δ
packages/davinci-client/src/lib/davinci.api.ts 11.96% <33.33%> (ø)

... and 73 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
Copy link
Copy Markdown
Contributor

📦 Bundle Size Analysis

📦 Bundle Size Analysis

🚨 Significant Changes

🔻 @forgerock/device-client - 0.0 KB (-9.9 KB, -100.0%)
🔻 @forgerock/journey-client - 0.0 KB (-89.9 KB, -100.0%)

📊 Minor Changes

📉 @forgerock/device-client - 9.9 KB (-0.0 KB)
📉 @forgerock/davinci-client - 48.0 KB (-0.0 KB)

➖ No Changes

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

@ancheetah ancheetah merged commit 8e77da3 into main Apr 23, 2026
8 checks passed
@ancheetah ancheetah deleted the fix-poll-headers branch April 23, 2026 15:40
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.

3 participants