chore(extension): remove dead matchPullRequestTarget from content.js - #8050
chore(extension): remove dead matchPullRequestTarget from content.js#8050RealDiligent wants to merge 1 commit into
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
…SONbored#8023) matchPullRequestTarget duplicated matchGitHubPageTarget minus the kind field. JSONbored#7487 removed issue-page matching and simplified the target guard but left this wrapper stranded: no production call site remains -- it was only re-exported through the __loopoverContentInternals test hook. Unlike the issue's "zero test files" note, the ROOT test suite does consume that hook: test/unit/extension-content.test.ts asserted on internals.matchPullRequestTarget in four places (the miss that got the previous attempt at this issue closed). Those assertions are removed with the symbol; the one case unique to them -- a JSONbored/pull/146/files sub-path still matching -- is ported to matchGitHubPageTarget, where the behavior actually lives, so no behavioral coverage is lost.
|
Closing this myself after diagnosing the CI failure — the change is correct (all 5 suite tests green, extension lint/typecheck green, zero remaining
So #8023 is structurally blocked for contributor PRs until either (a) the empty-lcov guard tolerates a scoped run whose selected tests touch no instrumented source, or (b) extension-only diffs skip the coverage-verify step the way the |
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-22 15:58:23 UTC
Review summary Nits — 2 non-blocking
CI checks failing
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.
|
|
LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests (2), validate-tests (1), validate-tests (3), validate, validate-tests (3), validate-tests (1), validate-tests (2))). 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. |

Summary
matchPullRequestTarget(apps/loopover-extension/content.js) duplicatedmatchGitHubPageTargetminus thekindfield. fix(extension): drop dead issue-page content-script match #7487 removed issue-page matching (the manifest content-script match ispull/*only) and simplified theif (target)guard, leaving this wrapper stranded — no production call site remains; it was only re-exported through the__loopoverContentInternalstest hook.__loopoverContentInternalsentry, and — the part the previous attempt at this issue (fix(extension): remove dead matchPullRequestTarget from content.js #8037) missed and was closed for — updated the root test suite that consumes that hook:test/unit/extension-content.test.tsasserted oninternals.matchPullRequestTargetin four places (the issue's "zero test files" note only countedapps/loopover-extension's own missingtest/dir, not this root suite). Those assertions are removed with the symbol; the one case unique to them — a/pull/146/filessub-path still matching — is ported tomatchGitHubPageTarget, where the behavior actually lives, so no behavioral coverage is lost.grep matchPullRequestTargetconfirms zero remaining references.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:
vitest run test/unit/extension-content.test.ts(5 tests green — the suite that consumes the removed test hook),npm run extension:lintandnpm run extension:typecheck(the extension checks CI gatesvalidate-codeon, whichtest:ciitself does not run), and the full rootnpm run typecheck.actionlint/workers/mcp/ui checks are untouched surfaces; CI runs them all.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
Not applicable — dead-code removal with no behavior or visual change (the overlay mounts through
matchGitHubPageTarget, which is untouched; the extension has no visible difference to capture).Notes
test/unit/extension-content.test.tsasserting oninternals.matchPullRequestTarget, which would throw aTypeError. This PR updates that suite in the same diff and re-anchors the/pull/<n>/filessub-path expectation onmatchGitHubPageTargetdirectly.