Skip to content

Sdks 5097#670

Merged
vatsalparikh merged 2 commits into
mainfrom
sdks-5097
Jun 9, 2026
Merged

Sdks 5097#670
vatsalparikh merged 2 commits into
mainfrom
sdks-5097

Conversation

@vatsalparikh

@vatsalparikh vatsalparikh commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

JIRA Ticket

pingidentity.atlassian.net/browse/SDKS-5097

Note

This is just a continuation of the #574 PR.

Description

While working on the Journey Client migration, I noticed that when AM returns a failure response (e.g., unauthorized / invalid credentials), the Journey Client was returning a generic “no data” error and the LoginFailure path in createJourneyObject() was effectively never reached. This PR closes that gap by ensuring LoginFailure is triggered and a JourneyLoginFailure is returned when the server provides a failure payload with a code.

Ryan shared his closed PR that was trying to fix this issue: #541. Will use this as a reference.

Edit

Added an Either effect type to handle errors in journey client

What changed

  • start() / next() now map RTK Query error responses that include a code into createJourneyObject(), which returns JourneyLoginFailure (hitting the previously-unreached LoginFailure branch).
  • Added unit coverage for the LoginFailure mapping.
  • Updated the journey-app e2e consumer to avoid throwing on LoginFailure and instead renders the LoginFailure error message.
  • Added a changeset for @forgerock/journey-client.

How to test

  • Build and start the e2e/journey-app
  • Go to http://localhost:5829/?clientId=tenant and enter incorrect credentials
  • You should see 'Login Failure' with the change in this PR. When you remove the error handling logic, you should see unknown node in console, which means login failure is not handled as a step.

Summary by CodeRabbit

  • Bug Fixes
    • Journey client now returns explicit login-failure results and preserves existing error display when handling login failures.
  • Tests
    • Added unit and end-to-end tests for login failure handling, error payloads, and retry/re-render behavior.
  • Documentation
    • Added a changeset and updated public API/type surface and export annotations.
  • Chores
    • Added a new runtime dependency.

@changeset-bot

changeset-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6a2eea6

The changes in this PR will be included in the next version bump.

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

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e9a42948-f80b-46d5-8344-8dec8840c653

📥 Commits

Reviewing files that changed from the base of the PR and between 6a2eea6 and 348a636.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • e2e/journey-suites/src/login.test.ts
  • packages/journey-client/api-report/journey-client.api.md
  • packages/journey-client/api-report/journey-client.types.api.md
  • packages/journey-client/package.json
  • packages/journey-client/src/lib/client.store.ts
  • packages/journey-client/src/lib/journey.utils.test.ts
  • packages/journey-client/src/lib/journey.utils.ts
  • packages/journey-client/src/types.ts
✅ Files skipped from review due to trivial changes (1)
  • packages/journey-client/api-report/journey-client.api.md
🚧 Files skipped from review as they are similar to previous changes (6)
  • packages/journey-client/package.json
  • e2e/journey-suites/src/login.test.ts
  • packages/journey-client/api-report/journey-client.types.api.md
  • packages/journey-client/src/lib/journey.utils.ts
  • packages/journey-client/src/lib/journey.utils.test.ts
  • packages/journey-client/src/lib/client.store.ts

📝 Walkthrough

Walkthrough

Centralizes RTK Query response parsing into parseJourneyResponse and exported JourneyResult, refactors client.start()/next() to use Either-based parsing, updates public re-exports and API reports, and adds unit and E2E tests plus a changeset documenting the login-failure routing fix.

Changes

Login failure response handling

