Conversation
|
| Name | Type |
|---|---|
| @forgerock/sdk-request-middleware | Minor |
| @forgerock/davinci-client | Minor |
| @forgerock/journey-client | Minor |
| @forgerock/oidc-client | Minor |
| @forgerock/device-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/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
📝 WalkthroughWalkthroughThe pull request renames the polling API method from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
|
View your CI Pipeline Execution ↗ for commit e5e0fe0
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/davinci-client/src/lib/client.store.ts (1)
425-446:⚠️ Potential issue | 🟠 Major | ⚡ Quick winPreserve backward compatibility for renamed polling API.
Line 425 introduces
pollStatus, but the prior publicpollAPI is no longer present. That is a breaking runtime/API change for existing integrators. Please either keep a deprecatedpollalias for one transition release, or explicitly treat this as a breaking migration.Suggested compatibility patch
+ const buildPoller = (collector: PollingCollector): Poller => { + return async () => { + const result = await getPollingModeµ(collector).pipe( + Micro.flatMap((mode) => pollingµ({ mode, collector, store, log })), + Micro.tapError((err) => Micro.sync(() => log.error(err.error.message))), + Micro.runPromiseExit, + ); + + if (exitIsSuccess(result)) return result.value; + if (exitIsFail(result)) return result.cause.error; + + return createInternalError( + 'An unexpected error occurred during poll operation', + 'unknown_error', + ); + }; + }; + return { @@ - pollStatus: (collector: PollingCollector): Poller => { - return async () => { - const result = await getPollingModeµ(collector).pipe( - Micro.flatMap((mode) => pollingµ({ mode, collector, store, log })), - Micro.tapError((err) => Micro.sync(() => log.error(err.error.message))), - Micro.runPromiseExit, - ); - - if (exitIsSuccess(result)) { - return result.value; - } - - if (exitIsFail(result)) { - return result.cause.error; - } - - return createInternalError( - 'An unexpected error occurred during poll operation', - 'unknown_error', - ); - }; - }, + pollStatus: (collector: PollingCollector): Poller => buildPoller(collector), + /** `@deprecated` Use pollStatus(collector) */ + poll: (collector: PollingCollector): Poller => buildPoller(collector),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/davinci-client/src/lib/client.store.ts` around lines 425 - 446, The new pollStatus function replaces the old public poll API and breaks compatibility; restore a deprecated alias by adding a poll export/function that forwards to pollStatus (accepting the same PollingCollector and returning a Poller) and mark it as deprecated in comments, or alternatively document this as a breaking change; update references to PollingCollector and Poller so poll simply calls and returns pollStatus(collector) to preserve runtime behavior for existing integrators.
🧹 Nitpick comments (1)
.changeset/lucky-parts-own.md (1)
6-13: ⚡ Quick winMake migration impact explicit in changeset text.
Lines 6-13 read as a feature add, but this PR renames the public API from
poll()topollStatus(). Please explicitly call out the rename/deprecation path so consumers know what to update.Suggested wording
-Adds `pollStatus()` method and `PollingCollector` to `@forgerock/davinci-client` for polling support in DaVinci flows. +Renames polling helper `poll()` to `pollStatus()` in `@forgerock/davinci-client`. +Update integrations to call `davinciClient.pollStatus(collector)` instead of `davinciClient.poll(collector)`.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.changeset/lucky-parts-own.md around lines 6 - 13, Update the changeset text to explicitly call out that the public API was renamed from poll() to pollStatus() in `@forgerock/davinci-client` and describe the migration/deprecation path for consumers: mention that PollingCollector is unchanged, show that callers should replace calls to poll(...) with pollStatus(collector) (or use the returned poller function as before), note any backwards-compatibility or removal timeline for poll(), and include a short example or migration hint referencing poll() and pollStatus() so users know what to update.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@packages/davinci-client/src/lib/client.store.ts`:
- Around line 425-446: The new pollStatus function replaces the old public poll
API and breaks compatibility; restore a deprecated alias by adding a poll
export/function that forwards to pollStatus (accepting the same PollingCollector
and returning a Poller) and mark it as deprecated in comments, or alternatively
document this as a breaking change; update references to PollingCollector and
Poller so poll simply calls and returns pollStatus(collector) to preserve
runtime behavior for existing integrators.
---
Nitpick comments:
In @.changeset/lucky-parts-own.md:
- Around line 6-13: Update the changeset text to explicitly call out that the
public API was renamed from poll() to pollStatus() in `@forgerock/davinci-client`
and describe the migration/deprecation path for consumers: mention that
PollingCollector is unchanged, show that callers should replace calls to
poll(...) with pollStatus(collector) (or use the returned poller function as
before), note any backwards-compatibility or removal timeline for poll(), and
include a short example or migration hint referencing poll() and pollStatus() so
users know what to update.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: deff6212-bd5a-4c14-acc1-178db78abcac
📒 Files selected for processing (4)
.changeset/lucky-parts-own.mde2e/davinci-app/components/polling.tse2e/davinci-app/main.tspackages/davinci-client/src/lib/client.store.ts
There was a problem hiding this comment.
Nx Cloud has identified a possible root cause for your failed CI:
We investigated the E2E failure in phone-number-field.test.ts and confirmed it is a pre-existing issue — the identical error reproduces on the main branch independent of this PR's changes. Our PR only updates poll naming to pollStatus across @forgerock/davinci-client and @forgerock/davinci-app, with no changes to the phone number field flow or the @forgerock/davinci-suites project. This failure is caused by an external backend service dependency and is unrelated to our changes.
No code changes were suggested for this issue.
Trigger a rerun:
🎓 Learn more about Self-Healing CI on nx.dev
There was a problem hiding this comment.
Other than outdated date in copyright headers of a few files and the CI error, changes look good to go!
Files:
packages/davinci-client/src/lib/client.store.tse2e/davinci-app/components/polling.tse2e/davinci-app/main.ts
Btw, I'm adding the copyright header automation to this repo next, as soon as I have a spare time.
JIRA Ticket
Description
Updates poll naming to
pollStatus. Updates JSDocs and changeset description.Summary by CodeRabbit
Release Notes
pollStatus()API supporting two polling modes: challenge polling via repeated status calls and continue polling with retry-based delays. Polling requests are now interceptible via middleware.