fix(miner-extension): remove dead discoveryIndexUrl config field - #5343
Conversation
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.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5343 +/- ##
==========================================
- Coverage 94.40% 94.36% -0.04%
==========================================
Files 550 550
Lines 44116 44116
Branches 14631 14631
==========================================
- Hits 41649 41632 -17
- Misses 1792 1809 +17
Partials 675 675
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-12 14:26:03 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk 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.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands Visual preview
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.
|
…me.storage.sync (#5511) #5343 removed the discoveryIndexUrl UI field and stopped reading/writing it, but chrome.storage.sync.set only merges keys -- it never deletes ones an earlier extension version already synced. Without an active purge, a value synced before #5343 stays in a user's account indefinitely, which is a real privacy/data-retention gap #5343 didn't close. Add removeLegacyDiscoveryIndexUrl(), called from refreshSettings() (which runs on every options-page load and again at the end of every save), so any stale value is cleared regardless of which path a user hits first. Extends the existing dead-field regression test with coverage for the purge on both load and save. Also regenerates packages/gittensory-miner/docs/env-reference.md, which was already stale on main (GITTENSORY_MINER_KILL_SWITCH from #5198/#5500 was never regenerated in) -- unrelated to this fix but required for miner:env-reference:check to pass in this PR's own CI; also fixed standalone in #5507.
Summary
apps/gittensory-miner-extension's options page had a "Discovery index URL" field that was saved tochrome.storage.syncand loaded back intoloadMinerExtensionSettings()'s return value, but never actually read anywhere downstream — the extension's own README explicitly acknowledged it ("A discovery-index URL can be saved for a future hosted client path; it is not read yet"). Confirmed dead by tracing every reference:background.js'sloadIssueOpportunityContextonly readssettings.watchedRepos, neversettings.discoveryIndexUrl.options.html(input + label),options.js(querySelector, submit-time save, restore-time read),background.js(loadMinerExtensionSettings's storage default/destructure/return), and the README's now-inaccurate paragraph describing it.packages/gittensory-engine/src/discovery-index-contract.ts(an unrelated, real, already-shipped request/response contract for a different "discovery index" concept — the hosted-plane API contract, not the extension's dead URL field) is untouched; confirmed via a full-repo grep that no other reference to the removeddiscoveryIndexUrlconfig field remains anywhere.Fixes #4861
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally — this change lives entirely underapps/gittensory-miner-extension/**, which (like the rest of the miner ecosystem) sits outside vitest'scoverage.includeglob today, socodecov/patchcannot measure it directly. It is nonetheless fully covered bytest/unit/miner-extension-content.test.ts, a root-level test file per house convention.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run build:minernpm run test:miner-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:testnpm run ui:buildnpm audit --audit-level=moderateUpdated
test/unit/miner-extension-content.test.ts: removed the now-obsoletediscoveryIndexUrlmock keys from the existingloadBackgroundInternals/loadOptionsInternalsfixtures, added a regression test asserting nodiscoveryIndexUrlstring remains anywhere inoptions.html/options.js/background.js(the deliverable's literal acceptance criterion — "no dead, documented-as-dead config fields remaining"), and added an end-to-end save/restore test driving the realoptions.jssubmit handler through achrome.storage.syncmock, asserting the persisted object contains only{ watchedRepos }and never adiscoveryIndexUrlkey. All 11 tests in the file pass (9 pre-existing + 2 new).Safety
chrome.storagefield removal only.chrome.storagedata; no mock/demo fallback introduced or removed.UI Evidencesection below — this is a minor extension-options-page field removal (one<label>/<input>row deleted from a settings form), not a feature requiring visual review; see Notes.UI Evidence
Not applicable per
CONTRIBUTING.md's intent for UI Evidence (visible feature changes needing visual review) — this PR only removes one dead, never-functional form field from a browser-extension options page; there is no new or changed visible behavior to demonstrate, only a deletion.Notes
options.jssaves it →background.js'sloadMinerExtensionSettings()loads it → but the only caller,loadIssueOpportunityContext, destructures and usessettings.watchedReposalone. No other file in the repo readssettings.discoveryIndexUrlor thechrome.storage.synckey.packages/gittensory-engine/src/discovery-index-contract.tsand itsDiscoveryIndex*types are a distinct, already-shipped, unrelated concept (the hosted discovery-plane's own request/response API contract) and are untouched by this PR.