Skip to content

Add an Open in Claude split button to the page actions - #3330

Closed
enf0rc3 wants to merge 1 commit into
mainfrom
wl/open-in-llm
Closed

enf0rc3 wants to merge 1 commit into
mainfrom
wl/open-in-llm

Conversation

@enf0rc3

@enf0rc3 enf0rc3 commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Adds an Open in Claude split button to the page actions row, between Copy as markdown and Edit on GitHub, per the Figma ordering.

Implements the Open in LLM design, using the SplitButton component from #3340. Based on main, since that has merged.

The primary half opens Claude with a prompt pointing at the page's .md URL. The caret opens a menu with Open in Claude and Open in ChatGPT, as link-styled rows with a provider logo and an external-link icon. The prompt carries an absolute URL, because the assistant fetches the page itself rather than following a link from this site.

Gemini is deliberately absent: gemini.google.com ignores prompt parameters, so the entry could only prefill by pointing at AI Studio, which is not where "Open in Gemini" says it is going.

Four files, additions only — the component, its strings, one line in the layout, and its tests. The icons and getPageMarkdownPath() both come from what has already landed.

Testing

Clean astro build, 1253 .md emitted. tests/open-in-llm.spec.ts 4 passed, and 17 passed alongside split-button. Playwright is not wired into CI, so that is a local run.

The positioning tests wait for the menu's open animation to settle, the same way split-button.spec.ts does — measured mid-animation the icon box reads 12x9 rather than the 16x16 it lands on.

Measured where the menu ends up, to confirm those tests are actually holding something down:

viewport menu opens towards
1200 641–834 start edge
700 321–514 start edge
430 159–353 flips to the end edge

430 is where the row wraps and the fallback fires, which is the case split-button.spec.ts could not reach on its own: the component gallery gives the control room on both sides at every width.

🤖 Generated with Claude Code

@team-marketing-branch-protections

Copy link
Copy Markdown

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.

@enf0rc3
enf0rc3 force-pushed the wl/open-in-llm branch 2 times, most recently from 3c7c692 to 4eb9610 Compare August 11, 2026 02:41
@enf0rc3 enf0rc3 changed the title Turn the AI dropdown into an Open in Claude split button Rebuild the page actions row: Copy as markdown and Open in Claude Aug 11, 2026
@enf0rc3
enf0rc3 force-pushed the wl/open-in-llm branch 2 times, most recently from 95d869c to d3e9dfe Compare August 11, 2026 22:32
@enf0rc3 enf0rc3 changed the title Rebuild the page actions row: Copy as markdown and Open in Claude Replace the AI dropdown with an Open in Claude split button Aug 11, 2026
@enf0rc3
enf0rc3 changed the base branch from main to wl/page-actions August 11, 2026 22:32
@enf0rc3
enf0rc3 force-pushed the wl/open-in-llm branch 3 times, most recently from 8bd66b9 to d888769 Compare August 11, 2026 22:48
@enf0rc3
enf0rc3 changed the base branch from wl/page-actions to wl/split-button August 11, 2026 22:48
@enf0rc3 enf0rc3 changed the title Replace the AI dropdown with an Open in Claude split button Add an Open in Claude split button to the page actions Aug 11, 2026
}

.octo-llm :global(.octo-llm__icon--chatgpt) {
mask: url('../assets/icons/chatgpt.svg') center / var(--octo-llm-glyph-size)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im thinking we need a global 'icons.css' for these, but not keen to do it now this pr has lived too long

@enf0rc3
enf0rc3 force-pushed the wl/open-in-llm branch 2 times, most recently from c31ca79 to 477be1c Compare August 12, 2026 03:49
Base automatically changed from wl/split-button to main August 12, 2026 23:32
@enf0rc3
enf0rc3 force-pushed the wl/open-in-llm branch 2 times, most recently from a173f36 to 7a80303 Compare August 12, 2026 23:57
The primary half opens Claude with a prompt pointing at the page's .md URL. The
caret opens a menu with Open in Claude and Open in ChatGPT. It is the
SplitButton component, so the halves, divider, menu and positioning come from
there.

Gemini is absent because gemini.google.com ignores prompt parameters, so the
entry could only prefill by pointing at AI Studio, which is not where "Open in
Gemini" says it is going.

The prompt carries an absolute URL, because the assistant fetches the page
itself rather than following a link from this site.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@enf0rc3

enf0rc3 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by a fresh PR from the same branch, to clear leftover stack metadata from when this was based on wl/split-button. No content change.

@enf0rc3 enf0rc3 closed this Aug 13, 2026
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.

2 participants