Conversation
Fumadocs-powered docs site (Next.js 15 + Tailwind v4) with 16 pages covering guides, API reference, benchmarks, and community resources. Also fixes README install version to v0.2.2 and adds docs badge.
📝 WalkthroughWalkthroughAdds a full documentation site under Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (5)
docs/src/app/[[...slug]]/page.tsx (1)
13-16: Extract shared page-resolution logic to avoid drift.Both handlers repeat the same slug resolution +
notFound()path. A tiny helper keeps behavior centralized.♻️ Proposed refactor
+async function resolvePage(paramsPromise: Promise<{ slug?: string[] }>) { + const params = await paramsPromise; + const page = source.getPage(params.slug); + if (!page) notFound(); + return page; +} + export default async function Page(props: { params: Promise<{ slug?: string[] }> }) { - const params = await props.params; - const page = source.getPage(params.slug); - if (!page) notFound(); + const page = await resolvePage(props.params); const MDX = page.data.body; @@ export async function generateMetadata( props: { params: Promise<{ slug?: string[] }> }, ): Promise<Metadata> { - const params = await props.params; - const page = source.getPage(params.slug); - if (!page) notFound(); + const page = await resolvePage(props.params); return { title: page.data.title,Also applies to: 43-49
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/src/app/`[[...slug]]/page.tsx around lines 13 - 16, Extract the repeated slug resolution + notFound behavior into a small helper (e.g., getPageOrThrow or resolvePage) and call it from both handlers instead of duplicating logic; the helper should accept the incoming params promise (same shape as props.params), await it, call source.getPage(params.slug) and call notFound() if the result is falsy, returning the resolved page otherwise so Page (and the other handler) can just call the helper and proceed.docs/content/docs/introduction.mdx (1)
45-47: Add a warning comment about the test private key.The examples.mdx page includes a helpful warning:
// WARNING: This is the default Anvil/Hardhat test key. Never use it for real funds.For consistency and to prevent users from accidentally using test keys with real funds, consider adding the same warning here.📝 Suggested addition
// Derive an address from a private key + // WARNING: This is the default Anvil/Hardhat test key. Never use it for real funds. const private_key = try eth.hex.hexToBytesFixed(32, "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80");🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/content/docs/introduction.mdx` around lines 45 - 47, Add a clear warning comment above the test private key derivation to match examples.mdx: note that the value passed into eth.hex.hexToBytesFixed (the private_key variable) is the default Anvil/Hardhat test key and must never be used with real funds; place the warning immediately before the const private_key declaration and keep it concise and visible to users who copy the example, mentioning the private_key and the eth.signer.Signer.init usage to make the context explicit.docs/src/app/not-found.tsx (2)
9-15: Consider adjusting the redirect timing.The 100ms delay is too short for users to read the message but adds unnecessary latency. Either redirect immediately (remove the timeout) or increase the delay to ~2 seconds so users can read "Page Not Found" before being redirected.
Option 1: Immediate redirect
useEffect(() => { - const timer = setTimeout(() => { - router.push('/introduction'); - }, 100); - - return () => clearTimeout(timer); + router.replace('/introduction'); }, [router]);Option 2: Readable delay
useEffect(() => { const timer = setTimeout(() => { router.push('/introduction'); - }, 100); + }, 2000); return () => clearTimeout(timer); }, [router]);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/src/app/not-found.tsx` around lines 9 - 15, The current useEffect in the NotFound component sets a 100ms timeout before router.push('/introduction'), which is too short; either remove the timeout so router.push('/introduction') runs immediately, or increase the delay to a readable duration (e.g., change 100 to 2000) so users can see the "Page Not Found" message; update the timer variable and cleanup (clearTimeout) in the same useEffect that contains router.push to keep behavior consistent.
17-30: Consider using Tailwind classes for consistency.The rest of the docs site uses Tailwind CSS. Using inline styles here creates inconsistency. This is a minor nitpick given this is a transient redirect page.
Tailwind version
return ( - <div style={{ - display: 'flex', - flexDirection: 'column', - alignItems: 'center', - justifyContent: 'center', - minHeight: '100vh', - padding: '20px', - textAlign: 'center' - }}> - <h1 style={{ fontSize: '2rem', marginBottom: '1rem' }}>Page Not Found</h1> - <p style={{ marginBottom: '1rem' }}>Redirecting you to the docs...</p> + <div className="flex flex-col items-center justify-center min-h-screen p-5 text-center"> + <h1 className="text-2xl mb-4">Page Not Found</h1> + <p className="mb-4">Redirecting you to the docs...</p> </div> );🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/src/app/not-found.tsx` around lines 17 - 30, Replace the inline style object in the Not Found component's returned JSX (the outer div and its children h1 and p) with Tailwind className strings for consistency with the docs site; remove the style props on the div, h1, and p and use classes like flex flex-col items-center justify-center min-h-screen p-5 text-center on the container and text-2xl mb-4 on the h1 and mb-4 on the p (adjust exact class names to match your spacing scale), keeping the same markup and redirect behavior.docs/content/docs/hd-wallets.mdx (1)
35-48: Consider making this example self-contained.The code references
&words(line 38) which is defined only in the previous section. While the context suggests building on the earlier example, readers who copy this snippet in isolation will encounter an undefined reference.📝 Proposed enhancement for standalone clarity
Add a comment referencing the previous example, or include the
wordsdefinition:const eth = `@import`("eth"); +// Using the 12-word mnemonic from the previous example: +// const words = [_][]const u8{ "abandon", "abandon", ... }; + const seed = try eth.mnemonic.toSeed(&words, "");Alternatively, make it fully standalone by including the words array definition again.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/content/docs/hd-wallets.mdx` around lines 35 - 48, The snippet uses &words passed to eth.mnemonic.toSeed but doesn’t define words in this block, causing an undefined reference when copied standalone; update the example around eth.mnemonic.toSeed and eth.hd_wallet.deriveEthAccount to either (a) re-declare the words array (e.g., a mnemonic words variable) before calling eth.mnemonic.toSeed, or (b) add a brief comment saying “see previous example for words definition” so readers know to supply the words variable when using deriveEthAccount; ensure the symbol names eth.mnemonic.toSeed, &words, and eth.hd_wallet.deriveEthAccount are mentioned to locate the fix.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/content/docs/ens.mdx`:
- Around line 55-64: The Text Records section currently only has a placeholder
comment; either replace it with a concrete usage example or mark the section as
TODO. If the API exists, add a short snippet showing how to call the resolver
text lookup (e.g., reference eth, ens_resolver.getText, allocator and provider
and a sample name like "vitalik.eth" with a key like "avatar"), including proper
allocation/deallocation handling; otherwise remove the placeholder and replace
the block with a one-line note that text record lookup is planned for a future
release.
In `@docs/content/docs/transactions.mdx`:
- Around line 31-37: Update the opening sentence in
docs/content/docs/transactions.mdx to match the table and the
SendTransactionOpts type: change the claim that `to` and `value` are required to
state that all fields on SendTransactionOpts are optional (or explicitly state
which are optional), and note the defaults shown in the table (`to` defaults to
null, `value` defaults to 0, `data` defaults to an empty slice) and that
unspecified fields will be fetched from the provider where applicable; ensure
the text references the SendTransactionOpts name so readers can correlate the
prose with the table.
---
Nitpick comments:
In `@docs/content/docs/hd-wallets.mdx`:
- Around line 35-48: The snippet uses &words passed to eth.mnemonic.toSeed but
doesn’t define words in this block, causing an undefined reference when copied
standalone; update the example around eth.mnemonic.toSeed and
eth.hd_wallet.deriveEthAccount to either (a) re-declare the words array (e.g., a
mnemonic words variable) before calling eth.mnemonic.toSeed, or (b) add a brief
comment saying “see previous example for words definition” so readers know to
supply the words variable when using deriveEthAccount; ensure the symbol names
eth.mnemonic.toSeed, &words, and eth.hd_wallet.deriveEthAccount are mentioned to
locate the fix.
In `@docs/content/docs/introduction.mdx`:
- Around line 45-47: Add a clear warning comment above the test private key
derivation to match examples.mdx: note that the value passed into
eth.hex.hexToBytesFixed (the private_key variable) is the default Anvil/Hardhat
test key and must never be used with real funds; place the warning immediately
before the const private_key declaration and keep it concise and visible to
users who copy the example, mentioning the private_key and the
eth.signer.Signer.init usage to make the context explicit.
In `@docs/src/app/`[[...slug]]/page.tsx:
- Around line 13-16: Extract the repeated slug resolution + notFound behavior
into a small helper (e.g., getPageOrThrow or resolvePage) and call it from both
handlers instead of duplicating logic; the helper should accept the incoming
params promise (same shape as props.params), await it, call
source.getPage(params.slug) and call notFound() if the result is falsy,
returning the resolved page otherwise so Page (and the other handler) can just
call the helper and proceed.
In `@docs/src/app/not-found.tsx`:
- Around line 9-15: The current useEffect in the NotFound component sets a 100ms
timeout before router.push('/introduction'), which is too short; either remove
the timeout so router.push('/introduction') runs immediately, or increase the
delay to a readable duration (e.g., change 100 to 2000) so users can see the
"Page Not Found" message; update the timer variable and cleanup (clearTimeout)
in the same useEffect that contains router.push to keep behavior consistent.
- Around line 17-30: Replace the inline style object in the Not Found
component's returned JSX (the outer div and its children h1 and p) with Tailwind
className strings for consistency with the docs site; remove the style props on
the div, h1, and p and use classes like flex flex-col items-center
justify-center min-h-screen p-5 text-center on the container and text-2xl mb-4
on the h1 and mb-4 on the p (adjust exact class names to match your spacing
scale), keeping the same markup and redirect behavior.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
docs/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (33)
.gitignoreREADME.mddocs/.gitignoredocs/content/docs/benchmarks.mdxdocs/content/docs/comparison.mdxdocs/content/docs/comptime.mdxdocs/content/docs/contracts.mdxdocs/content/docs/contributing.mdxdocs/content/docs/ens.mdxdocs/content/docs/examples.mdxdocs/content/docs/faq.mdxdocs/content/docs/hd-wallets.mdxdocs/content/docs/installation.mdxdocs/content/docs/introduction.mdxdocs/content/docs/meta.jsondocs/content/docs/modules.mdxdocs/content/docs/tokens.mdxdocs/content/docs/transactions.mdxdocs/content/docs/websockets.mdxdocs/eslint.config.mjsdocs/next.config.mjsdocs/package.jsondocs/postcss.config.mjsdocs/source.config.tsdocs/src/app/[[...slug]]/layout.tsxdocs/src/app/[[...slug]]/page.tsxdocs/src/app/global.cssdocs/src/app/layout.tsxdocs/src/app/not-found.tsxdocs/src/lib/layout.shared.tsxdocs/src/lib/source.tsdocs/src/mdx-components.tsxdocs/tsconfig.json
- ENS: replace placeholder text records section with real getText example - Transactions: fix SendTransactionOpts description (all fields are optional) - HD Wallets: clarify words reference in multiple accounts example - Introduction: add test key warning to quick start example - NotFound: use Tailwind classes instead of inline styles, increase redirect delay
There was a problem hiding this comment.
🧹 Nitpick comments (2)
docs/content/docs/hd-wallets.mdx (1)
55-68: Add a prerequisite note forwordsin later snippets.Both Mnemonic Validation and Passphrase examples depend on
words; a short note here improves standalone readability.✏️ Suggested doc tweak
## Mnemonic Validation +Assumes `words` is defined as in the first example. ```zig const eth = `@import`("eth"); @@ ## BIP-39 Passphrase You can use an optional passphrase (sometimes called the "25th word") for additional security: +Assumes `words` is defined as in the first example. ```zig const seed = try eth.mnemonic.toSeed(&words, "my secret passphrase");</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@docs/content/docs/hd-wallets.mdxaround lines 55 - 68, The docs usewords
in later snippets without defining it; add a brief prerequisite note before the
BIP-39 Passphrase section stating thatwordsrefers to the mnemonic array
defined in the first example (used by eth.mnemonic.validate) so readers know
what to pass into eth.mnemonic.toSeed; referencewords,
eth.mnemonic.validate, andeth.mnemonic.toSeedin the note for clarity.</details> </blockquote></details> <details> <summary>docs/content/docs/ens.mdx (1)</summary><blockquote> `33-40`: **Clarify snippet prerequisites for copy-paste usability.** `provider` (and `address` in reverse resolution) are referenced without local setup in these blocks. Add a one-line prerequisite note so readers know these snippets depend on earlier context. <details> <summary>✏️ Suggested doc tweak</summary> ```diff ## Reverse Resolution Resolve an address back to an ENS name: +Assumes `provider` is initialized as shown in Forward Resolution, and `address` is the target Ethereum address. ```zig const eth = `@import`("eth"); @@ ## Text Records ENS names can have associated text records (email, URL, avatar, etc.). Use `getText` to look up a record by key: +Assumes `provider` is initialized as shown in Forward Resolution. ```zig const eth = `@import`("eth");Also applies to: 59-63
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/content/docs/ens.mdx` around lines 33 - 40, The examples call symbols like provider, address, eth.ens_reverse.reverseResolve and getText without showing setup; add a one-line prerequisite note above each snippet (e.g., before the reverseResolve and forward resolution/getText blocks) stating that provider has been initialized (and address set) as shown in the Forward Resolution section so the snippets are copy-paste usable; ensure the note references the same names "provider" and "address" so readers can find the earlier initialization.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@docs/content/docs/ens.mdx`:
- Around line 33-40: The examples call symbols like provider, address,
eth.ens_reverse.reverseResolve and getText without showing setup; add a one-line
prerequisite note above each snippet (e.g., before the reverseResolve and
forward resolution/getText blocks) stating that provider has been initialized
(and address set) as shown in the Forward Resolution section so the snippets are
copy-paste usable; ensure the note references the same names "provider" and
"address" so readers can find the earlier initialization.
In `@docs/content/docs/hd-wallets.mdx`:
- Around line 55-68: The docs use `words` in later snippets without defining it;
add a brief prerequisite note before the BIP-39 Passphrase section stating that
`words` refers to the mnemonic array defined in the first example (used by
eth.mnemonic.validate) so readers know what to pass into eth.mnemonic.toSeed;
reference `words`, `eth.mnemonic.validate`, and `eth.mnemonic.toSeed` in the
note for clarity.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
docs/content/docs/ens.mdxdocs/content/docs/hd-wallets.mdxdocs/content/docs/introduction.mdxdocs/content/docs/transactions.mdxdocs/src/app/not-found.tsx
✅ Files skipped from review due to trivial changes (1)
- docs/content/docs/transactions.mdx
🚧 Files skipped from review as they are similar to previous changes (2)
- docs/src/app/not-found.tsx
- docs/content/docs/introduction.mdx
Summary
docs/(Next.js 15 + Tailwind v4)Content pages
Deploy config
docsTest plan
pnpm installsucceeds (fumadocs-mdx generates types)pnpm buildgenerates all 18 static pagesSummary by CodeRabbit
Documentation
Chores