Skip to content

Add Chrome extension#121

Open
jamesvclements wants to merge 13 commits intobenjitaylor:mainfrom
jamesvclements:feat/chrome-extension
Open

Add Chrome extension#121
jamesvclements wants to merge 13 commits intobenjitaylor:mainfrom
jamesvclements:feat/chrome-extension

Conversation

@jamesvclements
Copy link

@jamesvclements jamesvclements commented Mar 2, 2026

Summary

Add a Chrome extension so Agentation works on all projects without installation

  • Adds a Chrome extension that wraps the real <Agentation /> React component — zero drift from the npm package
  • New extension/ workspace package with esbuild build pipeline
  • SCSS modules plugin mirrors package/tsup.config.ts exactly
  • Imports from source via esbuild alias (from "agentation" resolves to ../package/src/index.ts)
  • Light mode popup with toolbar status detection (checks current tab URL against content script patterns) and MCP server health check

Popup

CleanShot 2026-03-02 at 17 58 31@2x

How it works

  • extension/build.mjs bundles React + ReactDOM + the component into a single IIFE content script
  • Chrome injects dist/content.js on localhost pages via manifest.json
  • On mount, pings localhost:4747/health for MCP server; works in clipboard-only mode if unavailable

New scripts

  • pnpm extension:build — bundle content script
  • pnpm extension:watch — rebuild on changes
  • pnpm extension:zip — create shareable zip

Notes

  • Icon PNG files (~10KB total) are required by Chrome MV3
  • MCP endpoint configuration left out of popup (separate concern for a follow-up PR)
  • Request for sticker-style icon (bunny silhouette with transparent background instead of white rounded rectangle)

Closes #26

Demo of it working

CleanShot.2026-02-27.at.16.21.07.1.mp4

benjitaylor and others added 10 commits February 24, 2026 17:33
Canvas overlay for drawing on the page with gesture classification
(box, circle, underline, arrow). Click strokes to create linked
annotations. Includes undo (cmd+z), hover highlighting, and drawing
descriptions in copy output.
Shake the popup if you try to draw while it's open. Replace stroke
width change on hover with a soft translucent glow behind the stroke.
- Drawing glow animates in/out via rAF lerp (0→0.25 alpha) instead of
  snapping. Works for both stroke hover and marker hover directions.
- Canvas hidden when marker visibility is toggled off (H key / eye
  button), unless actively in draw mode.
This reverts commit fbd9b593df59ae67b8a4440743d2d34c385442f2.
Glow highlight lerps via rAF (separate effect, doesn't touch resize/
scroll). Canvas hidden when marker visibility toggled off.
Single-pass rendering with canvas shadowBlur on hovered stroke instead
of the two-pass wide translucent stroke. glowIntensity 0-1 controls
blur radius (0-12px), animated in/out via rAF lerp.
… fade

- Replace shadowBlur glow with globalAlpha dim (non-hovered strokes at 30%)
- Add tooltip exit animation (100ms fade out on unhover)
- Move canvas outside overlay so it fades on toolbar close
- Fix marker exit timing: compute timeout from stagger delay + animation
- Fix marker enter timing: same, prevents class removal mid-animation
- Skip stagger delay for individually added markers (only batch entrance)
- Remove scale(1.3) on markers when linked drawing is hovered
- Add drawCanvasFading state for deletion fade
- Use visibility:hidden for hit-test hiding (canvas uses opacity now)
- Revert canvas from pointer events back to mouse events (fixes strokes
  not registering)
- Add unique IDs to draw strokes and strokeId on annotations (fixes
  wrong strokes being deleted when indices shift)
- Delete/cancel now find strokes by stable ID, not positional index
- Per-stroke fade on delete uses refs for fresh data, no stale closures
- Canvas visibility uses shouldShowMarkers only (hiding markers while
  in draw mode now works, also exits draw mode)
- Remove touch-action, drawModeActive CSS, pointer capture
Adds a Chrome extension that wraps the real Agentation React component,
injecting it automatically on localhost pages. Imports from source via
esbuild alias so the extension stays in sync with zero drift.

- New `extension/` workspace package with esbuild build
- SCSS modules plugin mirrors package/tsup.config.ts exactly
- Popup UI shows MCP server connection status
- Chrome MV3 manifest with localhost content script injection

Closes benjitaylor#26
- Switch to light mode design with proper border-radius (24px = 8px inner + 16px padding)
- Remove MCP server section and endpoint config (separate concern)
- Fix toolbar status: check current tab URL against content script patterns
  instead of always showing "Active"
- Add tabs permission for URL access
@vercel
Copy link

vercel bot commented Mar 2, 2026

@jamesvclements is attempting to deploy a commit to the Benji Taylor's Projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Author

Choose a reason for hiding this comment

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

It'd be nice to have a sticker version of this (where the white background is the shape of the bunny) and the rest is transparent, instead of the white rounded rectangle

- Add MCP server status row (shown only when toolbar is active)
- Fix MCP endpoint from port 4440 to 4747 (matches server default)
@jamesvclements jamesvclements marked this pull request as ready for review March 2, 2026 23:08
@jamesvclements jamesvclements changed the title Add Chrome extension workspace package Add Chrome extension Mar 2, 2026
@phucledien
Copy link

is there anyway we could use it in any website remotely?
This is ideal if

  • Tester A have an extension
  • connect extension with the repo + llm
  • We deploy the web in dev env
  • Send that url to Tester A to test
  • Tester A gives comment and submit, ai agent auto push the changes to the repo pr

that would be perfect 💯

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.

[Feature Proposal] Chrome Extension version - ready to contribute

3 participants