YNU-864: Compat layer correctness + cookbooks#148
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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. Comment |
- Fix compat codemod guidance to use @yellow-org/nitrolite-codemod package commands. - Document raw-unit transfer semantics, app-session decimal strings, and raw bigint token helpers. - Add EventPoller and compat errors cookbooks for migrated apps. - Keep Nitronode WS URLs as coming-soon placeholders until the canonical sandbox host is pinned. Resolves: F-006, F-007, F-008 (compat slice), F-009 (compat slice), F-031, F-032, F-033, F-048, F-049, F-050.
Use the public yellow-sdk-codemod GitHub workflow instead of an unpublished npm package command. Add a manual migration review checklist for the remaining import, client, auth, event, amount, error, and SSR checks after the codemod runs.
Document the planned @yellow-org/sdk-mcp workflow as coming soon and show how to use its migration prompt and lookup tools after publication.
Add coming-soon setup examples for Claude Code, Claude Desktop, Codex, Cursor, and VS Code from the planned @yellow-org/sdk-mcp package workflow.
Add a top-level Build sidebar page with card summaries for Co-Sign Checkout, Nitrolite Store, and Nexus P2P Transfer, including live demos, source repos, functionality, stack, and SDK usage.
Convert the Build examples page to horizontal screenshot cards, remove version/vendor wording from SDK lists, and add captured front-page screenshots for each deployed example.
67ef9f2 to
d6ddb4c
Compare
nksazonov
left a comment
There was a problem hiding this comment.
Good job! The migration content is clear and the amount-unit clarifications are a meaningful correctness improvement. A few code snippets in errors.mdx reference methods that aren't in the documented compat surface (getTokenBalance, getOpenChannels) and have a missing import — these will cause copy-paste failures and should be fixed before landing.
nksazonov
left a comment
There was a problem hiding this comment.
Every comment addressed — clean turnaround. The compat docs are in great shape now: accurate API surface, correct amount units, real import paths, typed enum for channel status, and a solid examples index. Ship it! 🚀
Summary
This PR updates the TypeScript compat SDK docs for apps migrating from
@erc7824/nitrolite@0.5.3to the v1 runtime through@yellow-org/sdk-compat. It also adds a Build examples page with deployed apps, screenshots, source links, and stack/SDK notes.Intent
@yellow-org/sdk-compatand native@yellow-org/sdksurfaces.layer-3/yellow-sdk-codemodsource workflow.@yellow-org/sdk-mcpis published.Files Touched
docs/nitrolite/build/sdk/typescript-compat/overview.mdx: compat package purpose, installation, quick start, amount units, supported surface, and limits.docs/nitrolite/build/sdk/typescript-compat/migration-overview.mdx: codemod flow, MCP coming-soon note, client construction, migration matrix, and manual migration review areas.docs/nitrolite/build/sdk/typescript-compat/migration-onchain.mdx: deposits, withdrawals, channel operations, native fallback guidance, and amount handling.docs/nitrolite/build/sdk/typescript-compat/migration-offchain.mdx: auth helpers, app sessions, transfers, ledger queries, EventPoller, and typed error handling.docs/nitrolite/build/sdk/typescript-compat/event-poller.mdx: polling bridge for migrated server-push event handlers.docs/nitrolite/build/sdk/typescript-compat/errors.mdx: typed compat errors and recovery recipes.docs/nitrolite/build/examples.mdx: new Build examples index for Co-Sign Checkout, Nitrolite Store, and Nexus P2P Transfer.static/img/nitrolite/examples/*.png: captured front-page screenshots for the examples cards.src/css/custom.css: horizontal examples-card layout and centered screenshot media frames.What Changed
git clone,npm install,npm run build, andnode dist/cli.jsbecause the npm package is not published yet.bigint, transfers use raw asset-unit strings, app-session allocations use human-readable decimal strings, and direct native SDK calls useDecimal.checkpointChannel(...).Validation
git diff --checknpm run build/nitrolite/build/examplesin dark mode.npm view @yellow-org/sdk-mcp versioncurrently returns 404, so the MCP flow remains labeled coming soon.The docs build still reports existing warnings from versioned 0.5.x and Clearnet contract docs. This PR does not add compat-page broken links or anchors.