fix(docs-sync): stop overwriting the generated root _meta.json#352
fix(docs-sync): stop overwriting the generated root _meta.json#352acastellana wants to merge 1 commit into
Conversation
The sync-docs workflow rsynced the generated category-based docs/api-references/_meta.json into genlayer-docs and then immediately overwrote it with a hardcoded heredoc containing the pre-grouping flat command list (init, up, deploy, ...). Those keys no longer match the directory layout, so the genlayer-docs sidebar rendered broken entries on every sync (fixed manually in genlayer-docs#426; this removes the cause). Also make the generated root meta complete: - add "index": "Overview" for the generated index.mdx - append ungrouped top-level commands (estimate-fees, finalize, finalize-batch) so they get explicit nav entries instead of relying on Nextra's implicit append Snapshot under docs/api-references regenerated against current main (picks up the new estimate-fees command and latest help text). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
This PR targeted I retargeted it to |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR documents three new CLI commands ( ChangesCLI Documentation for Fee and Finalize Commands
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae7fd726f6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| | | --rpc <rpcUrl> | RPC URL for the network | No | | | ||
| | | --fees <json> | Fee estimate options JSON passed to genlayer-js estimateTransactionFees. | No | | | ||
| | | --json | Print the fee estimate as JSON without spinner output | No | | | ||
| | | --include-report | Include simulation fee accounting/report in the generated estimate output | No | | |
There was a problem hiding this comment.
Include variadic --args in estimate-fees docs
When users run estimate-fees in simulation mode for a contract method that takes arguments, the CLI accepts --args <args...> (src/commands/contracts/index.ts:163-168), but this newly added options table omits that option and only documents --rpc, --fees, --json, and --include-report. This leaves the generated reference incomplete for the main case where [contractAddress] [method] needs calldata arguments.
Useful? React with 👍 / 👎.
Problem
sync-docs.ymlrsyncs the generated, category-baseddocs/api-references/_meta.jsoninto genlayer-docs — and then immediately overwrites it with a hardcoded heredoc containing the pre-grouping flat command list (init,up,deploy, …). Those keys haven't matched the directory layout since the commands were grouped into category folders, so every sync shipped a broken sidebar to docs.genlayer.com (most entries pointed at nothing, and whole command groups were missing from the LLM exports there).genlayerlabs/genlayer-docs#426 fixed the meta manually on the docs side; this PR removes the cause so the next release sync doesn't regress it.
Changes
.github/workflows/sync-docs.yml: delete the heredoc — the rsynced generated_meta.jsonis correct.scripts/generate-cli-docs.mjs: make the generated root meta complete —"index": "Overview"first, then the category groups, then any ungrouped top-level commands (currentlyestimate-fees,finalize,finalize-batch) so they get explicit nav entries.docs/api-references/snapshot: regenerated against current main (node scripts/generate-cli-docs.mjsafternpm run build) — picks up the newestimate-feescommand page and latest help text.Verification
Ran the generator locally against a fresh build; the emitted root
_meta.jsonis:{ "index": "Overview", "environment": "Environment", "configuration": "Configuration", "contracts": "Contracts", "transactions": "Transactions", "accounts": "Accounts", "staking": "Staking", "localnet": "Localnet", "estimate-fees": "estimate-fees", "finalize": "finalize", "finalize-batch": "finalize-batch" }which matches the directory layout the workflow rsyncs (67 pages generated).
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
estimate-fees,finalize, andfinalize-batch--fees,--fee-value,--valid-until) to deploy and write commandsDocumentation