Skip to content

Troubleshooting and browsersdk#108

Merged
predatorx7 merged 3 commits intomainfrom
troubleshooting_and_browsersdk
Jan 31, 2026
Merged

Troubleshooting and browsersdk#108
predatorx7 merged 3 commits intomainfrom
troubleshooting_and_browsersdk

Conversation

@madhavanmalolan
Copy link
Contributor

@madhavanmalolan madhavanmalolan commented Jan 30, 2026

Description

Testing (ignore for documentation update)

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist:

Additional Notes:

Summary by CodeRabbit

  • Documentation
    • Reorganized troubleshooting guides; clarified titles and descriptions
    • Added an "anatomy" doc detailing verification message structure and common errors
    • Expanded JS SDK guidance: new initialization options, callbacks (success/cancel), redirect and parameter examples
    • Replaced error-callback guidance with cancellation-focused handling; removed some legacy redirect examples

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link
Contributor

vercel bot commented Jan 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jan 31, 2026 8:54am

Request Review

@CLAassistant
Copy link

CLAassistant commented Jan 30, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ predatorx7
❌ madhavanmalolan


madhavanmalolan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Restructures documentation: updates JS SDK initialization flow (adds proofRequestOptions, callbacks, redirect handling), adds troubleshooting "anatomy" doc, adjusts troubleshooting pages/metadata, removes some redirect/callback sections from generating-proof, and small text/front-matter edits across troubleshooting docs.

Changes

Cohort / File(s) Summary
JS SDK — preparing request
content/docs/js-sdk/preparing-request.mdx
Reworks backend GET flow to use ReclaimProofRequest.init(..., options) with proofRequestOptions (useAppClip, customSharePageUrl), adds success/cancel callbacks, redirect URLs, setParams/metadata guidance, in-browser SDK warnings and removal snippet; updates examples and signatures.
JS SDK — generating proof
content/docs/js-sdk/generating-proof.mdx
Removed sections about redirect-after-proof and custom error redirect URL (text/examples deleted).
Troubleshooting — new content
content/docs/troubleshooting/anatomy.mdx
Added new doc describing proof-request/proof-response message structures, common error types, and RECLAIM_EXCEPTION metadata format.
Troubleshooting — edits
content/docs/troubleshooting/index.mdx, content/docs/troubleshooting/analytics-event.mdx, content/docs/troubleshooting/potential-failure-reasons.mdx, content/docs/troubleshooting/enable-troubleshooting-mode.mdx
Replaced “Error Callbacks” with “Handling Cancellation & Errors” and updated related guidance; minor textual change renaming “Client-Side Log Events” to “InApp SDK”; updated front-matter titles/descriptions; removed one heading from potential-failure-reasons.
Navigation/meta updates
content/docs/fully-hosted/meta.json, content/docs/troubleshooting/meta.json
Removed "index" entry from fully-hosted pages array; inserted "anatomy" into troubleshooting pages array (positioned after analytics-event).

Sequence Diagram(s)

sequenceDiagram
  participant Client as Client (Browser)
  participant Backend as Backend (ReclaimProofRequest.init)
  participant Provider as Verification Provider
  participant Callback as App Callback URL

  rect rgba(200,200,255,0.5)
  Client->>Backend: Request proof init (APP_ID, APP_SECRET, PROVIDER_ID, proofRequestOptions)
  Backend->>Provider: Create proof request (includes options, params, redirect URLs)
  Provider-->>Backend: Proof generated / cancelled (async)
  Backend->>Callback: POST success or cancel payload (includes proof / exception metadata)
  Backend->>Client: Redirect to success or cancel URL (if set)
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

documentation

Suggested reviewers

  • madhavanmalolan
  • Sajjad21990
  • kryptocodes

Poem

🐰 I hopped through docs with eager paws,

Tweaked init flows and mended flaws.
New anatomy blooms, callbacks find their place,
Redirects sorted, in-browser notes embraced.
Hooray — the docs now hop with grace! 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and generic, using non-descriptive phrasing ('Troubleshooting and browsersdk') that doesn't clearly convey the specific nature of the changes across multiple documentation files. Consider a more specific title that summarizes the main change, such as 'Reorganize troubleshooting docs and update JS SDK preparation guide' to provide clearer context about the documentation restructuring and content updates.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch troubleshooting_and_browsersdk

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.

Copy link

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
content/docs/js-sdk/preparing-request.mdx (1)

40-59: ⚠️ Potential issue | 🟠 Major

Fix the sample: options are undeclared and currently ignored.

The snippet assigns to proofRequestOptions without a declaration (throws in strict mode) and initializes twice, so the options never affect the JSON you return.

