Merged
Conversation
- Add tsx dev dependency for running TypeScript scripts - Add generate:api script that fetches API schema and SDK examples - Integrate generation into dev/start/build commands - Ignore generated API docs in .gitignore (rebuilt on deploy) Co-Authored-By: Claude Opus 4.5 <[email protected]>
TypeScript type definitions for API schema, endpoints, SDK examples, and utility functions for fetching and merging API data. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add Card component with variants: Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, CardAction. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add foundational React components for API documentation: - WebSocketBadge: Visual indicator for WebSocket endpoints - PropertyRow: Display property name, type, and description - EndpointHeader: Header with method and path - ParameterList: List of endpoint parameters - ResponseExample: Code block for response examples - TypeReference: Display type information - EndpointCard: Card container for endpoints - SnippetTabs: Tabbed code snippets - CodeSnippet: Syntax-highlighted code display Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add Stainless-style double-pane layout components: - MethodPage/MethodPageLeft/MethodPageRight: Two-column layout - MethodBadge: HTTP method badge with colors - MethodHeader: Endpoint title with method and path - PropertyTree: Expandable property documentation - SDKSelector: Language selector for code examples - CollapsibleSnippet: Expandable code block - SnippetPanel: Code snippet container Co-Authored-By: Claude Opus 4.5 <[email protected]>
- SnippetSelector: React component for selecting code language - CodeSnippets.astro: Astro wrapper for multi-language code blocks - Persists language preference to localStorage - Syncs selection across all code snippets on page Co-Authored-By: Claude Opus 4.5 <[email protected]>
Export all API documentation components (legacy and double-pane) from the central React components index for easy importing. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Replace external API link with in-site API documentation pages: Overview, Exec, Checkpoints, Services, Proxy, Policy, Type Definitions. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Update the LLMs full-text export to include the generated API documentation pages instead of the removed rest.mdx. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add comprehensive CSS for API documentation including: - HTTP method colors (GET, POST, PUT, DELETE, PATCH, WebSocket) - Double-pane layout with sticky code snippets - Property tree styling - Method badges and headers - Snippet container styling - Full-width page layout for API pages - Stainless-style snippet component styling Co-Authored-By: Claude Opus 4.5 <[email protected]>
Contributor
Preview Deployment
Commit: |
Contributor
Lighthouse Results
|
Contributor
E2E Test Results❌ Tests failure Ran against: https://pr-59-superfly-sprites-docs.fly.dev |
- Remove unused imports - Fix import ordering - Apply formatting fixes - Use optional chaining where appropriate - Fix useEffect dependency issues with useCallback - Remove non-null assertions Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Remove overflow:hidden from .method-page-right - Remove overflow-y:auto and max-height from .code-snippets - Move overflow-hidden to only the code blocks section - Add explicit border-radius to header and code blocks The dropdown was being clipped by multiple overflow containers. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Change from incorrect $SPRITE_NAME.sprites.app to api.sprites.dev 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Adds formatType() function that converts Go types to readable
TypeScript/JSON-like notation:
- bool → boolean
- int/int64 → number
- []string → string[]
- *int → number?
- time.Time → string (ISO 8601)
- map[string]interface{} → object
Applied to all field type displays: markdown tables, PropertyTree
components, and example placeholders.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add version configuration in src/lib/api-versions.ts
- Create VersionSelector component for switching between API versions
- Update generator to output versioned docs to /api/{version}/
- Add root /api/ redirect to default version
- Update sidebar to use versioned API paths
- Add VersionSelector to PageTitle for API pages
When additional versions are published to S3, add them to api-versions.ts
and regenerate. The version dropdown appears when 2+ versions exist.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
The script in CodeSnippets.astro was being processed/bundled by Astro, which prevented it from running on each page. Adding `is:inline` ensures the script runs inline on every page that uses CodeSnippets. Converted TypeScript to plain JavaScript since is:inline scripts aren't processed by the build system. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add manually-created sprites.mdx with CRUD endpoints (create, list, get, update, delete) - Update generator to preserve manual pages during regeneration - Add Sprites to sidebar navigation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Navigate to /api/dev-latest/sprites/ instead of #create-sprite
- Use setAttribute('open', '') to properly expand the group
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Fix CSS selector to properly target .large class in nested details - Auto-expand sidebar group when navigating to that page - Click group heading navigates to page top (not anchor) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add data-current attribute to sidebar links matching current URL hash - Show green accent border for current endpoint link - Update on hashchange for smooth navigation - Rename "Policy" to "Network Policy" and "HTTP Proxy" to "Proxy" Co-Authored-By: Claude Opus 4.5 <[email protected]>
Production URLs have trailing slashes (/api/dev-latest/sprites/) but link hrefs don't (/api/dev-latest/sprites). Normalize both paths by removing trailing slashes before comparison. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Previously all links on the same page were highlighted because the condition `linkPath === currentPath` matched all of them. Now only highlight when: - Link has hash AND matches current URL exactly (path + hash) - Link has no hash AND we're on page with no hash Co-Authored-By: Claude Opus 4.5 <[email protected]>
On API pages, breadcrumbs return null because the sidebar links have anchor hashes but the page path doesn't. Add margin-left: auto to ensure the actions container stays on the right regardless. Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Delete 13 unused React components (~730 lines) - Create shared language-config.ts for labels/syntax mappings - Update CodeTabs, CodeSnippets, and SnippetSelector to use shared config - Remove dead _generateBinaryProtocolDocs function from build script Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add generateWebsocatExample() for WebSocket endpoints - Route WSS endpoints through new generateHttpExample() dispatcher - Rename 'cURL' label to 'HTTP' in language config Co-Authored-By: Claude Opus 4.5 <[email protected]>
API docs are generated from schema, not editable source files, so the GitHub link is disabled with explanatory text. Co-Authored-By: Claude Opus 4.5 <[email protected]>
b3010bb to
91b7c81
Compare
The anchor links are positioned to the left of headings, which requires the method-page container to have padding/margin to prevent clipping. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Align with Starlight's exact anchor HTML structure so the custom anchor script in Head.astro can enhance all anchors uniformly with link-icon-wrapper and check-icon-wrapper. Co-Authored-By: Claude Opus 4.5 <[email protected]>
The MethodHeader React component renders h2 headings with anchor links, but these appear after React island hydration. The initCodeBlocks script that sets up anchor link icons was running before hydration completed. Added a MutationObserver to detect when new .sl-anchor-link elements are added to the DOM and re-run the initialization to set up the dual-icon structure (link icon + checkmark for copy feedback). Co-Authored-By: Claude Opus 4.5 <[email protected]>
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
Changes
Build Infrastructure
tsxdev dependency for TypeScript script executionscripts/generate-api-docs.tsthat fetches API schema and SDK examples from remote sourcesgenerate:apiinto dev/start/build commandssrc/content/docs/api/in .gitignoreComponents
Configuration
Test plan
pnpm devand verify API docs are generated/apiand verify documentation renders🤖 Generated with Claude Code