Skip to content

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

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
RealDiligent:feat/miner-extension-scaffold-4307
Jul 10, 2026
Merged

feat(miner-extension): scaffold browser extension surface#4557
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
RealDiligent:feat/miner-extension-scaffold-4307

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

  • Adds apps/gittensory-miner-extension/, a Manifest V3 contributor-facing extension scaffold parallel to the maintainer overlay at apps/gittensory-extension/.
  • Wires issue-page-only content_scripts, background.js/content.js message passing, and an options page for watched-repo configuration.
  • Includes unit tests covering manifest shape, issue-route detection, shell rendering, and background issue-context plumbing.

Closes #4307

Test plan

  • npx vitest run test/unit/miner-extension-content.test.ts
  • CI green on upstream PR

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 10, 2026 02:07
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

Add a Manifest V3 miner-facing extension parallel to the maintainer overlay, with issue-only content scripts, background/content messaging plumbing, watched-repo options, and regression tests so the opportunity badge can land in a follow-up.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.07%. Comparing base (50dd63b) to head (b67bce9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4557   +/-   ##
=======================================
  Coverage   94.07%   94.07%           
=======================================
  Files         427      427           
  Lines       37938    37938           
  Branches    13851    13851           
=======================================
  Hits        35692    35692           
  Misses       1586     1586           
  Partials      660      660           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 10, 2026
@loopover-orb

loopover-orb Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-10 02:21:31 UTC

7 files · 1 AI reviewer · no blockers · readiness 82/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This adds a new Manifest V3 browser extension scaffold (apps/gittensory-miner-extension/) that mirrors the existing maintainer overlay pattern in apps/gittensory-extension/: issue-page-only content script, background service worker message passing, and an options page for local watched-repo config. The code is inert scaffolding — no live badge rendering, no network calls beyond chrome.storage — and the shipped logic (route matching, message dispatch, repo parsing) is correctly implemented and matches the conventions of the sibling extension. Tests exercise the real functions via vm.Script against the actual file contents rather than reimplementing logic, so they're not fabricated coverage.

Nits — 5 non-blocking
  • apps/gittensory-miner-extension/manifest.json declares host_permissions for https:​//github.com/* but nothing in content.js/background.js performs a cross-origin fetch — the content_scripts match already covers DOM access, so this permission is currently unused; drop it until the follow-up badge feature needs it, or note why it's pre-provisioned.
  • apps/gittensory-miner-extension/options.js:46 hardcodes the 2600ms status-clear timeout as a magic number; a named constant would make the UX intent explicit.
  • apps/gittensory-miner-extension/options.js wraps the entire submit-handler wiring in an if/else keyed off missing DOM nodes (options.js:23) rather than early-returning, adding a nesting level for what's effectively a guard clause.
  • README.md states the read-only opportunity badge is deferred to a follow-up issue — worth confirming that follow-up is filed/linked so this scaffold doesn't sit unused.
  • Consider trimming host_permissions from manifest.json until it's actually needed (least-privilege, avoids an extra review question at install time).
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #4307
Related work ⚠️ 1 scoped overlap Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 300 registered-repo PR(s), 122 merged, 17 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 300 PR(s), 17 issue(s).
Gate result ✅ Passing No configured blocker found.
Linked issue satisfaction

Addressed
The PR adds apps/gittensory-miner-extension/ as a Manifest V3 scaffold with issue-only content_scripts, a background.js/content.js chrome.runtime message-passing split, an options page for watched-repo configuration, and a README explicitly distinguishing it from the maintainer overlay at apps/gittensory-extension/ — covering every deliverable in the issue as an empty shell without the badge itsel

Review context
  • Author: RealDiligent
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: JavaScript, Python, Ruby, Svelte, TypeScript, Cuda, Markdown, MDX
  • Official Gittensor activity: 300 PR(s), 17 issue(s).
  • Related work: Titles/paths share 6 meaningful terms. (issue #4297, issue #4307)
Contributor next steps
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop after /
/ mobile after / (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 80d623f into JSONbored:main Jul 10, 2026
9 checks passed
@loopover-orb loopover-orb Bot added gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. and removed gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. labels Jul 10, 2026
@JSONbored JSONbored added gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(miner-extension): scaffold browser extension surface

2 participants