Skip to content

Node RPC Docs  🎉#2296

Merged
gbarros merged 10 commits intodocs-glow-upfrom
gb/node-rpc-docs
Nov 7, 2025
Merged

Node RPC Docs  🎉#2296
gbarros merged 10 commits intodocs-glow-upfrom
gb/node-rpc-docs

Conversation

@gbarros
Copy link
Copy Markdown
Contributor

@gbarros gbarros commented Nov 6, 2025

Previews:
image
image

@gbarros gbarros requested review from Copilot and jcstein November 6, 2025 21:09
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @gbarros, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly expands the documentation by introducing a new, comprehensive section for Node RPC. It features an interactive playground for testing API methods, detailed information on client libraries, and a dynamic table of contents for improved navigation. These changes aim to provide developers with a more engaging and efficient way to explore and utilize the Node API.

Highlights

  • New RPC Documentation Section: A dedicated section for Node RPC documentation has been added, enhancing the discoverability and usability of API information.
  • Interactive RPC Playground: An interactive playground component is introduced, allowing users to directly test RPC methods within the documentation.
  • Client Library References: Comprehensive listings of official and community-maintained client libraries for various programming languages (Golang, Rust, Python, TypeScript) are now available.
  • Dynamic Table of Contents (TOC): A custom dynamic TOC component has been implemented to provide real-time navigation for the RPC documentation, adapting to content changes.
  • Documentation Structure Updates: Multiple _meta.js files across the documentation have been refactored to use const meta = { ... }; export default meta; syntax, standardizing the metadata export.
  • New UI Components: Several new React components (CopyIcon, NotificationModal, ParamModal, RPCMethod) have been added to support the interactive features and improved presentation of the RPC documentation.
  • Dependency Updates: New dependencies such as @heroicons/react, @monaco-editor/react, @open-rpc/client-js, axios, react-copy-to-clipboard, react-icons, and react-syntax-highlighter have been added to enable the new interactive features.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces comprehensive RPC documentation for Celestia Node API, including an interactive API explorer with a playground feature. The implementation adds dynamic documentation generation from OpenRPC specifications, version switching capabilities, and a live testing environment for RPC methods.

Key changes:

  • Added interactive Node API documentation with version selector and search functionality
  • Implemented RPC playground for testing methods against a local node
  • Created dynamic Table of Contents generation using DOM manipulation to work around Nextra's static TOC limitations

Reviewed Changes

Copilot reviewed 27 out of 66 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
theme.config.tsx Added TypeScript type annotations to component props
package.json Added dependencies for RPC components (Monaco editor, syntax highlighter, OpenRPC client, axios, Heroicons)
next.config.mjs Configured webpack to ignore generated RPC docs directory
app/build/rpc/lib/types.ts Defined TypeScript interfaces for OpenRPC spec, methods, params, and notifications
app/build/rpc/lib/helper.ts Created utility functions for generating example RPC requests/responses
app/build/rpc/hooks/useDarkMode.ts Implemented custom hook to detect Nextra's dark mode state
app/build/rpc/components/RPCMethod.tsx Built component to render individual RPC methods with collapsible request/response examples
app/build/rpc/components/Playground.tsx Created interactive playground modal for testing RPC calls against local nodes
app/build/rpc/components/NodeAPIContent.tsx Main content component handling API spec fetching, version management, and method rendering
app/build/rpc/components/DynamicRPCTOC.tsx Workaround component using DOM manipulation to inject dynamic headings into Nextra's static TOC
app/build/rpc/node-api/page.mdx MDX page entry point for Node API documentation
Multiple _meta.js files Standardized metadata exports across navigation files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/build/rpc/lib/helper.ts Outdated
Comment thread app/build/rpc/components/RPCMethod.tsx Outdated
Comment thread app/build/rpc/components/RPCMethod.tsx Outdated
Comment thread app/build/rpc/components/RPCMethod.tsx Outdated
Comment thread app/build/rpc/components/Playground.tsx Outdated
Comment thread app/build/rpc/components/Playground.tsx Outdated
Comment thread app/build/rpc/components/Playground.tsx Outdated
Comment thread app/build/rpc/components/NodeAPIContent.tsx
- Added new DynamicRPCTOC component to handle client-side TOC generation based on content headings
- Updated Node API page to use dynamic TOC with placeholder loading state
- Enhanced heading styles in NodeAPIContent to match Nextra's design system
- Added anchor links to package section headings for better navigation
- Implemented scroll-to-top button visibility logic based on scroll position
- Added MutationObserver to handle content updates from version switches
- Improve
- Enhanced accessibility with better color contrast in dark mode
- Modernized UI elements (search bar, version)
- Added dark mode detection and styling to NotificationModal and Playground components.
- Updated UI elements to adapt to dark mode, improving visual consistency.
- Enhanced error handling for WebSocket connections in Playground.
- Refactored code for better readability and maintainability.
…dling

- Introduced a custom hook for dark mode detection, streamlining dark mode management across components.
- Refactored NotificationModal, Playground, and RPCMethod components to utilize the new dark mode hook.
- Enhanced error handling in Playground for WebSocket connections and request validation.
- Improved code readability and maintainability by consolidating repetitive logic and updating type definitions.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive and interactive Node RPC documentation section, which is a fantastic addition. The implementation is well-structured, leveraging new React components and hooks to create a dynamic user experience. My review focuses on improving robustness, performance, and consistency. I've identified a potential bug causing redundant data fetches, a missing timeout in WebSocket handling that could lead to hanging requests, and some inconsistencies in styling and code practices. I've also provided a suggestion to streamline the content in one of the new documentation pages. Overall, this is a significant and valuable feature.

Comment thread app/build/rpc/components/NodeAPIContent.tsx
Comment thread app/build/rpc/components/Playground.tsx Outdated
Comment thread app/build/reference/_meta.js Outdated
Comment thread app/build/rpc/clients/page.mdx Outdated
Comment thread app/build/rpc/components/Playground.tsx Outdated
Comment thread app/build/rpc/components/Playground.tsx Outdated
Comment thread app/build/rpc/lib/helper.ts Outdated
- Add WebSocket connection timeout (10s) to prevent hanging requests
- Replace loose equality (==) with strict equality (===) in Playground
- Add semicolons to _meta.js files for consistency
- Remove redundant Golang Tutorial section from clients page
- Use proper Param type instead of any in helper.ts
- Fix equality check in getExampleResponse (== to ===)

Addresses feedback from Copilot and Gemini code review bots.
@gbarros gbarros requested a review from Copilot November 7, 2025 15:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 30 out of 69 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/build/rpc/lib/helper.ts Outdated

### Golang Client
Official Go implementation of the Celestia Node RPC client and Transaction Client
- **Repository**: [Go Node RPC Client](./not-found)
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link points to ./not-found which appears to be a placeholder. This should be removed or updated to point to the correct repository URL.

Suggested change
- **Repository**: [Go Node RPC Client](./not-found)

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@@ -0,0 +1,35 @@
# Client Libraries
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] needs sentence case across docs, i.e. "Client libraries" "Official clients"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! I've fixed all the titles o/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o/ ty!

Copy link
Copy Markdown
Member

@jcstein jcstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM aside nit pick of headers in a doc or two

@gbarros gbarros merged commit 4a28370 into docs-glow-up Nov 7, 2025
2 of 5 checks passed
@gbarros gbarros deleted the gb/node-rpc-docs branch November 7, 2025 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants