Add /grab command with AI Canvas for visual element selection#2936
Draft
youknowriad wants to merge 1 commit intotrunkfrom
Draft
Add /grab command with AI Canvas for visual element selection#2936youknowriad wants to merge 1 commit intotrunkfrom
youknowriad wants to merge 1 commit intotrunkfrom
Conversation
Introduces a new `apps/ai-canvas` React 19 app that renders the site in an iframe and provides element picking UI (highlight, tooltip, confirmation modal). The CLI serves it via Playwright's page.route() on the same origin as the site, enabling full iframe DOM access. Selections flow asynchronously to the CLI via exposeFunction — the browser stays open and the user can pick elements at any time, even while a prompt is running. The latest selection is shown in the prompt editor's bottom border and attached to the next prompt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4 tasks
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.
Related issues
How AI was used in this PR
This feature was largely AI-assisted (vibe-coded). The architecture, component structure, and integration were designed collaboratively with Claude. All code has been reviewed by the author.
Proposed Changes
apps/ai-canvasReact app workspace that renders a WordPress site in an iframe with element picker UI (hover highlights, tooltips, confirmation modal)/grabslash command to the CLIaichat that opens a headed Playwright browser with the AI Canvas, letting users visually select DOM elementsexposeFunctionbridge — the browser stays open while the user continues chattingTesting Instructions
npm run cli:buildnode apps/cli/dist/cli/main.js ai, select a running site/grab— a browser window should open showing the site in an iframePre-merge Checklist