Layer / File(s) Summary
Response parsing utilities and tests
packages/journey-client/package.json, packages/journey-client/src/lib/journey.utils.ts, packages/journey-client/src/lib/journey.utils.test.ts
Adds effect runtime dependency, exports JourneyResult union, converts createJourneyObject to a direct export, and implements parseJourneyResponse with unit tests covering success and multiple error shapes.
Client store refactor and unit coverage
packages/journey-client/src/lib/client.store.ts, packages/journey-client/src/lib/client.store.test.ts
Refactors start()/next() to call parseJourneyResponse and use Either.match/createJourneyObject; updates test fixtures to parameterize authenticate status and adds tests asserting 401 step payloads produce JourneyLoginFailure and adjusts a generic error expectation.
Public API re-exports and reports
packages/journey-client/src/types.ts, packages/journey-client/api-report/journey-client.api.md, packages/journey-client/api-report/journey-client.types.api.md
Re-exports WellknownResponse from @forgerock/sdk-types, switches JourneyResult re-export to ./lib/journey.utils.js, and updates API report imports/exports and the JourneyResult annotation to // @public (undocumented).
E2E tests, app handler, changeset
e2e/journey-suites/src/login.test.ts, e2e/journey-app/main.ts, .changeset/whole-mangos-find.md
Adds Playwright tests for login failure and retry, updates the LoginFailure handler to preserve/restore error element HTML around journey restart, and adds a changeset documenting the patch release for the login-failure routing fix.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • ryanbas21
  • cerebrl
  • ancheetah

Poem

🐰 I hopped through parsers, tests, and code,

Login failures now find their road.
Either matched and objects made,
Errors shown, then gently laid —
A rabbit cheers the bugfix glowed.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Sdks 5097' is too vague and generic, referring only to a ticket number without conveying the actual change being made. Update the title to be more descriptive, such as 'Handle LoginFailure responses in Journey Client' or 'Map failure responses to JourneyLoginFailure in start/next methods'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The PR description includes the required JIRA ticket link and provides a clear, detailed explanation of the changes, including context, what changed, and how to test.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sdks-5097

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

nx-cloud Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit 348a636

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 17s View ↗

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


☁️ Nx Cloud last updated this comment at 2026-06-09 20:31:17 UTC

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

We moved the numeric-status FetchBaseQueryError branch before the !res.data guard in parseJourneyResponse, so AM failure payloads carried in error.data are now correctly routed to createJourneyObject as LoginFailure. Previously, data being undefined (the RTK Query behaviour for non-2xx responses) caused the function to short-circuit at no_response_data before the numeric-status branch was ever reached. This fix ensures the LoginFailure path introduced by the PR is reachable and all four related tests pass.

Tip

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

Suggested Fix changes
diff --git a/packages/journey-client/src/lib/journey.utils.ts b/packages/journey-client/src/lib/journey.utils.ts
index 22c77d5..f0340e2 100644
--- a/packages/journey-client/src/lib/journey.utils.ts
+++ b/packages/journey-client/src/lib/journey.utils.ts
@@ -86,6 +86,21 @@ export function parseJourneyResponse(res: {
     });
   }
 
