docs(pair-code): document companion_platform_display OS canonicalization - #381
Conversation
… override Follow-up docs for whatsapp-rust#979, which fixed the pair-code server rejecting a non-OS companion_platform_display with bad-request. Adds the CompanionOs classification table, the new PairCodeOptions::display_os escape hatch, and the rate-limit note on RequestFailed/bad-request.
…:display_os Follow-up to whatsapp-rust#979. The struct-literal example now needs ..Default::default() since PairCodeOptions gained a new display_os field, and the companion_platform_display tip now reflects OS canonicalization.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 54 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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. Comment |
There was a problem hiding this comment.
1 issue found across 2 files
Confidence score: 4/5
- In
concepts/authentication.mdx, the new pair-code error note appears to overstate that display-relatedbad-requestis already eliminated by library canonicalization, which may be inaccurate now thatPairCodeOptions...is introduced; merging as-is could mislead integrators about when this error can still occur and cause incorrect client-side handling—tighten the wording to reflect conditional behavior (or document the exact preconditions) before merging.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
- Restore the opening `---` front matter delimiter dropped in the previous commit, which broke Mintlify's page title/description parsing (found by Greptile review). - Qualify the pair-code bad-request note: display-shaped rejections are ruled out only by default, not when a caller bypasses canonicalization via PairCodeOptions::display_os (found by cubic review).
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Auto-approved: Pure documentation and comment update: adds docstrings, clarifies server behavior for companion_platform_display OS canonicalization, and updates an example with Default::default(). No production logic, configuration, or infrastructure changes.
Re-trigger cubic
Summary
Documents the behavior/API changes from whatsapp-rust#979 ("fix(pair-code): canonicalize companion_platform_display OS to a server-safe set"), which fixed the pair-code
companion_helloserver rejecting a non-OScompanion_platform_displaywithbad-request.Changes
concepts/authentication.mdxPairCodeOptionsstruct reference: added the newdisplay_os: Option<String>field, and corrected theplatform_iddoc comment (the display is no longer always non-overridable).companion_platform_displaysection: replaced the "empty OS substitutes Linux, no browser whitelist" description with the newCompanionOscanonicalization behavior — a classification table (Windows/Mac OS/Linux/Android/iOSand their recognized aliases), the branding→Linuxfallback, the one-time coercion warning, and thedisplay_osescape hatch for advanced callers who need a real but non-canonical OS name (e.g."Ubuntu") to ride through verbatim.PairError::RequestFailedcarryingbad-request(400) can indicate server-side rate-limiting rather than a permanent validation failure, and that thebackoffhint onIqError::ServerErroris preserved.api/bot.mdxwith_pair_codeexample: added..Default::default()to thePairCodeOptionsstruct literal (needed to keep compiling now that the struct has a new field).with_pair_codeTip: updated to describe the OS canonicalization and point atPairCodeOptions::display_osand the new classification table inconcepts/authentication.mdx.No changelog changes included, per instructions.
Test plan
/concepts/authentication#companion-platform-display,/api/errors#iqerror-base-type) resolve🤖 Generated with Claude Code
Generated by Claude Code
Summary by cubic
Documents OS canonicalization for pair-code
companion_platform_display, adds thePairCodeOptions::display_osoverride, and restores the front-matter delimiter so Mintlify parses page metadata. Updates thewith_pair_codeexample with..Default::default()and clarifies thatbad-request(400) may be rate limiting by default (unlessdisplay_osbypasses canonicalization), preserving any serverbackoffhint.Written for commit 25f03f2. Summary will update on new commits.