From 2df1257c16d4f3ed5440c8ee287eb936804b940d Mon Sep 17 00:00:00 2001 From: galuis116 Date: Sun, 12 Jul 2026 10:11:41 -0400 Subject: [PATCH] fix(miner-extension): remove dead discoveryIndexUrl config field (#4861) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The options page saved a "discovery index URL" to chrome.storage.sync and loaded it back into loadMinerExtensionSettings(), but no code path ever read it — background.js's loadIssueOpportunityContext only consumes settings.watchedRepos. The extension's own README already acknowledged the field as unread. Removed it from options.html, options.js, and background.js, and updated the README accordingly. --- apps/gittensory-miner-extension/README.md | 5 +- apps/gittensory-miner-extension/background.js | 6 +- apps/gittensory-miner-extension/options.html | 4 -- apps/gittensory-miner-extension/options.js | 11 +--- test/unit/miner-extension-content.test.ts | 61 ++++++++++++++++++- 5 files changed, 66 insertions(+), 21 deletions(-) diff --git a/apps/gittensory-miner-extension/README.md b/apps/gittensory-miner-extension/README.md index 06dd6cf02a..15b0bb46d2 100644 --- a/apps/gittensory-miner-extension/README.md +++ b/apps/gittensory-miner-extension/README.md @@ -18,6 +18,5 @@ available for the current issue. ## Local ranked cache Laptop-mode installs can paste JSON from a miner `discover` run into the options page. The extension stores that list in -`chrome.storage.local.rankedCandidates` and looks up the current issue there. A discovery-index URL can be saved for a -future hosted client path; it is not read yet, so when only unranked hosted metadata would be available the badge -degrades gracefully by staying hidden. +`chrome.storage.local.rankedCandidates` and looks up the current issue there. When no ranked signal is cached for the +current issue, the badge degrades gracefully by staying hidden. diff --git a/apps/gittensory-miner-extension/background.js b/apps/gittensory-miner-extension/background.js index bebc7cb081..d8c5b332a0 100644 --- a/apps/gittensory-miner-extension/background.js +++ b/apps/gittensory-miner-extension/background.js @@ -59,13 +59,11 @@ async function loadIssueOpportunityContext(message) { } async function loadMinerExtensionSettings() { - const stored = await chrome.storage.sync.get({ watchedRepos: [], discoveryIndexUrl: "" }); + const stored = await chrome.storage.sync.get({ watchedRepos: [] }); const watchedRepos = Array.isArray(stored.watchedRepos) ? stored.watchedRepos.map((value) => String(value).trim()).filter(Boolean) : []; - const discoveryIndexUrl = - typeof stored.discoveryIndexUrl === "string" ? stored.discoveryIndexUrl.trim() : ""; - return { watchedRepos, discoveryIndexUrl }; + return { watchedRepos }; } async function loadRankedCandidates() { diff --git a/apps/gittensory-miner-extension/options.html b/apps/gittensory-miner-extension/options.html index 0bf82ea7af..be2bb3f3b1 100644 --- a/apps/gittensory-miner-extension/options.html +++ b/apps/gittensory-miner-extension/options.html @@ -64,10 +64,6 @@

Gittensory miner extension

Watched repositories -