mcp-data-platform-v1.57.7
Highlights
- Public collection share page now shows branding + title in the upper-left header, matching the layout users see on shared individual assets. Previously the collection viewer rendered only the two brand blocks with no title in the chrome — operators had to scroll into the body to see what they were looking at.
- Logo-only implementor branding now renders. The previous template gated implementor branding on
ImplementorNamealone, so a deployment configuring only a logo (no display name) saw nothing in the upper-left. - Hardened external-link
relattribute tonoopener noreferreron the public collection viewer's brand anchors (was barenoopener). - Developer workflow:
make verifynow writes a gate sentinel (.claude/.last-verify-passed) on success, paired with a companion update to the pre-commit review-gate hook so that CI-equivalent local checks become a hard precondition for committing — closing the gap where the gate's adversarial LLM review could clear code that failsgolangci-lint.
Bug fix
fix(portal): collection viewer header parity with asset viewer (#359)
pkg/portal/templates/public_collection_viewer.html was missing the title in the chrome header and used a less-robust implementor-branding conditional than the asset viewer.
Template changes:
- Add
.brand-logo,.brand-name,.separator, and.header-centerCSS rules mirroring the asset viewer's class hierarchy..brand-namefont-weight: 500(was 600) for parity with asset viewer typography. - Restructure
<header>markup to: implementor-brand → separator → header-center (with collection name as<h1>) → header-right (theme toggle, separator, platform-brand). - Implementor-brand conditional changed to
{{if or .ImplementorName .ImplementorLogoSVG}}, matching the asset viewer's check, so deployments configuring only the logo still get the brand block. (Name-only and both-set paths also covered.) - Platform-brand block also wrapped in
{{if or .BrandName .BrandLogoSVG}}for symmetry. The Go handler inpkg/portal/public.goalways populates these (BrandNamedefaults to"MCP Data Platform";BrandLogoSVGdefaults to the bundled SVG), so this is belt-and-suspenders against future handler changes that allow opting out. - Remove duplicate body title: the JS that built
<div class="collection-header"><h1>...</h1></div>is dropped since the chrome<header>now carries the page<h1>. The collection description (rendered markdown) appears directly in<main>above the section grid.
Test coverage (3 new regression tests in pkg/portal/public_test.go):
TestPublicCollectionViewHeaderBranding— asserts implementor brand + collection title<h1>+ platform brand all render in correct DOM order. DOM-order anchors use<div class="..."element prefixes that cannot match the embedded<style>block's CSS rules (a subtle false-positive trap caught during the gate review). Anchor-balance check uses a regex<a[\s>]so a hypothetical bare<a>is also counted;require.NotEqualon index look-ups prevents slice panics on absent markers. Asserts both anchors close before block boundaries (</a>beforeheader-center/ before</body>).TestPublicCollectionViewLogoOnlyImplementor— exercises theorconditional improvement, asserts no stray<span class="brand-name">renders in the implementor section, and checks anchor balance.TestPublicCollectionViewNameOnlyImplementor— symmetric guard against an accidental rewrite of the conditional to AND.
All 7 collection-viewer tests pass under go test -race.
Developer workflow
build(verify): write gate sentinel on make verify success
make verify now writes the short SHA-256 of the working-tree diff (staged + unstaged) to .claude/.last-verify-passed after every dependency target succeeds. This is the in-repo half of a paired update with the maintainer-side pre-commit review-gate hook (~/.claude/hooks/review-gate.sh), which now requires both a CLEAN review artifact AND a fresh verify sentinel before allowing git commit.
Hash recipe in the Makefile is byte-identical to the gate hook's compute_diff_hash so the two sentinels stay in sync. .claude/ is already gitignored, so the sentinel file does not leak into version control.
This change is invisible to platform runtime behavior — it only affects the local development loop for contributors using the gate hook. Operators deploying the platform are unaffected.
Upgrade notes
- No config changes required. No new YAML keys, env vars, or migrations.
- No API/wire-format changes.
GET /portal/v/{token}(and other public viewer endpoints) return the same response shape; only the rendered HTML inside the response body has changed. - Backwards compatible with v1.57.x deployments. No database migrations.
- Visual change for shared-collection viewers — operators with custom
BrandName/ImplementorName/ etc. configured inportal.brand_*andportal.implementor_*will see those values now appear alongside the collection title in the chrome header. The defaults ("MCP Data Platform"+ bundled SVG) render automatically.
Verification
- All CI checks green on the merged PR after the lint fix landed: Lint (with
only-new-issues: true), Test, Build, Security Scan, CodeQL, Analyze, Frontend Build, codecov/patch, codecov/project. go test -race ./pkg/portal/...passes — 7/7 collection-viewer tests including 3 new.make securityclean (gosec + govulncheck — no vulnerabilities).- Release artifacts signed via Sigstore; SBOMs published per platform.
Full changelog: v1.57.6...v1.57.7