-
Notifications
You must be signed in to change notification settings - Fork 5
Documentation improvements and code snippet fixes #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add newline at end of CLAUDE.md - Remove incorrect comment in Rust code snippet
WalkthroughThis PR updates documentation files to reflect API changes in the TypeScript client library. It fixes a Markdown code fence syntax issue in CLAUDE.md and updates client-guide.md to demonstrate new factory method patterns for creating TestRpc and SystemAccountMetaConfig instances. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
zk-compression-docs/CLAUDE.md(1 hunks)zk-compression-docs/compressed-pdas/client-library/client-guide.md(2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
zk-compression-docs/**/*.md
⚙️ CodeRabbit configuration file
zk-compression-docs/**/*.md: When reviewing documentation changes:
- Verify that all source code references in the documentation exist and are accurate
- Check CLAUDE.md to ensure the page-to-source-code mapping is updated if new pages are added
- Confirm that code examples match the actual implementation in the linked source files
- Validate that GitHub URLs in the documentation tree are correct and accessible
Files:
zk-compression-docs/compressed-pdas/client-library/client-guide.mdzk-compression-docs/CLAUDE.md
zk-compression-docs/CLAUDE.md
⚙️ CodeRabbit configuration file
zk-compression-docs/CLAUDE.md: When reviewing CLAUDE.md changes:
- Verify that all referenced source code files exist in the light-protocol repository
- Ensure all GitHub URLs are valid and point to the correct files
- Check that the ASCII tree structure is consistent and properly formatted
- Confirm that new documentation pages have corresponding entries in this mapping file
Files:
zk-compression-docs/CLAUDE.md
🪛 markdownlint-cli2 (0.18.1)
zk-compression-docs/compressed-pdas/client-library/client-guide.md
725-725: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
🔇 Additional comments (3)
zk-compression-docs/CLAUDE.md (1)
275-288: Markdown code fence formatting now properly closed.The explicit closing fence on line 288 correctly resolves the markdown syntax. The reference section tree structure is well-organized with consistent indentation and formatting. The mapping is comprehensive and links are properly formatted.
To ensure all GitHub URLs remain current and accessible, please verify a sampling of URLs from each section point to valid repository paths. For example:
- Verify
https://github.com/Lightprotocol/light-protocol/tree/main/js/compressed-tokenexists- Verify
https://github.com/Lightprotocol/program-examples/tree/main/basic-operationsexistsIf any URLs have changed due to branch renames or repository restructuring, they should be updated throughout this mapping file.
zk-compression-docs/compressed-pdas/client-library/client-guide.md (2)
119-122: Verify TypeScript SDK factory method for TestRpc.The code snippet changes from
getTestRpc(lightWasm)toTestRpc.create(lightWasm), reflecting a factory method pattern. This is a significant API surface change that needs confirmation against the current @lightprotocol/stateless.js implementation.Please verify that the
TestRpc.create(lightWasm)method exists and is the correct API in the latest version of @lightprotocol/stateless.js. You can check the SDK documentation at https://lightprotocol.github.io/light-protocol/stateless.js/index.html or the source code to confirm the method signature and availability.
722-729: Verify SystemAccountMetaConfig static constructor API.The code snippet changes from direct constructor
SystemAccountMetaConfig(programId)to a static methodSystemAccountMetaConfig.new(programId). This reflects a factory pattern, but requires verification against the current TypeScript client library implementation.Please verify that
SystemAccountMetaConfig.new(programId)is the correct API in the latest version of @lightprotocol/stateless.js or @lightprotocol/compressed-token. Check the SDK documentation or source code to confirm this static method exists and acceptsprogramIdas its parameter.
|
|
||
| {% code overflow="wrap" %} | ||
| ```typescript | ||
| const systemAccountConfig = new SystemAccountMetaConfig(programId); | ||
| const systemAccountConfig = SystemAccountMetaConfig.new(programId); | ||
| packedAccounts.addSystemAccounts(systemAccountConfig); | ||
| ``` | ||
| {% endcode %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add blank line before code fence (MD031).
Markdown linting indicates that code fences should be surrounded by blank lines. A blank line is needed before line 720 ({% code overflow="wrap" %}).
Apply this diff to fix the formatting:
2. Call `addSystemAccounts(systemAccountConfig)` - the SDK populates `systemAccounts` with Light System accounts, including the CPI signer PDA derived from your program ID
+
{% code overflow="wrap" %}
```typescript
const systemAccountConfig = SystemAccountMetaConfig.new(programId);🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
722-722: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
725-725: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
🤖 Prompt for AI Agents
In zk-compression-docs/compressed-pdas/client-library/client-guide.md around
lines 720 to 726, the code fence starting with `{% code overflow="wrap" %}`
needs a blank line above it to satisfy MD031; insert a single blank line
immediately before the `{% code overflow="wrap" %}` line so the fenced code
block is separated from the preceding paragraph/content.
Summary
Test plan
Summary by CodeRabbit
Release Notes