Skip to content

feat(miner-extension): scaffold browser extension surface #4307

Description

@JSONbored

Correcting the assumption that this would be greenfield: a browser extension already exists in this repo at apps/gittensory-extension/ (Manifest V3, added in commit 4bf53e54c "feat(ui): productionize Cloudflare frontend replacement") — but it serves a completely different product surface and audience. Its manifest.json names it "Gittensory Maintainer Overlay": a private PR/issue-context overlay for maintainers, injected via a content script matched on https://github.com/*/*/pull/* and https://github.com/*/*/issues/*, talking to https://gittensory-api.aethereal.dev/*. This issue's extension is for miners/contributors (an issue-page opportunity badge, sibling Phase 6 issue) — opposite audience, opposite direction of information flow (this shows a contributor a locally/hosted-plane-computed opportunity signal; the existing one shows a maintainer private review context). So: not already done, but the existing extension is a real, directly relevant structural precedent to mirror mechanically — Manifest V3 shape, a background.js service worker + content.js content script split communicating via chrome.runtime.onMessage/sendMessage, an options_page, and scoped host_permissions — while keeping the new one at a separate path so it doesn't collide with or get confused for the maintainer-facing one.

Deliverables

  • New apps/gittensory-miner-extension/ (parallel naming to apps/gittensory-miner-ui/, sibling issue), Manifest V3.
  • content_scripts matched on GitHub issue pages (https://github.com/*/*/issues/*), mirroring apps/gittensory-extension/manifest.json's matches shape but scoped to issues only for this surface (no PR pages — that's the maintainer extension's job).
  • background.js service worker + content.js split with chrome.runtime message-passing, following apps/gittensory-extension/background.js's onMessage listener pattern (typed message type strings, async response via sendResponse).
  • An options page for local configuration (e.g. which repos to watch), mirroring apps/gittensory-extension/options.html/options.js's existence even if the actual settings differ.
  • Empty shell for this issue: manifest + messaging plumbing + options page skeleton only — the actual opportunity badge is the next, dependent Phase 6 issue.
  • Clarify in the extension's own README/description that this is a distinct product surface from apps/gittensory-extension (Maintainer Overlay), so the two are never conflated in a store listing or in-repo docs.

References

  • apps/gittensory-extension/manifest.json — the existing Manifest V3 shape (permissions, content_scripts, background.service_worker, options_page) to mirror structurally.
  • apps/gittensory-extension/background.js:1-8, content.js:1-19,21-44 — the message-passing and content-script-mount pattern to follow.
  • Commit 4bf53e54c — when/why the existing (differently-scoped) extension was added, for context on why this isn't the same surface.
  • Sibling Phase 6 issue: feat(miner-extension): add read-only issue-page opportunity badge — the dependent follow-up this scaffold enables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions