fix(extension): remove stranded matchPullRequestTarget and keep scoped CI coverage (#8023) - #8062
Conversation
… function and enhance test coverage for backend contract parity (JSONbored#8023) - Removed the matchPullRequestTarget function from content.js as it was redundant. - Updated unit tests to ensure that the content script, background script, and auth.js maintain contract parity with the backend API. - Added checks in tests to verify that the expected endpoints are defined in the OpenAPI specification.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-22 17:58:45 UTC
Review summary Nits — 5 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver 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://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. Scroll preview
A short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show. 🟩 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.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8062 +/- ##
==========================================
+ Coverage 91.81% 99.48% +7.66%
==========================================
Files 731 1 -730
Lines 74862 193 -74669
Branches 22973 7 -22966
==========================================
- Hits 68733 192 -68541
+ Misses 5034 0 -5034
+ Partials 1095 1 -1094
Flags with carried forward coverage won't be shown. Click here to find out more.
|

Summary
matchPullRequestTargetfromapps/loopover-extension/content.jsand its__loopoverContentInternalsexport — a stranded duplicate ofmatchGitHubPageTargetleft by fix(extension): drop dead issue-page content-script match #7487.test/unit/extension-content.test.tsso route coverage pinsmatchGitHubPageTargetdirectly (including/pull/:n/filesand bare-repo no-match), fixing the TypeError that closed earlier attempts./v1/extension/pull-contextpath on the OpenAPI registration so scoped CI (--changed+coverage.changed) still emits a non-emptylcov.info— the failure mode that closed fix(extension): remove stranded matchPullRequestTarget (#8023) #8032/refactor(extension): remove dead matchPullRequestTarget from content.js (#8023) #8049/chore(extension): remove dead matchPullRequestTarget; pin extension endpoints to the API contract #8053/fix(extension): remove stranded matchPullRequestTarget duplicate from content.js (#8023) #8054.Closes #8023
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
node --checkoncontent.js,git diff --check, andnpx vitest runover the three extension suites (after a full workspace install). Extension lint/typecheck:npm run extension:lint/npm run extension:typecheck.apps/**is outside Codecov patch; the only graded touch is a comment on an already-covered OpenAPI path.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
N/A — dead-code removal in the content script; overlay behavior is unchanged (still mounts via
matchGitHubPageTarget).Notes
test/unit/extension-content.test.tscallingmatchPullRequestTarget(TypeError).validate-testswith emptycoverage/lcov.infounder scoped--changed/coverage.changed, because the diff had no gradedsrc/**file. This PR keeps a graded OpenAPI path in the diff and exercises it from each extension suite so every shard uploads real coverage.