Skip to content

feat: add Solana Kit and framework-kit examples (P-2417) - #338

Merged
yosriady merged 18 commits into
mainfrom
with-solana/readme-framework-kit
Sep 6, 2026
Merged

feat: add Solana Kit and framework-kit examples (P-2417)#338
yosriady merged 18 commits into
mainfrom
with-solana/readme-framework-kit

Conversation

@yosriady

@yosriady yosriady commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Addresses P-2417 and validates the SDK change in getformo/sdk#386.

Changes

  • Adds with-solana-framework-kit as the recommended Solana dapp setup using @solana/client, @solana/react-hooks, and client.store.
  • Migrates with-solana to the lower-level Solana Kit stack: @solana/kit, wallet/RPC plugins, and @solana/react.
  • Uses Wallet Standard autocapture for detect, connect, and disconnect.
  • Keeps wallet, RPC, and Formo clusters aligned across Devnet/Mainnet/Testnet switches.
  • Updates the examples index and CI matrix for both examples.

Validation

  • Both examples pass TypeScript and production builds
  • Both Solana production dependency audits pass
  • Latest SDK PR build linked locally into both examples
  • Browser smoke test drives both app UIs and captures exactly one detect, connect, and disconnect on Devnet

The framework example retains a compatibility cast while CI installs the currently published SDK. After SDK #386 is released, bump the dependency and remove that cast before merging this PR.

@linear-code

linear-code Bot commented Sep 3, 2026

Copy link
Copy Markdown

P-2417

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 3 files

Re-trigger cubic

…le actually uses

The tech stack listed Next.js 14, Solana Web3.js and @solana/wallet-adapter-react, none of which the example uses, and linked the removed PR #157 integration. Every line now matches package.json, the top states the example is framework-kit, and the events table names each event's source. Part of P-2417.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_015USSsGzRcCswNCNv6eTc8X
@yosriady
yosriady force-pushed the with-solana/readme-framework-kit branch from 16fe7f2 to 3cfcb5d Compare September 4, 2026 03:36
@yosriady

yosriady commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up review complete in 3cfcb5d. Cubic found no issues, and I additionally corrected the transaction-source wording: this example's framework-kit React hooks keep transaction state outside client.store, so the demos explicitly call formo.transaction(). The branch is now rebased onto current main, removing the unrelated e2e commit from this PR.

@yosriady

yosriady commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Real-wallet validation uncovered and fixed a separate network mismatch in f19421d:

  • Wallet Standard sessions now receive the app's selected cluster.
  • Network switches disconnect the old session before reconnecting on the new cluster.
  • MetaMask's current signTransaction path keeps its restored mainnet scope, so the example selects its chain-aware signAndSendTransaction capability when both are available.

Verified with the MetaMask browser wallet: the app dropdown and MetaMask signing prompt now both show Devnet. The example builds against both the locally linked P-2416 SDK and published @formo/analytics@1.38.2.

@cubic-dev-ai cubic-dev-ai 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.

2 issues found across 2 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="with-solana/src/components/wallet/NetworkSwitcher.tsx">

<violation number="1" location="with-solana/src/components/wallet/NetworkSwitcher.tsx:28">
P2: When a user changes the select again before the first switch finishes, concurrent handlers can apply selections out of order. A slower earlier handler can overwrite the latest RPC selection or leave the next Wallet Standard session targeting a different cluster; serialize switches or ignore stale requests.</violation>
</file>

<file name="with-solana/src/lib/solana.ts">

<violation number="1" location="with-solana/src/lib/solana.ts:46">
P2: After a network switch, MetaMask reconnects with the cluster captured during module initialization because this spread snapshots the live `defaultChain` getter. Preserve the connector property descriptor or wrap the connector without cloning it so `setWalletStandardCluster` is observed.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread with-solana/src/components/wallet/NetworkSwitcher.tsx Outdated
Comment thread with-solana/src/lib/solana.ts Outdated
@yosriady yosriady changed the title docs(with-solana): README matches the framework-kit stack (P-2417) feat: add Solana Kit and framework-kit examples (P-2417) Sep 4, 2026
@socket-security

socket-security Bot commented Sep 4, 2026

Copy link
Copy Markdown

Dependency limit exceeded — report not shown.

This pull request scan exceeded the 10,000-dependency limit applied to this scan, so the results are incomplete and may be inaccurate. To avoid reporting false positives, Socket has not posted a report.

Upgrade your plan to raise the dependency limit and get complete reports, or view the partial scan in the dashboard.

Socket is always free for open source. If this is a non-commercial open source project, contact us to request a free Team account.

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 30 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread with-solana/src/components/wallet/WalletButton.tsx
Comment thread with-solana/src/app/providers.tsx
Comment thread with-solana/src/components/WalletInfo.tsx
Comment thread with-solana/src/components/wallet/NetworkSwitcher.tsx Outdated

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 8 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread with-solana/src/components/WalletInfo.tsx

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 2 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread with-solana/src/components/wallet/WalletButton.tsx

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 2 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread with-solana/src/components/demos/SendTransaction.tsx

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 34 files (changes from recent commits).

Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.
Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread with-solana-framework-kit/src/components/wallet/NetworkSwitcher.tsx Outdated
Comment thread with-solana-framework-kit/src/app/page.tsx Outdated
Comment thread with-solana-framework-kit/src/components/wallet/WalletButton.tsx Outdated
Comment thread with-solana-framework-kit/src/components/demos/SendTransaction.tsx
Comment thread with-solana-framework-kit/src/lib/transactions.ts Outdated
Comment thread with-solana-framework-kit/src/components/demos/CustomEvents.tsx Outdated
Comment thread with-solana-framework-kit/src/components/demos/CustomEvents.tsx
Comment thread with-solana-framework-kit/src/app/globals.css
Comment thread with-solana-framework-kit/src/components/ui/card.tsx Outdated

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 13 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread with-solana-framework-kit/src/components/demos/SendTransaction.tsx
Comment thread with-solana-framework-kit/src/components/wallet/WalletButton.tsx Outdated
Comment thread with-solana-framework-kit/src/components/wallet/NetworkSwitcher.tsx Outdated
@yosriady
yosriady force-pushed the with-solana/readme-framework-kit branch from 9842bb4 to 30b41f9 Compare September 6, 2026 07:39

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 11 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread with-solana-framework-kit/src/components/wallet/NetworkSwitcher.tsx
@yosriady
yosriady merged commit 0a8f99f into main Sep 6, 2026
47 checks passed
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