Skip to content

Add hidden AI install panel to plugin docs#594

Merged
riderx merged 2 commits into
mainfrom
codex/ai-install-panel-plugin-docs
Apr 29, 2026
Merged

Add hidden AI install panel to plugin docs#594
riderx merged 2 commits into
mainfrom
codex/ai-install-panel-plugin-docs

Conversation

@riderx
Copy link
Copy Markdown
Member

@riderx riderx commented Apr 29, 2026

Summary\n- add a shared collapsed panel that exposes a copyable AI install prompt on plugin getting-started pages\n- resolve plugin packages from docs metadata and plugin registry so the prompt works across localized and nested getting-started routes\n- keep the panel hidden by default and add one-click copy support\n\n## Testing\n- bun run check\n- coverage script confirmed 748 plugin getting-started pages resolve to at least one package

Summary by CodeRabbit

Release Notes

  • New Features

    • Added AI-powered setup prompt panel displaying customized installation instructions with copy-to-clipboard functionality
    • Enabled MDX support for enhanced markdown document rendering throughout the documentation site
  • Bug Fixes

    • Fixed "Edit this page" link redirection to point to the correct documentation directory
    • Improved document viewing and copying operations with better GitHub URL resolution and handling

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The documentation site gains MDX support by adding @astrojs/mdx dependency and updates Astro configuration. New components handle AI setup prompt generation and display, deriving metadata from route objects. Enhanced copy functionality uses precomputed GitHub URLs instead of computed paths. EditLink baseUrl is redirected to the docs directory.

Changes

Cohort / File(s) Summary
Configuration & Dependencies
apps/docs/astro.config.mjs, apps/docs/package.json
Astro config redirects edit link baseUrl to docs directory and removes SSR externalization setting. MDX support added via @astrojs/mdx dependency.
AI Prompt Components
apps/docs/src/components/doc/InstallPromptForAI.astro, apps/docs/src/components/doc/InstallPromptForAIPanel.astro
New components that parse Starlight route IDs to extract plugin slugs, generate tailored installation prompts, and render an interactive panel with copy-to-clipboard functionality for AI assistants.
Enhanced Documentation Components
apps/docs/src/components/doc/CopyPage.astro, apps/docs/src/components/doc/PageTitle.astro
CopyPage now derives locale/page IDs from typed route objects and precomputes absolute GitHub URLs, using them for markdown copy and view actions. PageTitle integrates the new InstallPromptForAI component.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant PageTitle as PageTitle Component
    participant InstallPrompt as InstallPromptForAI
    participant Parser as Route Parser
    participant PromptPanel as InstallPromptForAIPanel
    participant Clipboard as Clipboard API

    User->>PageTitle: View documentation page
    PageTitle->>InstallPrompt: Render component
    InstallPrompt->>Parser: Extract route ID
    Parser-->>InstallPrompt: pluginSlug + description
    InstallPrompt->>InstallPrompt: Normalize action names
    InstallPrompt->>InstallPrompt: Compute installation prompt
    InstallPrompt->>PromptPanel: Render with promptHtml
    PromptPanel-->>User: Display AI setup prompt panel
    User->>PromptPanel: Click "Copy for AI"
    PromptPanel->>Clipboard: Copy prompt to clipboard
    Clipboard-->>PromptPanel: Success/failure status
    PromptPanel-->>User: Update button label (2s reset)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 Whiskers twitching with delight,
New prompts for AI, shining bright!
Routes parsed, slugs found with care,
Copy buttons float on air!
MDX support, GitHub links true—
The docs hopped forward, fresh and new! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main addition in the changeset: a hidden AI install panel component added to plugin documentation pages, matching the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/ai-install-panel-plugin-docs

Review rate limit: 0/5 reviews remaining, refill in 52 minutes and 27 seconds.

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

@riderx riderx marked this pull request as ready for review April 29, 2026 12:54
@riderx
Copy link
Copy Markdown
Member Author

riderx commented Apr 29, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@sonarqubecloud
Copy link
Copy Markdown

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​astrojs/​mdx@​5.0.3991008397100
Addedstarlight-package-managers@​0.11.1931009283100
Addedtailwindcss@​4.2.41001008498100
Addedzod@​4.3.610010010088100
Addedwrangler@​4.73.0981009296100
Addedvite-plugin-static-copy@​4.1.01001009695100

View full report

@socket-security
Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm miniflare is 98.0% likely obfuscated

Confidence: 0.98

Location: Package overview

From: ?npm/wrangler@4.73.0npm/miniflare@4.20260312.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/miniflare@4.20260312.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@riderx riderx merged commit 3b9c26c into main Apr 29, 2026
8 of 9 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.

1 participant