🔧 Suggested fix
-  proofRequestOptions = {
+  const proofRequestOptions = {
     ..., //other options, if any
     useAppClip: false,
     customSharePageUrl: 'https://portal.reclaimprotocol.org'
   }
-  const proofRequest = await ReclaimProofRequest.init(      
-      process.env.RECLAIM_APP_ID,
-      process.env.RECLAIM_APP_SECRET,
-      providerId,
-      proofRequestOptions);
-
-  // Initialize SDK with server-side environment variables (secure)
-  const reclaimProofRequest = await ReclaimProofRequest.init(
-      process.env.RECLAIM_APP_ID,
-      process.env.RECLAIM_APP_SECRET,
-      providerId,
-  );
+  // Initialize SDK with server-side environment variables (secure)
+  const reclaimProofRequest = await ReclaimProofRequest.init(
+      process.env.RECLAIM_APP_ID,
+      process.env.RECLAIM_APP_SECRET,
+      providerId,
+      proofRequestOptions,
+  );
🤖 Fix all issues with AI agents
In `@content/docs/js-sdk/preparing-request.mdx`:
- Line 172: Replace the typo "snipped" with "snippet" in the sentence that reads
"You can disable by removing this configuration from the above snipped :" so it
becomes "You can disable by removing this configuration from the above snippet
:"; update the text in the preparing-request.mdx content where that sentence
appears.
- Around line 94-101: Update the broken analytics-event link in the "Error
Callback URL" section of preparing-request.mdx: replace the href that points to
/troubleshooting/analytics-event#description-of-reclaim_exception-in-metadata
with /troubleshooting/anatomy#description-of-reclaim_exception-in-metadata so
the text around reclaimProofRequest.setErrorCallbackUrl(...) points to the new
anatomy anchor; confirm the anchor name matches the target heading in the
anatomy doc and update the link string accordingly.
- Around line 117-120: The example JavaScript call to
reclaimProofRequest.setCancelRedirectUrl has a missing closing quote on the
string literal; update the example so the URL string is properly terminated (add
the missing closing double-quote before the closing parenthesis) in the
reclaimProofRequest.setCancelRedirectUrl(...) invocation.

In `@content/docs/troubleshooting/anatomy.mdx`:
- Around line 100-103: The "Cancelation" section currently contains a TODO
placeholder; replace that placeholder in the "Cancelation" heading block with a
complete description of the cancel callback payload (fields, types, example
usage and any edge cases) or remove the entire "Cancelation" section until
ready; update the section under the "# Cancelation" heading to include the
cancel callback payload schema and a short example of how to handle the callback
so readers can understand what to expect from the cancel callback payload.

In-Browser SDK use is available only for users on a premium enterprise plan. Please [contact support](https://t.me/protocolreclaim) for more details.
</Callout>

If you don't want to use the in-browser SDK, the users will be asked to install the Reclaim Protocol App/Appclip. You can disable by removing this configuration from the above snipped :
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Typo: “snipped” → “snippet”.

This reads better and matches standard usage.

✏️ Suggested fix
-You can disable by removing this configuration from the above snipped :
+You can disable by removing this configuration from the above snippet:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
If you don't want to use the in-browser SDK, the users will be asked to install the Reclaim Protocol App/Appclip. You can disable by removing this configuration from the above snipped :
If you don't want to use the in-browser SDK, the users will be asked to install the Reclaim Protocol App/Appclip. You can disable by removing this configuration from the above snippet:
🧰 Tools
🪛 LanguageTool

[grammar] ~172-~172: Ensure spelling is correct
Context: ...oving this configuration from the above snipped : js //REMOVE : proofRequestOptions = { ..., //other options, if any useAppClip: false, customSharePageUrl: 'https://portal.reclaimprotocol.org' } const proofRequest = await ReclaimProofRequest.init(appId, appSecret, providerId, proofRequestOptions); [See reference implementation](https://gi...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
In `@content/docs/js-sdk/preparing-request.mdx` at line 172, Replace the typo
"snipped" with "snippet" in the sentence that reads "You can disable by removing
this configuration from the above snipped :" so it becomes "You can disable by
removing this configuration from the above snippet :"; update the text in the
preparing-request.mdx content where that sentence appears.

@predatorx7 predatorx7 merged commit decf5a0 into main Jan 31, 2026
1 of 3 checks passed
@predatorx7 predatorx7 deleted the troubleshooting_and_browsersdk branch January 31, 2026 08:53
@coderabbitai coderabbitai bot mentioned this pull request Jan 31, 2026
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants