Skip to content

feat(miner-extension): add a standard icon set to the manifest#5614

Closed
joaovictor91123 wants to merge 1 commit into
JSONbored:mainfrom
joaovictor91123:feat/miner-extension-icons-4862
Closed

feat(miner-extension): add a standard icon set to the manifest#5614
joaovictor91123 wants to merge 1 commit into
JSONbored:mainfrom
joaovictor91123:feat/miner-extension-icons-4862

Conversation

@joaovictor91123

Copy link
Copy Markdown
Contributor

Summary

  • apps/gittensory-miner-extension's manifest had no icons defined at all — no icons, no action.default_icon.
  • Adds the standard MV3 icon set (16/32/48/128) at icons/icon-<size>.png, generated by icons/generate-icons.mjs, which resizes the repo's own apps/gittensory-ui/public/favicon-512.png brand asset through sharp (already a root devDependency, no new dependency added) — so the extension's icon is always the same mark as the main site's favicon, not a separately drawn/synthesized asset.
  • Wires all four sizes into manifest.json's top-level icons and action.default_icon.
  • Adds the four sizes to scripts/build-miner-extension.mjs's PACKAGE_FILES list (and creates the icons/ output subdirectory) so the packaged zip actually ships them — verified locally via npm --workspace @jsonbored/gittensory-miner-extension run build.
  • Documents the icon set and regeneration command in the extension's README.

Test plan

  • New test/unit/miner-extension-icons.test.ts: asserts every size is wired into both manifest.json locations; asserts each icons/icon-<size>.png is a real PNG at the declared size (via sharp's own metadata read, not just a byte-length check); asserts every size is present in build-miner-extension.mjs's PACKAGE_FILES; asserts the generator sources from favicon-512.png via sharp rather than hand-drawn geometry.
  • npm --workspace @jsonbored/gittensory-miner-extension run build — confirmed the built dist/package/icons/ contains all four files.
  • npm --workspace @jsonbored/gittensory-miner-extension run lint passes.
  • npm run typecheck passes.
  • npm run docs:drift-check passes.
  • Existing test/unit/miner-extension-content.test.ts and test/unit/ci-extension-packages.test.ts still pass unchanged.

Closes #4862

The miner extension's manifest had no icons defined at all. Adds the
standard MV3 sizes (16/32/48/128), generated via generate-icons.mjs by
resizing the repo's own favicon-512.png brand asset through sharp (already
a devDependency) rather than drawing a separate/synthetic icon, so the
extension's icon always matches the main site's mark. Wires the sizes into
manifest.json's top-level icons and action.default_icon, and into
build-miner-extension.mjs's PACKAGE_FILES so the packaged zip actually
ships them.

Closes JSONbored#4862
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.01%. Comparing base (5d09204) to head (b170b3c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5614   +/-   ##
=======================================
  Coverage   95.01%   95.01%           
=======================================
  Files         574      574           
  Lines       45684    45684           
  Branches    14661    14661           
=======================================
  Hits        43405    43405           
  Misses       1528     1528           
  Partials      751      751           
Flag Coverage Δ
shard-1 43.99% <ø> (ø)
shard-2 35.73% <ø> (ø)
shard-3 32.24% <ø> (ø)
shard-4 32.61% <ø> (ø)
shard-5 31.75% <ø> (ø)
shard-6 44.07% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 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 13, 2026
@loopover-orb

loopover-orb Bot commented Jul 13, 2026

Copy link
Copy Markdown

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 LoopOver review result - reject/close recommended

Review updated: 2026-07-13 10:06:52 UTC

9 files · 1 AI reviewer · 1 blocker · readiness 100/100 · CI green · clean

🛑 Suggested Action - Reject/Close

Review summary
This adds the missing MV3 icon set to the miner extension: a small sharp-based generator that resizes the existing favicon-512.png brand asset to 16/32/48/128px, wires those paths into manifest.json's icons and action.default_icon, adds them to the build script's PACKAGE_FILES (plus creates the icons/ output subdir), and documents regeneration in the README. The generated PNGs are binary and unreviewable directly, but the test suite verifies real dimensions/format via sharp metadata reads rather than trusting byte counts, and confirms the generator sources from the actual brand asset rather than synthesized geometry — a reasonable substitute for visual inspection. The change is narrow, closes #4862 as claimed, and the build-script wiring (mkdir for icons/ + PACKAGE_FILES entries) matches the existing cpSync-per-file pattern so packaging won't fail on a missing directory.

Nits — 5 non-blocking
  • apps/gittensory-miner-extension/icons/generate-icons.mjs:23 leaves a console.log in a one-off dev script — fine for a manual regen tool, but worth confirming it's not invoked from any automated build step where its output would be noise.
  • The `sizes` array literal (16/32/48/128) in generate-icons.mjs:12 duplicates the same list independently declared in manifest.json and the test file; a shared constant isn't necessary for four MV3-standard sizes but is worth a one-line comment if the three lists ever drift.
  • No test asserts that `npm --workspace ... run build` actually produces the icons/ subdirectory inside dist/package — the PACKAGE_FILES/mkdir wiring is covered indirectly via string-matching, not an actual build+zip round trip.
  • Consider a golden-file or pixel-sanity check (e.g. corner-pixel color match against the source favicon) in miner-extension-icons.test.ts to catch a botched regenerate that outputs the right dimensions but wrong content.
  • apps/gittensory-miner-extension/README.md could note that generate-icons.mjs is not run automatically by `npm run build` — only checked-in icons are packaged — so contributors know to regenerate manually after touching favicon-512.png.

Why this is blocked

  • Linked issue overlaps another open PR — Review the related PRs before spending reviewer time on duplicate work.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. Linked issue overlaps another open PR — Review the related PRs before spending reviewer time on duplicate work.
Signal Result Evidence
Code review ❌ 1 blocker 1 reviewer
Linked issue ✅ Linked #4862
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low 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: 141 registered-repo PR(s), 79 merged, 12 issue(s).
Contributor context ✅ Confirmed Gittensor contributor joaovictor91123; Gittensor profile; 141 PR(s), 12 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Improvement ✅ Minor risk: clean · value: minor — Code changes are accompanied by test evidence.
Review context
  • Author: joaovictor91123
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, JavaScript, MDX, C++, CSS, Rust, TypeScript
  • Official Gittensor activity: 141 PR(s), 12 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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.
[BETA] Chat with Gittensory

Ask Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @gittensory ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @gittensory mention with a real question is routed to the closest matching read-only command automatically -- no exact syntax required.

Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before / after /
/ mobile before / (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 LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 13, 2026
@loopover-orb

loopover-orb Bot commented Jul 13, 2026

Copy link
Copy Markdown

Gittensory is closing this pull request on the maintainer's behalf (Linked issue overlaps another open PR; duplicate of another open PR). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 13, 2026
@joaovictor91123 joaovictor91123 deleted the feat/miner-extension-icons-4862 branch July 13, 2026 10:23
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. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add icons to the extension manifest

1 participant