Skip to content

Conversation

@tilo-14
Copy link
Contributor

@tilo-14 tilo-14 commented Nov 9, 2025

Summary

  • Fix code snippet accuracy issues in client-guide.md
  • Fix markdown linting issues in CLAUDE.md
  • Add zk-compression-docs to CodeRabbit path filters
  • Restore and improve client-guide.md with complete implementation guide
  • Add CLAUDE.md source code mapping

Test plan

  • Verify markdown formatting is correct
  • Verify code snippets use correct API methods
  • Verify all links and references are valid

Summary by CodeRabbit

Release Notes

  • Documentation
    • Updated client library examples to reflect simplified API patterns for test initialization and configuration
    • Fixed documentation formatting in the references section

tilo-14 added 2 commits November 9, 2025 23:42
- Add newline at end of CLAUDE.md
- Remove incorrect comment in Rust code snippet
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 9, 2025

Walkthrough

This 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

Cohort / File(s) Summary
Documentation syntax fix
zk-compression-docs/CLAUDE.md
Corrects closing Markdown code fence in References section and removes trailing "No newline at end of file" indicator
API usage pattern updates
zk-compression-docs/compressed-pdas/client-library/client-guide.md
Updates TestRpc instantiation from getTestRpc(lightWasm) to TestRpc.create(lightWasm) and SystemAccountMetaConfig initialization from direct constructor to SystemAccountMetaConfig.new(programId) factory method

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify that TestRpc.create() and SystemAccountMetaConfig.new() accurately reflect the current public API signatures in the implementation
  • Confirm the documentation examples will work correctly with the updated factory method patterns

Possibly related PRs

Suggested labels

ai-review

Poem

📚 Code fences mended, clean and tight,
Factory methods shine so bright,
TestRpc and configs redesigned,
API patterns realigned! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Documentation improvements and code snippet fixes' accurately captures the main objectives: fixing markdown linting issues in CLAUDE.md and updating API usage patterns in client-guide.md code samples.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch mintlify-docs

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 20d7b19 and 8cc47b4.

📒 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:

  1. Verify that all source code references in the documentation exist and are accurate
  2. Check CLAUDE.md to ensure the page-to-source-code mapping is updated if new pages are added
  3. Confirm that code examples match the actual implementation in the linked source files
  4. Validate that GitHub URLs in the documentation tree are correct and accessible

Files:

  • zk-compression-docs/compressed-pdas/client-library/client-guide.md
  • zk-compression-docs/CLAUDE.md
zk-compression-docs/CLAUDE.md

⚙️ CodeRabbit configuration file

zk-compression-docs/CLAUDE.md: When reviewing CLAUDE.md changes:

  1. Verify that all referenced source code files exist in the light-protocol repository
  2. Ensure all GitHub URLs are valid and point to the correct files
  3. Check that the ASCII tree structure is consistent and properly formatted
  4. 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-token exists
  • Verify https://github.com/Lightprotocol/program-examples/tree/main/basic-operations exists

If 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) to TestRpc.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 method SystemAccountMetaConfig.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 accepts programId as its parameter.

Comment on lines 720 to 726

{% code overflow="wrap" %}
```typescript
const systemAccountConfig = new SystemAccountMetaConfig(programId);
const systemAccountConfig = SystemAccountMetaConfig.new(programId);
packedAccounts.addSystemAccounts(systemAccountConfig);
```
{% endcode %}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

@tilo-14 tilo-14 merged commit 9ecfe64 into main Nov 9, 2025
3 checks passed
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.

2 participants