mirror of
https://github.com/stack-auth/stack.git
synced 2026-07-20 21:29:36 +08:00
<!-- Make sure you've read the CONTRIBUTING.md guidelines: https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md --> <img width="324" height="252" alt="image" src="https://github.com/user-attachments/assets/b7096a0c-9764-4fe7-b521-458d6e1d47b5" /> <!-- RECURSEML_SUMMARY:START --> ## High-level PR Summary This PR adds two new interactive components to the documentation pages: a "Copy Markdown" button that allows users to copy the raw markdown content of a page, and an "Open" dropdown menu that provides options to open the current page in various AI tools (Scira AI, ChatGPT, Claude, and T3 Chat). The implementation includes a new `page-actions.tsx` component file with the `LLMCopyButton` and `ViewOptions` components, and updates the documentation page layout to incorporate these new buttons in the header alongside the page title. ⏱️ Estimated Review Time: 5-15 minutes <details> <summary>💡 Review Order Suggestion</summary> | Order | File Path | |-------|-----------| | 1 | `docs/src/components/page-actions.tsx` | | 2 | `docs/src/app/docs/[[...slug]]/page.tsx` | </details> <!-- RECURSEML_SUMMARY:END --> <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Adds `LLMCopyButton` and `ViewOptions` to documentation pages for copying markdown and opening in AI tools. > > - **New Features**: > - Added `LLMCopyButton` in `page-actions.tsx` to copy markdown content to clipboard. > - Added `ViewOptions` in `page-actions.tsx` to open pages in AI tools (Scira AI, ChatGPT, Claude, T3 Chat). > - **Integration**: > - Integrated `LLMCopyButton` and `ViewOptions` into `page.tsx` header layout. > - Adjusted header layout in `page.tsx` to align title and new buttons. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup> forb51bb98d4e. You can [customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this summary. It will automatically update as commits are pushed.</sup> ---- <!-- ELLIPSIS_HIDDEN --> <!-- RECURSEML_ANALYSIS:START --> ## Review by RecurseML _🔍 Review performed on [e48ffa6..3cbe5a5](https://github.com/stack-auth/stack-auth/compare/e48ffa67ee4544177d8dc980536c8906edec501e...3cbe5a58618f6163196943b40f05a8cdb09ac603)_ ✨ No bugs found, your code is sparkling clean <details> <summary>✅ Files analyzed, no issues (2)</summary> • `docs/src/components/page-actions.tsx` • `docs/src/app/docs/[[...slug]]/page.tsx` </details> [](https://discord.gg/n3SsVDAW6U) <!-- RECURSEML_ANALYSIS:END --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added header actions on docs pages: a button to copy the page Markdown to clipboard and an “Open” menu to launch external AI chat tools or view the source. * **Documentation** * Updated docs page header layout so the title is left-aligned with action controls on the right for easier access. <!-- end of auto-generated comment: release notes by coderabbit.ai --> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds header actions to docs pages: copy raw Markdown and open the page in external AI tools. > > - **Docs UI**: > - **New components** in `docs/src/components/page-actions.tsx`: > - `LLMCopyButton`: copies raw Markdown to clipboard with simple caching. > - `ViewOptions`: popover with links to external AI tools (Scira, ChatGPT, Claude, T3 Chat). > - **Integration** in `docs/src/app/docs/[[...slug]]/page.tsx`: > - Wraps `DocsTitle` with a header row and adds `LLMCopyButton` and `ViewOptions`. > - Passes `markdownUrl` as ``${page.url}.mdx`` for both actions. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit5578cc9d37. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Konsti Wohlwend <[email protected]>