Uh oh!
There was an error while loading. Please reload this page.
fix(create-sei): align CLI and generated docs (PLT-844) - #333
fix(create-sei): align CLI and generated docs (PLT-844)#333alexander-sei wants to merge 1 commit into
Conversation
Keep the documented shorthand usable and ensure scaffold guidance matches the generated app and current Sei docs. Co-authored-by: Cursor <cursoragent@cursor.com>
codecov-commenter
commented
Aug 18, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #333 +/- ##
=======================================
Coverage 83.82% 83.82% =======================================
Files 64 64 Lines 4390 4390 =======================================
Hits 3680 3680 Misses 710 710
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
A small, well-scoped docs/CLI alignment for @sei-js/create-sei: the -n shorthand now matches what packages/create-sei/README.md already advertises, the generated Next template README matches the actual file layout and mainnet default, the dead www.docs.sei.io/dev-interoperability/... Bank link is gone (no other instances remain in the tree), and a patch changeset is included. No blockers; a few doc-accuracy nits and one unverifiable docs URL worth confirming.
Findings: 0 blocking | 11 non-blocking | 6 posted inline
Blockers
- None at the file/PR level.
Non-blocking
- Cursor's second-opinion pass (
cursor-review.md) is empty — that review produced no output, so only Codex (no material issues found) and this pass covered the diff. - I could not resolve the new docs URLs from this environment (no outbound network access granted), so the PR's "Verify the updated documentation links resolve" step is unverified here. Everything else in the test plan is consistent with what's in the tree.
- I verified the README's structural claims against the template:
layout.tsxwraps children inProviders(Wagmi + RainbowKit + Mantine),page.tsxswitches onuseAccount().isConnectedbetweenLandingandDefault,providers.tsxdefaults toseimainnet whenNEXT_PUBLIC_CHAINis unset, andglobals.cssimports Tailwind — all accurate. The removed references tosrc/app/components/Web3Provider.tsxand@sei-js/evm/viemwere genuinely stale (neither exists in the template, and@sei-js/evmis not a template dependency), so those deletions are correct. - The rewritten README covers only
bun install/bun run dev. The template'spackage.jsonhas aprebuildhook that runsbiome check ., sobun run buildfails outright on unformatted user code — worth a one-line "Lint and build" section mentioningbun run check/check:fixso that failure isn't a surprise. src/components/shell/shell.tsxis the app shell that wraps both the landing and connected views, but it is the one first-party component omitted from the "Project structure" list. Consider adding it for completeness.- 6 suggestion(s)/nit(s) flagged inline on specific lines.
| <Text size="sm" c="gray.6"> | ||
| Query total SEI supply using Sei's native{' '} | ||
| <Text component="a" href="https://www.docs.sei.io/dev-interoperability/precompiles/bank" target="_blank" c="orange" td="underline"> | ||
| <Text component="a" href="https://docs.sei.io/evm/precompiles/cosmwasm-precompiles/bank" target="_blank" c="orange" td="underline"> |
There was a problem hiding this comment.
[suggestion] Replacing the dead www.docs.sei.io/dev-interoperability/precompiles/bank link is clearly right, but please confirm this specific path against the live docs — I have no outbound network access here, so I checked it against the repo instead.
Every other Sei precompile docs link in this repo uses a flat docs.sei.io/evm/precompiles/<slug> shape with no intermediate section segment:
packages/precompiles/src/precompiles/p256.ts:19→docs.sei.io/evm/precompiles/p256-precompilepackages/precompiles/README.md:40→docs.sei.io/evm/precompiles/example-usagepackages/mcp-server/src/tests/docs/server.test.ts:39→docs.sei.io/evm/precompiles/example-usage
This is the only link that introduces a cosmwasm-precompiles/ segment, and Bank is a Cosmos-module precompile rather than a CosmWasm one, which makes that segment the part I'd double-check. If the page really does live under that path, no change needed — a dead link in a scaffolded template is worse than a slightly odd path.
| const [stdout, stderr, exitCode] = await Promise.all([new Response(subprocess.stdout).text(), new Response(subprocess.stderr).text(), subprocess.exited]); | ||
| expect(exitCode).toBe(0); | ||
| expect(stderr).toBe(''); |
There was a problem hiding this comment.
[nit]expect(stderr).toBe('') is a strict equality on a channel you don't control: any Bun/Node deprecation warning or resolver notice printed while loading commander/inquirer/boxen fails this test for reasons unrelated to the -n flag. expect(stderr).not.toContain('error'), or simply dropping this assertion (exitCode === 0 already covers the failure case), would be less brittle.
| expect(exitCode).toBe(0); | ||
| expect(stderr).toBe(''); | ||
| expect(stdout).toContain('-n, --name <name>'); |
There was a problem hiding this comment.
[suggestion] This asserts commander's rendered help string rather than the behaviour PLT-844 was actually about. It couples the test to commander's help formatting (a v13 upgrade that changes spacing or ordering breaks it while -n still works), and it wouldn't catch a regression where the flag parses but the short form is dropped.
A behavioural assertion would be a tighter guard — e.g. spawn app -n 'Invalid Name' in a temp cwd and assert the Invalid package name. message, which only prints when options.name was populated from -n and reached validateOptions, and which scaffolds nothing on the failure path.
Also worth an explicit timeout on this test: it spawns a fresh Bun process that transpiles src/main.ts and resolves three dependencies, and Bun's default 5s per-test timeout is not a lot of headroom on a cold CI runner.
| ## Network configuration | ||
| In addition, this app uses [RainbowKit](https://www.rainbowkit.com/docs/wallet-button) which provides wallet connect functionality out of the box. | ||
| The app connects to Sei mainnet when `NEXT_PUBLIC_CHAIN` is unset. To use Sei testnet, add this to `.env.local`: |
There was a problem hiding this comment.
[suggestion] Accurate about the code path (providers.tsx falls through to sei mainnet when NEXT_PUBLIC_CHAIN is unset), but it doesn't mention the .env.example that ships alongside it — and that file sets NEXT_PUBLIC_CHAIN=testnet. A user who does the reflexive cp .env.example .env.local lands on testnet while the README tells them they're on mainnet. Worth naming .env.example here and saying it defaults to testnet, since that's exactly the kind of post-scaffold confusion this PR is fixing.
| This repository uses helper methods from [@sei-js/evm/viem](https://github.com/sei-protocol/sei-js/tree/main/packages/evm/src/viem) | ||
| - `src/app/layout.tsx` wraps every route with the wallet and UI providers. | ||
| - `src/app/page.tsx` shows the landing page until a wallet connects, then shows the interactive examples. | ||
| - `src/components/providers/providers.tsx` configures Wagmi, RainbowKit, WalletConnect, and the selected Sei network. |
There was a problem hiding this comment.
[nit] "configures Wagmi, RainbowKit, WalletConnect" overstates it a little — providers.tsx registers only metaMaskWallet in its connectorsForWallets list. WalletConnect is present only as the projectId that RainbowKit requires; there's no WalletConnect wallet a user can actually pick. Listing "Wagmi, RainbowKit, and the selected Sei network" and mentioning that MetaMask is the only wallet registered by default (with a pointer to where to add more) would match the file.
| ``` | ||
| ## Deploy on Vercel | ||
| You can also set `NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID` in `.env.local`. Without it, the template uses a placeholder project ID. |
There was a problem hiding this comment.
[nit] The placeholder is the literal string 'your-project-id' in providers.tsx, which is not a valid WalletConnect project ID — RainbowKit will make failing requests against it rather than degrade silently. Since this is a generated README, stating the consequence ("WalletConnect-based wallets won't connect until you set a real ID; the bundled MetaMask connector works without one") is more useful to the scaffold user than "uses a placeholder project ID."
Summary
-nshorthand for generated app namesAddresses PLT-844.
Test plan
bun test --isolate packages/create-sei/srcbun run --filter @sei-js/create-sei buildbun run typecheckbunx biome check packages/create-sei/src/main.ts packages/create-sei/src/main.test.tsMade with Cursor