Skip to content

feat(solana-react): add v7 bindings - #387

Merged
leonidaz merged 83 commits into
octanejs:mainfrom
jonkwheeler:jon/solana-react-binding
Aug 9, 2026
Merged

leonidaz merged 83 commits into
octanejs:mainfrom
jonkwheeler:jon/solana-react-binding

Conversation

@jonkwheeler

@jonkwheeler jonkwheeler commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Octane applications can now use the React-specific Solana v7 client, Wallet Standard discovery/selection, request queries, and sign -> send -> confirm transaction flow without shipping React. Framework-neutral address, codec, RPC, signer, and transaction-message work remains direct @solana/kit usage rather than a redundant Octane wrapper.

@solana/react and the complete Kit family are pinned to 7.0.0. The binding exposes the portable client/provider/store and request-query seam; SWR, streamed query hooks, and upstream wallet-selected exports that leak React types remain explicit divergences.

Design decisions

  • Wallet Standard stays a private structural adapter because there is no second Octane consumer and no React type crosses the public boundary.
  • Wallet events are validated, generation-scoped, deduplicated, and cleaned up on registry replacement or unmount.
  • Selection retains the source wallet identity, rebinds to fresh account objects after change events, rejects non-Solana accounts, and clears when the selected adapter disappears.
  • Transaction authority is checked before dispatch and again after signing. Once send returns a signature, confirmation failure or later context replacement produces an indeterminate result with a confirmation-only reconciliation path; signing and sending are never retried.
  • TanStack request queries preserve boolean and functional enabled semantics and forward cancellation signals to both supported request-source shapes.

Validation

  • pnpm exec vitest run --project solana-react - 30 tests pass across seven files.
  • pnpm exec tsrx-tsc --noEmit -p packages/solana-react/tsconfig.json - package types pass.
  • pnpm typecheck - full root typecheck passes.
  • Hook-slot registry and website MCP content tests pass after registering the new binding.
  • Generated binding status, package inventory, CLI data, parity gaps, changeset, and TSRX declaration checks pass.
  • Targeted package pack produces the expected 13-file archive; all generic pack canaries completed.

The tests use deterministic clients, registries, request sources, signers, senders, and confirmation doubles. They cover client replacement and cleanup, malformed/stale wallet events, same-address wallet authority, query cancellation, missing capabilities, pre-dispatch cancellation, post-dispatch reconciliation, real provider SSR/hydration, DOM adoption, and teardown.

The repository-wide Vitest run was bounded after it surfaced unrelated existing Lucide dynamic-icon parity and generated eval-corpus failures. The two failures caused by this package's initial registration were fixed and their focused suites pass.

Post-Deploy Monitoring & Validation

No additional production monitoring is required because this adds an unpublished library binding with no deployed service.

  • Validation window: CI and the first downstream Solana host fixture.
  • Owner: binding maintainers.
  • Healthy signal: package/type/generated/pack gates remain green; provider and Wallet Standard listeners return to zero on teardown.
  • Failure signal: Solana family versions drift, React enters the runtime archive, replaced wallets keep authority, or a post-send failure loses its reconciliation handle.
  • Mitigation trigger: block release and revert or narrow the affected public surface.

New concepts

Reconciliation after an irreversible send

Before a transaction is sent, a changed wallet, cluster, or payload can safely cancel the operation. After the network accepts a signature, cancellation is no longer truthful: the transaction may exist even if confirmation failed or the UI moved to another wallet.

This binding returns an indeterminate result containing the known signature and a confirmation-only reconcile callback. Reconciliation never signs or sends again. Use this pattern after irreversible external dispatch; do not use it for idempotent request queries that can be cancelled and restarted.


Compound Engineering

Provenance

  • An agent produced this diff (agent-authored)

Note

High Risk
Adds wallet/transaction orchestration (pre- and post-dispatch authority) plus concurrent core compiler/reconciler and production bundle side-effect changes that can affect hydration and tree-shaking across many bindings.

Overview
Introduces @octanejs/solana-react (@solana/[email protected]): ClientProvider / client store hooks (resolved clients only—thenables throw at mount), structural createWalletStore instead of upstream React wallet hooks, createTransactionExecutor for explicit sign/send/confirm with post-send indeterminate + reconcile, and useRequestQuery on @octanejs/tanstack-query with upstream-aligned sources plus an Octane { send } shape. Vendored upstream, pristine/adapted runtime and type parity, SSR/hydration wiring, MCP/CLI binding maps, and generated inventory/status docs register the 57th binding.

Alongside that, octane patch changesets describe compiler/runtime work: skip reconciling unchanged compiler-cached renderable children while keeping context/hidden-tree effects, trim server init and production compiler output, preserve bootstrap side effects for compiler hooks and TanStack Start hydration, and mark reviewed binding packages tree-shakeable with narrow sideEffects entries for required Aria focus/transition init. @octanejs/mcp-server gains exposure of a minimal-import bundle reachability benchmark.

Reviewed by Cursor Bugbot for commit 6bcacde. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
octane-website Ready Ready Preview Jul 31, 2026 1:25am
octane-website-mcp Ready Ready Preview Jul 31, 2026 1:25am

Request Review

@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 29, 2026 18:53 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 29, 2026 18:54 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 29, 2026 21:25 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 29, 2026 21:26 Inactive
…/solana-react-binding

