Skip to content

YNU-864: Compat layer correctness + cookbooks#148

Open
ihsraham wants to merge 8 commits intodocs/reorg-for-v1from
feat/ynu-864-compat-correctness-cookbooks
Open

YNU-864: Compat layer correctness + cookbooks#148
ihsraham wants to merge 8 commits intodocs/reorg-for-v1from
feat/ynu-864-compat-correctness-cookbooks

Conversation

@ihsraham
Copy link
Copy Markdown
Collaborator

@ihsraham ihsraham commented May 7, 2026

Summary

This PR updates the TypeScript compat SDK docs for apps migrating from @erc7824/nitrolite@0.5.3 to 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

  • Make the compat migration path accurate against the public @yellow-org/sdk-compat and native @yellow-org/sdk surfaces.
  • Replace stale codemod instructions with the current public layer-3/yellow-sdk-codemod source workflow.
  • Keep MCP-assisted migration marked as coming soon until @yellow-org/sdk-mcp is published.
  • Give builders a quick examples index for deployed Nitrolite apps they can inspect and compare.

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

  • Documented the codemod as git clone, npm install, npm run build, and node dist/cli.js because the npm package is not published yet.
  • Added a compact MCP-assisted migration preview without tool-specific commands that would not run before publication.
  • Clarified compat amount rules: deposits and withdrawals use raw token-unit bigint, transfers use raw asset-unit strings, app-session allocations use human-readable decimal strings, and direct native SDK calls use Decimal.
  • Reworked the migration overview, on-chain guide, and off-chain guide around the actual compat API behavior.
  • Made the compat limits explicit, including unsupported server-push events and fail-fast checkpointChannel(...).
  • Added EventPoller and errors/recovery cookbooks for the parts migrated apps still need to handle manually.
  • Added a top-level Build examples page with live demo links, source repos, functionality summaries, stack notes, SDK packages, and visible screenshots.

Validation

  • git diff --check
  • npm run build
  • Local browser check for /nitrolite/build/examples in dark mode.
  • Live example URLs returned HTTP 200 for Co-Sign Checkout, Nitrolite Store, and Nexus P2P Transfer.
  • npm view @yellow-org/sdk-mcp version currently returns 404, so the MCP flow remains labeled coming soon.
  • Checked that the docs do not use the unpublished npm codemod command, fake sandbox hostnames, or human-readable transfer amounts where raw asset units are required.
  • GitHub verifies the latest commit signature as valid.

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.

@ihsraham ihsraham requested a review from dpatsora as a code owner May 7, 2026 11:30
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4566563c-46e8-47be-8097-3d5d0eb69579

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ynu-864-compat-correctness-cookbooks

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.

ihsraham added 8 commits May 8, 2026 13:06
- 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.
@ihsraham ihsraham force-pushed the feat/ynu-864-compat-correctness-cookbooks branch from 67ef9f2 to d6ddb4c Compare May 8, 2026 07:43
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.

1 participant