Skip to content

Build GitHub Conductor Chrome extension#1

Merged
sarth6 merged 1 commit into
masterfrom
github-pr-conductor-extension
May 11, 2026
Merged

Build GitHub Conductor Chrome extension#1
sarth6 merged 1 commit into
masterfrom
github-pr-conductor-extension

Conversation

@sarth6
Copy link
Copy Markdown
Owner

@sarth6 sarth6 commented May 11, 2026

Summary

A Manifest V3 Chrome extension that injects a button on every GitHub PR page. Clicking it opens a Conductor workspace via the conductor:// deep link, populated with a configurable prompt template that uses PR metadata placeholders ({prTitle}, {prNumber}, {prUrl}, etc.).

The button lives next to GitHub's native PR actions (Subscribe / Code / etc.) so it's discoverable in context. There's also a toolbar popup for picking a non-default preset.

Architecture

src/
├── types.ts          ← shared TypeScript types
├── storage.ts        ← chrome.storage.sync adapter + in-memory fallback
├── template.ts       ← {placeholder} substitution engine
├── conductor-url.ts  ← builds conductor:// URLs with safe encoding
├── pr-scraper.ts     ← extracts PR metadata from the DOM
├── content/          ← content script: injects button on PR pages
├── options/          ← settings page (prompt presets + URL template)
└── popup/            ← toolbar popup with preset list

Side effects live at the boundary (storage, content, popup). Everything else is pure functions, which is why 34 unit tests run in <1 second.

Stack

  • TypeScript 5.7 with strict mode + exactOptionalPropertyTypes
  • Vite 6 + @crxjs/vite-plugin for MV3 bundling with HMR
  • Vitest + jsdom for unit + DOM tests
  • ESLint 9 (flat config) + Prettier
  • GitHub Actions CI: typecheck + lint + format-check + test + build, uploads dist/ artifact

Conductor URL scheme

From the Conductor changelog v0.36.4, the Linear integration uses conductor:// with prompt and path query params. The default URL template is:

conductor://new?prompt={prompt}

The URL template is fully configurable in the options page — if the exact route differs (e.g. needs conductor:// vs conductor://new), you can adjust without a release.

Test plan

  • All 34 unit tests pass
  • TypeScript strict typecheck clean
  • ESLint clean
  • Prettier formatting consistent
  • Production build succeeds (~10 KB gzipped total)
  • Generated manifest.json validates (MV3, minimal permissions)
  • Manual: load dist/ via chrome://extensions → Developer mode → Load unpacked, visit a GitHub PR, click the button, confirm Conductor opens with the prompt prefilled
  • Manual: open the options page, edit a preset, save, confirm the inline button label updates
  • Manual: open the toolbar popup on a PR, pick a non-default preset, confirm the right prompt opens

Permissions

Minimal: storage for settings + a single host permission for *://github.com/*. No network requests, no background service worker, no other-site access.

🤖 Generated with Claude Code

A Manifest V3 Chrome extension that injects a button on every GitHub PR
page. Clicking it opens a Conductor workspace via the conductor:// deep
link, populated with a configurable prompt template that uses PR metadata
placeholders ({prTitle}, {prNumber}, {prUrl}, etc.).

Stack: TypeScript (strict + exactOptionalPropertyTypes), Vite 6 with
@crxjs/vite-plugin, Vitest + jsdom (34 unit tests), ESLint 9 flat config,
Prettier, GitHub Actions CI (typecheck + lint + format + test + build).

Architecture is five pure-TS modules (types, storage, template,
conductor-url, pr-scraper) plus three side-effecting boundaries (content
script, options page, popup). Minimal permissions: storage + github.com
host only.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@sarth6 sarth6 merged commit 7b043d3 into master May 11, 2026
1 check passed
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.

1 participant