# Conflicts:
#	packages/octane-evals/datasets/train/user-apps-v1/manifest.jsonl
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 29, 2026 22:27 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 29, 2026 22:28 Inactive
Comment thread packages/solana-react/src/query.ts Resolved
- version reactive client snapshots
- normalize omitted query options compiler slots
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 29, 2026 23:02 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 29, 2026 23:02 Inactive
Comment thread packages/solana-react/src/wallet.ts Resolved
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 29, 2026 23:17 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 29, 2026 23:18 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 29, 2026 23:26 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 29, 2026 23:27 Inactive
# Conflicts:
#	docs/bindings-status.md
#	packages/octane-evals/datasets/train/user-apps-v1/manifest.jsonl
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 29, 2026 23:55 Inactive
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

@leonidaz This draft PR is ready for the maintainer READY FOR REVIEW label: still draft, 0 unresolved threads, CLEAN/mergeable with main, and Cursor Bugbot completed on head cc939b24 (NEUTRAL — 1 potential issue noted, all review threads resolved). I do not have permission to apply the label from the fork (AddLabelsToLabelable 403).

Cache the idle useRequestQuery result object and update it in place when
the underlying TanStack result changes, preserving referential stability
across parent re-renders.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

@leonidaz This draft PR is ready for the maintainer READY FOR REVIEW label: still draft, 0 unresolved threads, CLEAN/mergeable with main, and Cursor Bugbot passed on head ce5af3ac. Label apply returned 403 (AddLabelsToLabelable). Thanks!

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Withdrawing the ready signal for now: main has moved and this branch is now conflicting/DIRTY, so the ready checklist no longer holds. I'll merge main, resolve the conflicts, wait for Cursor Bugbot on the new head, and re-post the ready signal once everything is clean.

REVIEW WITHDRAWN

Resolve react-parity audit conflicts by refreshing lockfileSha256 and
vitest.config.js evidence hashes for the merged tree (hook-form,
react-map-gl, livestore manifests).

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Resolving the conflicts now by merging origin/main into this branch (no rebase). Will wait for Cursor Bugbot on the new head before signaling ready again.

Keep generated package/binding inventory and eval corpus digests current after merging origin/main into the solana-react binding branch.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Main merge conflicts are resolved on head d6c05bb91 (inventories refreshed). Checklist: still draft, 0 unresolved threads, CLEAN/mergeable with main, Cursor Bugbot completed SUCCESS on this head with no open findings.

READY FOR REVIEW

Comment thread vitest.config.js Resolved
jonkwheeler and others added 2 commits August 9, 2026 00:47
Wire packages/solana-react into the generic react-parity:check path with a
vendored @solana/[email protected] pin, pristine/adapted runtime lanes, and
repo-authored type probes, while keeping Octane-only conformance outside
parity ownership.

Co-authored-by: Cursor <[email protected]>
Resolve inventory/lockfile conflicts after merging main and refresh
react-parity evidence hashes for the new solana-react lanes.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Addressed maintainer feedback by adding the React-parity control plane for @octanejs/solana-react (vendored @solana/[email protected], pristine/adapted lanes + type probes, testExecution ownership), then merged origin/main and re-verified.

Checklist: still draft, 0 unresolved threads, CLEAN/mergeable with main, Cursor Bugbot completed SUCCESS on head af183adf0 with no open findings.

READY FOR REVIEW

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

Reviewed for React-parity and Vitest conformance only.

Comment thread packages/solana-react/UPSTREAM.md Resolved
Address leonidaz feedback: run useRequestQuery in the pristine suite with
per-file dispositions and omission/rename controls, adapt the overlapping
cases, and replace repo-authored type probes with upstream __typetests__
lanes plus assertion-group inventories.

Co-authored-by: Cursor <[email protected]>
Comment thread packages/solana-react/src/query.ts Resolved
PendingRpcRequest duck-types expose both APIs; dispatch through
reactiveStore().withSignal so getAbortSignal composition matches upstream.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Parity feedback from leonidaz is addressed on head 2b5d6ecff: pristine/adapted runtime covers ClientProvider, useClientCapability, and useRequestQuery with per-file dispositions + omission/rename controls; upstream __typetests__ drive pristine/adapted type lanes (no repo-authored probe substitution). Bugbot completed SUCCESS on this head with 0 unresolved threads. Still draft; CLEAN vs main.

READY FOR REVIEW

Preserve every selected pristine runtime identity in the adapted suite,
expand the pristine type lane across wallet/transaction/query typetests
with machine-checkable dispositions, and reject thenable ClientProvider
clients at mount.

Co-authored-by: Cursor <[email protected]>

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit ec78ef0. Configure here.

Include every adapted and pristine-only upstream typetest in
pristine-types.json so assertion-group drift is caught for wallet,
signing, request, and deferred query artifacts.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Parity feedback addressed on head 4b63a9ac6: adapted runtime is one-for-one with the 31 selected pristine identities; pristine type lane covers all adapted + pristine-only typetests (12 pinned files) with machine-checkable dispositions for all 16 vendored artifacts; Bugbot SUCCESS with 0 unresolved findings. Still draft; CLEAN vs main.

READY FOR REVIEW

Resolve generated inventory/parity conflicts mechanically and run pnpm sync
so solana-react stays in the regenerated package inventory.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Merged origin/main, resolved inventory/parity conflicts, and cleared open review threads. Cursor Bugbot completed on the current head with no unresolved findings.

READY FOR REVIEW

Keep neighbor react-parity manifests aligned after vitest.config.js changed for solana-react lanes, and satisfy Prettier on the new audit file.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

CI formatting/parity integrity refreshed on head; Bugbot clean; no open threads.

READY FOR REVIEW

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent feat PR: new feature or capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants