Skip to content

Fix blog cache panic, add API & MCP playgrounds#537

Merged
asim merged 4 commits intomainfrom
claude/add-wallet-transfers-74PHC
Apr 5, 2026
Merged

Fix blog cache panic, add API & MCP playgrounds#537
asim merged 4 commits intomainfrom
claude/add-wallet-transfers-74PHC

Conversation

@asim
Copy link
Copy Markdown
Member

@asim asim commented Apr 5, 2026

Summary

  • Fix blog cache panic: strings.LastIndex returns -1 when [ not found, causing content[-1:] slice bounds panic during blog.Load() on startup
  • API playground: Interactive endpoint selector with form fields, curl preview, and send button on /api
  • MCP playground: Tool picker with auto-generated param forms and formatted results on /mcp

Test plan

  • Server starts without panic (blog cache truncation fix)
  • /api page loads with endpoint dropdown and playground
  • /mcp page loads with tool selector and playground
  • Raw JSON-RPC still available under collapsed details on /mcp

https://claude.ai/code/session_01GRGLA9yj7BpqKiyi6xFwnm

claude added 4 commits April 5, 2026 06:18
Replace the raw JSON-RPC textarea with a user-friendly playground:
- Tool selector dropdown with all registered MCP tools
- Auto-generated form fields based on tool parameters
- Textareas for prompt/body/content fields, inputs for the rest
- Run button with response time display
- Formatted response output (auto-pretty-prints JSON)
- Raw JSON-RPC panel still available under a collapsed details element

https://claude.ai/code/session_01GRGLA9yj7BpqKiyi6xFwnm
Replace static markdown API docs with dynamic page featuring:
- Endpoint selector with method badges (GET green, POST yellow, etc.)
- Auto-generated form fields for path params and body params
- Live curl command preview (click to copy)
- Send button that executes the request with formatted response
- Status code + response time display
- Full endpoint reference cards below with param/response tables

https://claude.ai/code/session_01GRGLA9yj7BpqKiyi6xFwnm
strings.LastIndex returns -1 when '[' is not found, but the code
used content[openBracket:] without checking for -1, causing a panic
on content[-1:] during blog.Load() -> updateCache().

https://claude.ai/code/session_01GRGLA9yj7BpqKiyi6xFwnm
@asim asim force-pushed the claude/add-wallet-transfers-74PHC branch from 3956799 to 4c4c68b Compare April 5, 2026 06:19
@asim asim merged commit 26a8ea2 into main Apr 5, 2026
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