Conversation
WalkthroughReorganizes JSON-RPC documentation into a structured directory with separate pages. Introduces automated workflows and scripts to generate OpenRPC specifications and RPC reference data from OpenRPC specs. Adds a React component for interactive RPC method exploration. Updates CI workflows and configuration to use Mise for documentation tasks. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~35 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
098c318 to
351ffce
Compare
4616e14 to
a1e530d
Compare
a1e530d to
f7b74a5
Compare
|
@coderabbitai full review |
This file is no longer needed as OpenRPC specs are now auto-generated and stored in openrpc-specs/ directory (v0.json, v1.json, v2.json).
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (2)
docs/scripts/generate-openrpc-specs.sh (1)
3-8: Minor bash safety and portability improvements.Two small nits:
set -ealone doesn't protect against unbound variable references. Addingset -euo pipefailis a common defensive pattern.==in single-bracket[ ]is a bash extension and not POSIX. Prefer=(or switch to[[ ]]).♻️ Suggested changes
-set -e +set -euo pipefail -if [ "$1" == "local" ]; then +if [ "$1" = "local" ]; then ENVIRONMENT="local" -elif [ "$1" == "docker" ]; then +elif [ "$1" = "docker" ]; then ENVIRONMENT="docker"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/scripts/generate-openrpc-specs.sh` around lines 3 - 8, Replace the brittle shell settings and non-portable test operators: change the shebang block to use defensive flags by replacing "set -e" with "set -euo pipefail" and update the conditional tests that set ENVIRONMENT (the "[ \"$1\" == \"local\" ]" and "[ \"$1\" == \"docker\" ]" expressions) to use POSIX "=" (i.e. "[ \"$1\" = \"local\" ]" and "[ \"$1\" = \"docker\" ]") so the script is safer and more portable while still assigning ENVIRONMENT as before.docs/package.json (1)
10-24: Consider generating RPC reference data beforestart.
Ifsrc/data/rpc-methods.jsonis missing,docusaurus startcan fail. Aprestarthook keeps local dev friction low.♻️ Suggested update
"scripts": { "docusaurus": "docusaurus", - "start": "docusaurus start", + "start": "docusaurus start", + "prestart": "pnpm generate:rpc-reference", "build": "pnpm generate:rpc-reference && docusaurus build", "swizzle": "docusaurus swizzle",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/package.json` around lines 10 - 24, Update the package.json scripts so the dev "start" script runs the RPC generation before starting: add a "prestart" script that invokes the existing "generate:rpc-reference" script (reference: the "start" script and "generate:rpc-reference" script names) so that src/data/rpc-methods.json is produced prior to running "docusaurus start"; ensure the "prestart" command is placed alongside the other scripts and does not change the existing "start" or "generate:rpc-reference" commands.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/docs-rpc-auto-update.yml:
- Line 11: The workflow uses runs-on: ubuntu-slim which lacks Docker and has
strict time limits; change the runner to a full Ubuntu runner (e.g., replace
runs-on: ubuntu-slim with runs-on: ubuntu-latest or ubuntu-22.04) so the
generate-openrpc-specs.sh docker step can use Docker and pulls (e.g.,
ghcr.io/chainsafe/forest:edge-fat) won’t be killed by the short timeout; ensure
any job timeout or concurrency settings match other repo workflows to allow
sufficient time for the docker pulls.
In `@docs/docs/users/reference/json-rpc/overview.md`:
- Around line 46-48: The inline code example for the startup flag is broken
across a line causing MDX rendering issues; edit the paragraph containing the
inline code `--save-token <FILE>` (near the mention of `AuthNew`) to place the
entire flag example inside a single pair of backticks on one line (i.e.,
`--save-token <FILE>`), removing the line break so the inline code renders
correctly.
In `@docs/docs/users/reference/json-rpc/schema.mdx`:
- Around line 35-85: Add rel="noopener noreferrer" to every external anchor tag
that uses target="_blank" in this file; specifically update the <a> elements
linking to the playground (href values starting with
"https://playground.open-rpc.org") and the <a> elements linking to raw JSON
(href values ending with "v0.json", "v1.json", "v2.json") so each anchor
includes rel="noopener noreferrer" alongside the existing target attribute to
prevent reverse-tabnabbing.
In `@docs/src/components/RPCReference/index.tsx`:
- Around line 162-170: The schema/method toggle elements (currently a
non-focusable <code> inside a <div>) are not keyboard-accessible; replace or
augment them with proper button semantics: make the clickable element a <button>
(or add role="button" and tabIndex={0}), add onKeyDown handler that toggles on
Enter/Space, set aria-expanded={showSchema} and aria-controls pointing to the
schema panel id, keep the existing onClick={() => setShowSchema(!showSchema)}
logic, and ensure the visual span (styles.schemaToggle) remains inside the
interactive element; apply the same changes to the other similar toggle block
(the method toggle using the same typeValueClickable pattern) so both keyboard
and screen-reader users can open/close schemas and methods.
---
Nitpick comments:
In `@docs/package.json`:
- Around line 10-24: Update the package.json scripts so the dev "start" script
runs the RPC generation before starting: add a "prestart" script that invokes
the existing "generate:rpc-reference" script (reference: the "start" script and
"generate:rpc-reference" script names) so that src/data/rpc-methods.json is
produced prior to running "docusaurus start"; ensure the "prestart" command is
placed alongside the other scripts and does not change the existing "start" or
"generate:rpc-reference" commands.
In `@docs/scripts/generate-openrpc-specs.sh`:
- Around line 3-8: Replace the brittle shell settings and non-portable test
operators: change the shebang block to use defensive flags by replacing "set -e"
with "set -euo pipefail" and update the conditional tests that set ENVIRONMENT
(the "[ \"$1\" == \"local\" ]" and "[ \"$1\" == \"docker\" ]" expressions) to
use POSIX "=" (i.e. "[ \"$1\" = \"local\" ]" and "[ \"$1\" = \"docker\" ]") so
the script is safer and more portable while still assigning ENVIRONMENT as
before.
ℹ️ Review info
Configuration used: Repository UI
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 (20)
.github/workflows/docs-check.yml.github/workflows/docs-deploy.yml.github/workflows/docs-rpc-auto-update.ymldocs/.gitignoredocs/.prettierignoredocs/README.mddocs/docs/users/reference/json-rpc/_category_.jsondocs/docs/users/reference/json-rpc/methods.mdxdocs/docs/users/reference/json-rpc/overview.mddocs/docs/users/reference/json-rpc/schema.mdxdocs/docs/users/reference/json_rpc.mdxdocs/openrpc-specs/v0.jsondocs/openrpc-specs/v1.jsondocs/openrpc-specs/v2.jsondocs/package.jsondocs/scripts/generate-openrpc-specs.shdocs/scripts/generate-rpc-reference.tsdocs/src/components/RPCReference/RPCReference.module.cssdocs/src/components/RPCReference/index.tsxmise.toml
💤 Files with no reviewable changes (2)
- docs/README.md
- docs/docs/users/reference/json_rpc.mdx
|
|
||
| jobs: | ||
| update-docs: | ||
| runs-on: ubuntu-slim |
There was a problem hiding this comment.
ubuntu-slim lacks Docker and runs unprivileged — this job will fail.
The ubuntu-slim runner executes workflows inside a container rather than a full VM instance. This means operations requiring elevated privileges — such as Docker-in-Docker — are not supported. Docker CLI is absent from ubuntu-slim, and there are open upstream requests to add it. The generate-openrpc-specs.sh docker step called at line 17 will fail with "docker: command not found".
Additionally, the job timeout for ubuntu-slim runners is 15 minutes, and the job is terminated and fails if it reaches this limit — tight for pulling ghcr.io/chainsafe/forest:edge-fat three times.
Use a full Ubuntu runner consistent with other workflows in this repo:
- runs-on: ubuntu-slim
+ runs-on: ubuntu-24.04📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| runs-on: ubuntu-slim | |
| runs-on: ubuntu-24.04 |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/docs-rpc-auto-update.yml at line 11, The workflow uses
runs-on: ubuntu-slim which lacks Docker and has strict time limits; change the
runner to a full Ubuntu runner (e.g., replace runs-on: ubuntu-slim with runs-on:
ubuntu-latest or ubuntu-22.04) so the generate-openrpc-specs.sh docker step can
use Docker and pulls (e.g., ghcr.io/chainsafe/forest:edge-fat) won’t be killed
by the short timeout; ensure any job timeout or concurrency settings match other
repo workflows to allow sufficient time for the docker pulls.
| Authentication is performed via [JWT Tokens](../../knowledge_base/jwt_handling.md). When starting Forest use `--save-token | ||
| <FILE>` to store an `Admin` token, | ||
| otherwise the token will be printed in the logs during startup. With this token you can call the methods `AuthNew` |
There was a problem hiding this comment.
Keep the inline flag example on a single line.
The line break inside inline code can render oddly in MDX.
💡 Suggested tweak
-Authentication is performed via [JWT Tokens](../../knowledge_base/jwt_handling.md). When starting Forest use `--save-token
-<FILE>` to store an `Admin` token,
+Authentication is performed via [JWT Tokens](../../knowledge_base/jwt_handling.md). When starting Forest use `--save-token <FILE>` to store an `Admin` token,📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Authentication is performed via [JWT Tokens](../../knowledge_base/jwt_handling.md). When starting Forest use `--save-token | |
| <FILE>` to store an `Admin` token, | |
| otherwise the token will be printed in the logs during startup. With this token you can call the methods `AuthNew` | |
| Authentication is performed via [JWT Tokens](../../knowledge_base/jwt_handling.md). When starting Forest use `--save-token <FILE>` to store an `Admin` token, | |
| otherwise the token will be printed in the logs during startup. With this token you can call the methods `AuthNew` |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/docs/users/reference/json-rpc/overview.md` around lines 46 - 48, The
inline code example for the startup flag is broken across a line causing MDX
rendering issues; edit the paragraph containing the inline code `--save-token
<FILE>` (near the mention of `AuthNew`) to place the entire flag example inside
a single pair of backticks on one line (i.e., `--save-token <FILE>`), removing
the line break so the inline code renders correctly.
| <a | ||
| href="https://playground.open-rpc.org/?uiSchema[appBar][ui:darkMode]=true&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:input]=false&uiSchema[appBar][ui:title]=Forest%20RPC%20v0&schemaUrl=https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v0.json" | ||
| target="_blank" | ||
| style={style} | ||
| > | ||
| 👉 View v0 Spec in Schema Explorer | ||
| </a> | ||
| <br /> | ||
| <a | ||
| href="https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v0.json" | ||
| target="_blank" | ||
| > | ||
| 📄 Raw v0 Spec (JSON) | ||
| </a> | ||
| </div> | ||
|
|
||
| <div style={versionCard}> | ||
| <h3>RPC v1 API</h3> | ||
| <p>Stable API - Recommended for production use</p> | ||
| <a | ||
| href="https://playground.open-rpc.org/?uiSchema[appBar][ui:darkMode]=true&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:input]=false&uiSchema[appBar][ui:title]=Forest%20RPC%20v1&schemaUrl=https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v1.json" | ||
| target="_blank" | ||
| style={style} | ||
| > | ||
| 👉 View v1 Spec in Schema Explorer | ||
| </a> | ||
| <br /> | ||
| <a | ||
| href="https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v1.json" | ||
| target="_blank" | ||
| > | ||
| 📄 Raw v1 Spec (JSON) | ||
| </a> | ||
| </div> | ||
|
|
||
| <div style={versionCard}> | ||
| <h3>RPC v2 API</h3> | ||
| <p>Experimental API</p> | ||
| <a | ||
| href="https://playground.open-rpc.org/?uiSchema[appBar][ui:darkMode]=true&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:input]=false&uiSchema[appBar][ui:title]=Forest%20RPC%20v2&schemaUrl=https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v2.json" | ||
| target="_blank" | ||
| style={style} | ||
| > | ||
| 👉 View v2 Spec in Schema Explorer | ||
| </a> | ||
| <br /> | ||
| <a | ||
| href="https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v2.json" | ||
| target="_blank" | ||
| > | ||
| 📄 Raw v2 Spec (JSON) |
There was a problem hiding this comment.
Add rel="noopener noreferrer" to external links.
This prevents reverse-tabnabbing when using target="_blank".
🔐 Suggested fix
<a
href="https://playground.open-rpc.org/?uiSchema[appBar][ui:darkMode]=true&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:input]=false&uiSchema[appBar][ui:title]=Forest%20RPC%20v0&schemaUrl=https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v0.json"
target="_blank"
+ rel="noopener noreferrer"
style={style}
>
@@
<a
href="https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v0.json"
target="_blank"
+ rel="noopener noreferrer"
>
@@
<a
href="https://playground.open-rpc.org/?uiSchema[appBar][ui:darkMode]=true&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:input]=false&uiSchema[appBar][ui:title]=Forest%20RPC%20v1&schemaUrl=https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v1.json"
target="_blank"
+ rel="noopener noreferrer"
style={style}
>
@@
<a
href="https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v1.json"
target="_blank"
+ rel="noopener noreferrer"
>
@@
<a
href="https://playground.open-rpc.org/?uiSchema[appBar][ui:darkMode]=true&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:input]=false&uiSchema[appBar][ui:title]=Forest%20RPC%20v2&schemaUrl=https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v2.json"
target="_blank"
+ rel="noopener noreferrer"
style={style}
>
@@
<a
href="https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v2.json"
target="_blank"
+ rel="noopener noreferrer"
>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <a | |
| href="https://playground.open-rpc.org/?uiSchema[appBar][ui:darkMode]=true&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:input]=false&uiSchema[appBar][ui:title]=Forest%20RPC%20v0&schemaUrl=https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v0.json" | |
| target="_blank" | |
| style={style} | |
| > | |
| 👉 View v0 Spec in Schema Explorer | |
| </a> | |
| <br /> | |
| <a | |
| href="https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v0.json" | |
| target="_blank" | |
| > | |
| 📄 Raw v0 Spec (JSON) | |
| </a> | |
| </div> | |
| <div style={versionCard}> | |
| <h3>RPC v1 API</h3> | |
| <p>Stable API - Recommended for production use</p> | |
| <a | |
| href="https://playground.open-rpc.org/?uiSchema[appBar][ui:darkMode]=true&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:input]=false&uiSchema[appBar][ui:title]=Forest%20RPC%20v1&schemaUrl=https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v1.json" | |
| target="_blank" | |
| style={style} | |
| > | |
| 👉 View v1 Spec in Schema Explorer | |
| </a> | |
| <br /> | |
| <a | |
| href="https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v1.json" | |
| target="_blank" | |
| > | |
| 📄 Raw v1 Spec (JSON) | |
| </a> | |
| </div> | |
| <div style={versionCard}> | |
| <h3>RPC v2 API</h3> | |
| <p>Experimental API</p> | |
| <a | |
| href="https://playground.open-rpc.org/?uiSchema[appBar][ui:darkMode]=true&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:input]=false&uiSchema[appBar][ui:title]=Forest%20RPC%20v2&schemaUrl=https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v2.json" | |
| target="_blank" | |
| style={style} | |
| > | |
| 👉 View v2 Spec in Schema Explorer | |
| </a> | |
| <br /> | |
| <a | |
| href="https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v2.json" | |
| target="_blank" | |
| > | |
| 📄 Raw v2 Spec (JSON) | |
| <a | |
| href="https://playground.open-rpc.org/?uiSchema[appBar][ui:darkMode]=true&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:input]=false&uiSchema[appBar][ui:title]=Forest%20RPC%20v0&schemaUrl=https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v0.json" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| style={style} | |
| > | |
| 👉 View v0 Spec in Schema Explorer | |
| </a> | |
| <br /> | |
| <a | |
| href="https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v0.json" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| > | |
| 📄 Raw v0 Spec (JSON) | |
| </a> | |
| </div> | |
| <div style={versionCard}> | |
| <h3>RPC v1 API</h3> | |
| <p>Stable API - Recommended for production use</p> | |
| <a | |
| href="https://playground.open-rpc.org/?uiSchema[appBar][ui:darkMode]=true&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:input]=false&uiSchema[appBar][ui:title]=Forest%20RPC%20v1&schemaUrl=https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v1.json" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| style={style} | |
| > | |
| 👉 View v1 Spec in Schema Explorer | |
| </a> | |
| <br /> | |
| <a | |
| href="https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v1.json" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| > | |
| 📄 Raw v1 Spec (JSON) | |
| </a> | |
| </div> | |
| <div style={versionCard}> | |
| <h3>RPC v2 API</h3> | |
| <p>Experimental API</p> | |
| <a | |
| href="https://playground.open-rpc.org/?uiSchema[appBar][ui:darkMode]=true&uiSchema[appBar][ui:examplesDropdown]=false&uiSchema[appBar][ui:splitView]=false&uiSchema[appBar][ui:input]=false&uiSchema[appBar][ui:title]=Forest%20RPC%20v2&schemaUrl=https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v2.json" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| style={style} | |
| > | |
| 👉 View v2 Spec in Schema Explorer | |
| </a> | |
| <br /> | |
| <a | |
| href="https://raw.githubusercontent.com/ChainSafe/forest/main/docs/openrpc-specs/v2.json" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| > | |
| 📄 Raw v2 Spec (JSON) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/docs/users/reference/json-rpc/schema.mdx` around lines 35 - 85, Add
rel="noopener noreferrer" to every external anchor tag that uses target="_blank"
in this file; specifically update the <a> elements linking to the playground
(href values starting with "https://playground.open-rpc.org") and the <a>
elements linking to raw JSON (href values ending with "v0.json", "v1.json",
"v2.json") so each anchor includes rel="noopener noreferrer" alongside the
existing target attribute to prevent reverse-tabnabbing.
| <div className={styles.typeWithSchema}> | ||
| <code | ||
| className={styles.typeValueClickable} | ||
| onClick={() => setShowSchema(!showSchema)} | ||
| title="Click to show schema details" | ||
| > | ||
| {typeName} | ||
| <span className={styles.schemaToggle}>{showSchema ? " ▼" : " ▶"}</span> | ||
| </code> |
There was a problem hiding this comment.
Make the schema and method toggles keyboard-accessible.
<code> and <div> with onClick aren’t focusable by default, so keyboard users can’t expand schemas or methods. Add button semantics and key handlers.
♿ Suggested fix
<code
className={styles.typeValueClickable}
- onClick={() => setShowSchema(!showSchema)}
+ role="button"
+ tabIndex={0}
+ aria-expanded={showSchema}
+ onKeyDown={(e) => {
+ if (e.key === "Enter" || e.key === " ") {
+ e.preventDefault();
+ setShowSchema((prev) => !prev);
+ }
+ }}
+ onClick={() => setShowSchema((prev) => !prev)}
title="Click to show schema details"
> <div
className={styles.methodHeader}
- onClick={() => toggleMethod(method.name)}
+ role="button"
+ tabIndex={0}
+ aria-expanded={isExpanded}
+ onKeyDown={(e) => {
+ if (e.key === "Enter" || e.key === " ") {
+ e.preventDefault();
+ toggleMethod(method.name);
+ }
+ }}
+ onClick={() => toggleMethod(method.name)}
>Also applies to: 432-436
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/src/components/RPCReference/index.tsx` around lines 162 - 170, The
schema/method toggle elements (currently a non-focusable <code> inside a <div>)
are not keyboard-accessible; replace or augment them with proper button
semantics: make the clickable element a <button> (or add role="button" and
tabIndex={0}), add onKeyDown handler that toggles on Enter/Space, set
aria-expanded={showSchema} and aria-controls pointing to the schema panel id,
keep the existing onClick={() => setShowSchema(!showSchema)} logic, and ensure
the visual span (styles.schemaToggle) remains inside the interactive element;
apply the same changes to the other similar toggle block (the method toggle
using the same typeValueClickable pattern) so both keyboard and screen-reader
users can open/close schemas and methods.
Summary of changes
Changes introduced in this pull request:
Reference issue to close (if applicable)
Closes
Other information and links
Change checklist
Outside contributions
Summary by CodeRabbit
New Features
Documentation