Turn the AI dropdown into an Open in Claude split button - #3330
Draft
enf0rc3 wants to merge 1 commit into
Draft
Conversation
The "Use Octopus docs with AI" pill offered three markdown actions. The design replaces it with a split button: a primary "Open in Claude", and a caret that opens a list of assistants. Each entry hands the assistant this page's .md URL to read. The markdown actions come back as a separate copy button once the shared copy module lands. Both halves reuse the .btn component, so the pair matches "Edit on GitHub" beside it in the page actions row, and the whole control moves from the foot of the article up under the header. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Pull request environment is available at https://stoctodocspr3330.z22.web.core.windows.net. You can view the ephemeral environment status in Octopus Deploy. This environment will be automatically deprovisioned when the pull request is closed, or after 7 days of inactivity. |
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.
Implements the SplitButton from Documentation vision / Open in LLM.
What changed
The "Use Octopus docs with AI" pill at the foot of the article is now an Open in Claude split button sitting under the page header, next to Edit on GitHub:
.mdURL..btncomponent, so borders, radius, hover, pressed and focus states come from the design-system tokens already inmain.css. The pair collapses into one divider via a negative margin, which keeps each half's focus ring unclipped.--colorMenuListBackground*and--shadowMedium, so light and dark themes both work with no extra rules.src/assets/icons/, exported from the Figma file and applied as CSS masks so they take--colorIconPrimaryin the button and--colorTextLinkDefaultin the menu.The eligibility gate is unchanged: the control only renders on pages that have a
.mdcompanion.Two things to call out
Gemini points at AI Studio.
gemini.google.com/apphas no native prompt parameter (the?prompt=trick needs a browser extension), so the label stays "Open in Gemini" per the design while the href isaistudio.google.com/prompts/new_chat?prompt=…, which does prefill. Happy to change the label if that reads wrong.The markdown actions are gone for now. Copy this page as markdown / open as markdown / open all docs as markdown are removed along with
copy-markdown.js. They return as the secondary copy button from node 1561-20055 once #3317 lands the shared copy module.Testing
astro buildclean, 2673 pages. Verified in a real browser in both themes, closed and open.tests/llm-endpoints.spec.ts— the two CopyMarkdown tests are rewritten to assert the primary button and all three menu links carry the same working.mdURL.Four tests in that spec fail on a Windows checkout, including the rewritten one. All four fail on the same pre-existing bug, not on this change:
llm-md-emittergets backslash-separated paths fromglobSyncon Windows, sopathToSlug's/index$/strip never fires and it writesdist/docs/argo-cd/index.mdwhere the tests expectdist/docs/argo-cd.md.per-page .md endpoint serves clean markdown for an eligible pagefails identically on an untouchedmain. Worth a separate fix.🤖 Generated with Claude Code