Fix blog cache panic, add API & MCP playgrounds#537
Merged
Conversation
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
3956799 to
4c4c68b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
strings.LastIndexreturns -1 when[not found, causingcontent[-1:]slice bounds panic duringblog.Load()on startup/api/mcpTest plan
/apipage loads with endpoint dropdown and playground/mcppage loads with tool selector and playground/mcphttps://claude.ai/code/session_01GRGLA9yj7BpqKiyi6xFwnm