fix(frontend): encode scan id in "View Full Report" link (MCP-2125)#644
Merged
Conversation
Scan ids embed the raw upstream server name, so official-registry servers whose names contain '/' (e.g. com.pulsemcp/google-flights) produce a scan id like scan-com.pulsemcp/google-flights-<ts> with a '/' in it. The scan-report route (/security/scans/:jobId) is a single segment, so the unencoded ServerDetail "View Full Report" link split the path and fell through to the catch-all 404. Add a scanReportPath() helper that percent-encodes the id (vue-router v4 decodes it back on read, so ScanReport.vue needs no manual decode) and use it in both ServerDetail.vue (the bug) and Security.vue (DRY; was already encoding inline). Same class as MCP-1112 / serverDetailPath. Adds a vitest covering the encoded link target and a route round-trip. Related #643
Deploying mcpproxy-docs with
|
| Latest commit: |
9c78586
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://bf78b076.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://fix-mcp-2125-scan-report-lin.mcpproxy-docs.pages.dev |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 27432756831 --repo smart-mcp-proxy/mcpproxy-go
|
There was a problem hiding this comment.
✅ Gatekeeper approval — Codex review verdict: ACCEPT.
This approval is posted automatically by the MCPProxy Gatekeeper App on behalf of the Codex reviewer (verdict of record lives in the Paperclip review thread). Author≠approver satisfied; QA + CI gates enforced separately.
Auto-approved per Model B (MCP-1249).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes Defect B of MCP-2123 (frontend lane): the Security-tab "View Full Report" link 404s for official-registry servers whose names contain a
/(e.g.com.pulsemcp/google-flights).Root cause
Scan ids embed the raw upstream server name, so the id contains a
/:scan-com.pulsemcp/google-flights-1781284446323229000.The scan-report route is a single segment (
/security/scans/:jobId), and theServerDetail.vuelink did not encode the id, so the/split the path and fell through to the catch-all 404.Fix
scanReportPath(jobId)helper inutils/serverRoute.tsthatencodeURIComponent()s the id. vue-router v4 decodes the param back on read, soScanReport.vueneeds no manual decode (same class as MCP-1112 /serverDetailPath).ServerDetail.vue(the bug) andSecurity.vue(DRY — it was already encoding inline; now shares the helper).…/security/scans/${…}link sites;api.tsalready encodes viagetScanReportByJobId.Tests
frontend/tests/unit/scan-report-route.spec.ts:scanReportPathpercent-encodes a/-containing scan id into a single path segment; leaves plain ids untouched.scan-reportroute (not the 404 catch-all) and decodes back to the original id.Verification
npx vitest run→ 19 files / 156 tests pass (incl. 3 new).npx vue-tsc --noEmit→ clean.make build→ frontend + Go binary build green (frontend is//go:embed-ed).Scope
Frontend only (
frontend/src/). Backend Defect A is fixed in PR #643.Related #643