+  // https://redux-toolkit.js.org/rtk-query/api/fetchBaseQuery#signature
+  // FetchBaseQueryError with numeric status = AM failure step over HTTP error
+  if (res.error && 'status' in res.error && typeof res.error.status === 'number') {
+    if (typeof res.error.data === 'object' && res.error.data !== null) {
+      // Object body = valid AM failure payload, treat as a Step to classify
+      return right(res.error.data as Step);
+    }
+    // Non-object body = unexpected response format
+    return left({
+      error: 'request_failed',
+      message: 'Request failed with server error',
+      type: 'unknown_error',
+    });
+  }
+
   if (!res.data) {
     return left({
       error: 'no_response_data',
@@ -94,17 +109,5 @@ export function parseJourneyResponse(res: {
     });
   }
 
-  // https://redux-toolkit.js.org/rtk-query/api/fetchBaseQuery#signature
-  // FetchBaseQueryError with numeric status + object body = AM failure step over HTTP error
-  if (
-    res.error &&
-    'status' in res.error &&
-    typeof res.error.status === 'number' &&
-    typeof res.error.data === 'object' &&
-    res.error.data !== null
-  ) {
-    return right(res.error.data);
-  }
-
   return right(res.data);
 }

Apply fix via Nx Cloud  Reject fix via Nx Cloud


Or Apply changes locally with:

npx nx-cloud apply-locally o4xt-x66H

Apply fix locally with your editor ↗   View interactive diff ↗



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

@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: 3

🤖 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/journey-app/main.ts`:
- Around line 211-213: The call to journeyClient.start({ journey: journeyName })
can return non-Step results, so guard the result before calling renderForm();
check the returned value (the variable step) is a valid Step (e.g., truthy and
has the expected method/property your flow relies on) and only call renderForm()
when that check passes; if the result is not a valid Step, set errorEl.innerHTML
= errorHtml (or update the UI appropriately) and bail out/return to avoid
throwing during retry handling. Ensure you reference the journeyClient.start
call and the step variable when adding the conditional guard around
renderForm().

In `@packages/journey-client/src/lib/client.store.ts`:
- Around line 159-162: The parser parseJourneyResponse currently returns a
no_response_data branch before it inspects error.data, which prevents
createJourneyObject from receiving error payloads (e.g., LoginFailure); update
parseJourneyResponse in journey.utils.ts to check and parse error.data
(extracting the payload/error body) before falling back to the no_response_data
case so the onRight path can yield the proper error-based JourneyResult; apply
the same reorder/fix to the other similar branch referenced in the review so
both parsing paths prioritize error.data parsing ahead of the no-data return.

In `@packages/journey-client/src/lib/journey.utils.ts`:
- Around line 89-107: The HTTP-error branch that checks res.error with a numeric
status and object body (the block that returns right(res.error.data)) must be
moved above the no-data guard that currently returns left({ error:
'no_response_data', ... }); update the logic in journey.utils.ts so the
numeric-status/object-data check (the res.error && 'status' in res.error &&
typeof res.error.status === 'number' && typeof res.error.data === 'object' &&
res.error.data !== null) runs before the if (!res.data) guard, ensuring HTTP
error bodies are returned via right(...) instead of being swallowed by the
no_response_data branch.
🪄 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: 45f63ebb-1565-4bb0-a212-035f2eca3bb3

📥 Commits

Reviewing files that changed from the base of the PR and between d947ac2 and e5badbe.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (10)
  • .changeset/whole-mangos-find.md
  • e2e/journey-app/main.ts
  • packages/journey-client/api-report/journey-client.api.md
  • packages/journey-client/api-report/journey-client.types.api.md
  • packages/journey-client/package.json
  • packages/journey-client/src/lib/client.store.test.ts
  • packages/journey-client/src/lib/client.store.ts
  • packages/journey-client/src/lib/journey.utils.test.ts
  • packages/journey-client/src/lib/journey.utils.ts
  • packages/journey-client/src/types.ts

Comment thread e2e/journey-app/main.ts
Comment on lines +211 to +213
step = await journeyClient.start({ journey: journeyName });
renderForm();
errorEl.innerHTML = errorHtml;

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

Guard the restart result before calling renderForm().

journeyClient.start() can return non-Step results. Calling renderForm() unconditionally can throw and break the submit flow on retry failures.

🧰 Tools
🪛 ast-grep (0.43.0)

[warning] 212-212: Direct modification of innerHTML or outerHTML properties detected. Modifying these properties with unsanitized user input can lead to XSS vulnerabilities. Use safe alternatives or sanitize content first.
Context: errorEl.innerHTML = errorHtml
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation [REFERENCES]
- https://owasp.org/www-community/xss-filter-evasion-cheatsheet
- https://cwe.mitre.org/data/definitions/79.html

(dom-content-modification)


[warning] 212-212: Direct HTML content assignment detected. Modifying innerHTML, outerHTML, or using document.write with unsanitized content can lead to XSS vulnerabilities. Use secure alternatives like textContent or sanitize HTML with libraries like DOMPurify.
Context: errorEl.innerHTML = errorHtml
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation [REFERENCES]
- https://www.dhairyashah.dev/posts/why-innerhtml-is-a-bad-idea-and-how-to-avoid-it/
- https://cwe.mitre.org/data/definitions/79.html

(unsafe-html-content-assignment)

🤖 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/journey-app/main.ts` around lines 211 - 213, The call to
journeyClient.start({ journey: journeyName }) can return non-Step results, so
guard the result before calling renderForm(); check the returned value (the
variable step) is a valid Step (e.g., truthy and has the expected
method/property your flow relies on) and only call renderForm() when that check
passes; if the result is not a valid Step, set errorEl.innerHTML = errorHtml (or
update the UI appropriately) and bail out/return to avoid throwing during retry
handling. Ensure you reference the journeyClient.start call and the step
variable when adding the conditional guard around renderForm().

Comment thread packages/journey-client/src/lib/client.store.ts Outdated
Comment thread packages/journey-client/src/lib/journey.utils.ts Outdated
@pkg-pr-new

pkg-pr-new Bot commented Jun 4, 2026

Copy link
Copy Markdown

Open in StackBlitz

@forgerock/davinci-client

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

@forgerock/device-client

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

@forgerock/journey-client

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

@forgerock/oidc-client

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

@forgerock/protect

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

@forgerock/sdk-types

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

@forgerock/sdk-utilities

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

@forgerock/iframe-manager

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

@forgerock/sdk-logger

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

@forgerock/sdk-oidc

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

@forgerock/sdk-request-middleware

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

@forgerock/storage

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

commit: 348a636

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Deployed 8a67e47 to https://ForgeRock.github.io/ping-javascript-sdk/pr-670/8a67e47957304f803c9559c82f54b57a7a5457bc branch gh-pages in ForgeRock/ping-javascript-sdk

@codecov-commenter

codecov-commenter commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 20.54%. Comparing base (eafe277) to head (348a636).
⚠️ Report is 26 commits behind head on main.

❌ Your project status has failed because the head coverage (20.54%) 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     #670      +/-   ##
==========================================
+ Coverage   18.07%   20.54%   +2.47%     
==========================================
  Files         155      154       -1     
  Lines       24398    24825     +427     
  Branches     1203     1372     +169     
==========================================
+ Hits         4410     5101     +691     
+ Misses      19988    19724     -264     
Files with missing lines Coverage Δ
packages/journey-client/src/lib/client.store.ts 83.42% <100.00%> (+2.90%) ⬆️
packages/journey-client/src/lib/journey.utils.ts 93.05% <100.00%> (+16.38%) ⬆️
packages/journey-client/src/types.ts 100.00% <ø> (+96.77%) ⬆️

... and 10 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 4, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle Size Analysis

📦 Bundle Size Analysis

🆕 New Packages

🆕 @forgerock/device-client - 10.0 KB (new)
🆕 @forgerock/device-client - 0.0 KB (new)
🆕 @forgerock/journey-client - 93.0 KB (new)
🆕 @forgerock/journey-client - 0.0 KB (new)

➖ No Changes

@forgerock/protect - 144.6 KB
@forgerock/sdk-types - 7.9 KB
@forgerock/iframe-manager - 2.4 KB
@forgerock/storage - 1.5 KB
@forgerock/sdk-request-middleware - 4.6 KB
@forgerock/sdk-logger - 1.6 KB
@forgerock/sdk-oidc - 5.7 KB
@forgerock/sdk-utilities - 11.2 KB
@forgerock/davinci-client - 54.0 KB
@forgerock/oidc-client - 30.5 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

Comment thread packages/journey-client/src/lib/journey.utils.ts Outdated
Comment thread packages/journey-client/src/lib/journey.utils.ts Outdated
Comment thread e2e/journey-app/main.ts

@ryanbas21 ryanbas21 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.

Overall I approve, however in line with what Gabriel said I do think LoginFailure should be a Left in the Either data structure.

However - let's not merge this immediately. I think this PR warrants a team conversation as it's introducing a new way of doing something, and having feedback, and also Vatsal, your opinion and thoughts after stepping away from the code for a little bit would be valuable.

Comment thread packages/journey-client/src/lib/journey.utils.ts Outdated

@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.

i think this looks good. There are currently two comments that I think are relevant, but if they are resolved, then this is ready for me.

@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.

🧹 Nitpick comments (1)
e2e/journey-suites/src/login.test.ts (1)

29-30: ⚡ Quick win

Avoid asserting exact console copy for failure detection.

At Line 29 and Line 49, matching "Journey failed" ties these tests to log wording rather than behavior. Given e2e/journey-app/main.ts logs Error: ..., this can become brittle. Prefer asserting the rendered error content (#errorMessage) and keep console checks generic (or remove them).

Suggested update
-  expect(errorMessages.some((msg) => msg.includes('Journey failed'))).toBe(true);
+  await expect(page.locator('`#errorMessage`')).toContainText(/.+/);

-  expect(errorMessages.some((msg) => msg.includes('Journey failed'))).toBe(true);
+  await expect(page.locator('`#errorMessage`')).toContainText(/.+/);

Also applies to: 49-50

🤖 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/journey-suites/src/login.test.ts` around lines 29 - 30, The test is
asserting exact console text ("Journey failed") via
expect(errorMessages.some((msg) => msg.includes('Journey failed'))).toBe(true);
which is brittle; update the test to remove or loosen that console assertion and
instead assert the rendered error element (`#errorMessage`) contains the expected
message (e.g., get the element via document.querySelector('`#errorMessage`') and
expect its textContent to include the error substring), and if you still need a
console check make it generic (e.g.,
expect(errorMessages.length).toBeGreaterThan(0)) or remove it; apply the same
change for the duplicate assertion at the other occurrence (the second expect
that checks for "Journey failed").
🤖 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/journey-suites/src/login.test.ts`:
- Around line 29-30: The test is asserting exact console text ("Journey failed")
via expect(errorMessages.some((msg) => msg.includes('Journey
failed'))).toBe(true); which is brittle; update the test to remove or loosen
that console assertion and instead assert the rendered error element
(`#errorMessage`) contains the expected message (e.g., get the element via
document.querySelector('`#errorMessage`') and expect its textContent to include
the error substring), and if you still need a console check make it generic
(e.g., expect(errorMessages.length).toBeGreaterThan(0)) or remove it; apply the
same change for the duplicate assertion at the other occurrence (the second
expect that checks for "Journey failed").

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 375718d9-d747-4ab0-b60b-5ab0069262ff

📥 Commits

Reviewing files that changed from the base of the PR and between e5badbe and 6a2eea6.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • e2e/journey-suites/src/login.test.ts
  • packages/journey-client/api-report/journey-client.api.md
  • packages/journey-client/api-report/journey-client.types.api.md
  • packages/journey-client/package.json
  • packages/journey-client/src/lib/client.store.ts
  • packages/journey-client/src/lib/journey.utils.test.ts
  • packages/journey-client/src/lib/journey.utils.ts
  • packages/journey-client/src/types.ts
✅ Files skipped from review due to trivial changes (2)
  • packages/journey-client/api-report/journey-client.types.api.md
  • packages/journey-client/api-report/journey-client.api.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • packages/journey-client/src/lib/client.store.ts
  • packages/journey-client/package.json
  • packages/journey-client/src/lib/journey.utils.test.ts
  • packages/journey-client/src/lib/journey.utils.ts
  • packages/journey-client/src/types.ts

@vatsalparikh

Copy link
Copy Markdown
Contributor Author

Vatsal, your opinion and thoughts after stepping away from the code for a little bit would be valuable.

One thing I noticed while working on oidc client is we should be using Micro for start and next in journey-client to be consistent with the rest of the packages.

About thinking again how the code is structured I just feel that it's been reviewed quite thoroughly and I can't seem to think of a way of making this better without doing more refactor. If we refactor more, we can start to get better results. As far as this PR is concerned, I feel good about the structure right now. I don't think this is the correct PR for the larger refactor, that's all.

I also moved the Either right to the very bottom, so lefts are all handled first. Just made that change today.

@vatsalparikh vatsalparikh merged commit 832ce89 into main Jun 9, 2026
9 checks passed
@vatsalparikh vatsalparikh deleted the sdks-5097 branch June 9, 2026 21:39
@ryanbas21 ryanbas21 mentioned this pull request Jun 9, 2026
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