Skip to content

Fix issue #306 in nextjs-anchor template#314

Open
cxalem wants to merge 8 commits intosolana-foundation:mainfrom
cxalem:fix/kit-templates-ux
Open

Fix issue #306 in nextjs-anchor template#314
cxalem wants to merge 8 commits intosolana-foundation:mainfrom
cxalem:fix/kit-templates-ux

Conversation

@cxalem
Copy link
Collaborator

@cxalem cxalem commented Feb 25, 2026

This PR addresses the issues Jonas reported in #306 for kit/nextjs-anchor.

I updated the template UX and flows with cluster switching, wallet dropdown connection and error handling, wallet balance and airdrop, explorer links, and clearer transaction and error messaging in the vault interactions. I also fixed the template docs and setup text so it matches the real workflow.

I replaced framework-kit usage with a self-contained app/lib layer built on @solana/kit and wallet-standard for wallet connection, transaction sending, cluster RPC, and balance hooks.

If this direction looks good, I can replicate the same design identity and lib structure across the other kit templates.


P.D.

This implementation increases the boilerplate, since we removed a library to add custom code, and we'll need to do this in all the templates. The right direction is to make this a library or use an existing one!

Screenshot 2026-02-25 at 12 53 08 PM Screenshot 2026-02-25 at 12 52 40 PM Screenshot 2026-02-25 at 12 52 30 PM

@cxalem
Copy link
Collaborator Author

cxalem commented Mar 4, 2026

I've addressed all the review comments:

  • Vault PDA derivation, instructions, and error codes now come from the Codama-generated IDL client
  • Balance updates use WebSocket subscriptions (with SWR polling as fallback)
  • Magic strings replaced with constants
  • Broken documentation links fixed

We decided to continue with the current approach, adding a self-contained app/lib layer on top of @solana/kit and wallet-standard. This does add some boilerplate, but it keeps things working and explicit until the Kit plugins are stable enough to integrate into the templates. This pattern is designed to be replicated across all the kit templates.

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had any activity for 7 days.

It will be closed in 7 days if no further activity occurs.

If you believe this PR is still relevant, please add a comment or push new commits to keep it open.

Thank you for your contributions!

@github-actions github-actions bot added the stale label Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants