Skip to content

fix: use release audit evidence and reveal template files - #4487

Merged
Patrick-Erichsen merged 1 commit into
mainfrom
fix-template-audit-file-preview
Nov 9, 2026
Merged

Patrick-Erichsen merged 1 commit into
mainfrom
fix-template-audit-file-preview

Conversation

@Patrick-Erichsen

Copy link
Copy Markdown
Collaborator

Summary

  • Read Template audit evidence from the pinned latest release and reuse the shared ClawScan verdict/meter logic. Missing, pending or failed reports show “Unavailable” with neutral gray bars, rather than inferring an audit from package scanStatus.
  • Preserve package install warnings/copy gates, pinned file requests, retry behavior and stale-response protection.
  • Render workspace previews beneath the selected filename and focus/scroll to the result, including when reselecting the same file.

This release has a real clean report. Its previous label was valid, but the implementation could show green without that report. File click handlers already worked; their result was below the entire list and outside the viewport.

Validation

Using repo-pinned Bun 1.4.4:

  • 54 focused route/component/security tests pass, with observed red→green regressions for missing evidence, pinned audit loading and inline/focused previews.
  • bun run ci:static passes.
  • bun run ci:types-build passes, including app/schema/CLI/admin TypeScript checks and the production build.
  • Real Chromium verifies SOUL.md, AGENTS.md and references/integration-contract.md on desktop and mobile: all six previews visible at ~100px in the viewport, focused, with no uncaught page errors or page-level overflow.

Comparable browser proof

Baseline is production 4c99bb83212b798bc5b7cc66beeeacccb40da178 at https://clawhub.ai/openclaw/templates/api-integration-engineer. Candidate is fe3cbb01e98866afb755dd90d2cdfbecf5b46ec6 running at http://127.0.0.1:3027 against the same unchanged public read backend. Matched dark/reduced-motion desktop 1440×1068 and mobile 390×844 captures were inspected and delivered before push. Paired screenshots are attached in the proof comment. Browser responses and product UI were not mocked. The unavailable audit states are covered by component tests, not presented as this real release’s audit.

Remaining gates and limitations

  • Full local coverage is not green: 9,268 passed / 47 failed / 5 skipped, including localhost networking and subprocess timing failures on this host. A bounded retry was canceled after identifying the loopback routing setup problem; the execution environment does not permit the needed per-process proxy exclusion. No assertions, timing budgets, coverage thresholds or protections were changed. Required hosted CI remains a landing gate.
  • Local independent autoreview returned reviewer-unavailable/authentication, not a clean verdict. No alternate review route was substituted. Manual patch inspection is complete; independent review is still outstanding.
  • Frontend-only: no backend/index mutation, package release or personal Gateway change.

@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clawhub Ready Ready Preview Nov 9, 2026 5:43am UTC

Request Review

@clawsweeper

clawsweeper Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@Patrick-Erichsen

Copy link
Copy Markdown
Collaborator Author

Passing candidate — selected files visibly open

Candidate fe3cbb01e98866afb755dd90d2cdfbecf5b46ec6, real ClawHub running at http://127.0.0.1:3027 against the unchanged public read backend. Desktop 1440×1068 and mobile 390×844, dark theme/reduced motion, signed out, the same API integration engineer v0.1.2. All attached captures inspected.

The selected preview now appears beneath its filename and is focused/scrolled into view at approximately 100px from the viewport top. SOUL.md, AGENTS.md and references/integration-contract.md passed on both devices, with no page errors or horizontal overflow. No intercepted success responses or hand-written UI.

After — desktop SOUL.md

After — mobile AGENTS.md

Before — expected visibility failure

Production 4c99bb83212b798bc5b7cc66beeeacccb40da178, same route/data/viewports. Handlers fetch/render the selected file, but the preview is below the complete list, outside the visible area, and does not receive focus. The screenshots show the selected filename but not its result.

Before — desktop preview outside viewport

Before — mobile preview outside viewport

Audit truthfulness

The real release has a clean ClawScan report, so its real-browser label remains Clean. The loader now actually reads that pinned report; absent/mismatched/pending/failed evidence is covered by route/component regressions and shows Unavailable with level-0 neutral bars. These missing-report states are not fabricated as this live release’s state. Package scan flags continue to gate install independently.

54 focused tests, full static gate, full app/package TypeScript checks and production build pass. Full local coverage and independent automated review remain limited as documented in the PR body; no clean-review or merge/deployment claim is made.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 9, 2026
@clawsweeper

clawsweeper Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR reads security audit results from the pinned template release and brings selected workspace file previews into view.

Example: Select AGENTS.md on /openclaw/templates/api-integration-engineer v0.1.2 on a 390×844 mobile viewport.

  • Before: The selected filename is visible, but its preview appears below the complete file list outside the viewport.
  • After: The preview appears beneath the selected filename and receives focus and scrolling.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct repair with real browser comparisons, useful regression coverage, and passing hosted gates; unavailable audit states are supported by unit evidence.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected paired screenshots exercise TemplateWorkspace through the real template route at http://127.0.0.1:3027 against the unchanged public backend, showing visible desktop SOUL.md and mobile AGENTS.md previews after the fix.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Users can see a clean audit without release evidence and select workspace files without seeing their previews.
Reason: The feature-history owner authored this narrow repair, which preserves install warnings and existing release/file contracts.

Regression provenance

Regression provenance — verified: source commit 4c99bb83212b by Patrick Erichsen; canonical PR #4482 (blame-to-merge-commit).

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR fixes two concrete template-detail problems still present on main. No blocking findings remain, and the reviewed head passes the relevant hosted CI gates.

Priority: P2
Reviewed head: fe3cbb01e98866afb755dd90d2cdfbecf5b46ec6

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Unavailable audit states have component coverage rather than a running-page capture; the author reports red-to-green regressions, which this read-only review did not rerun.
Agent review details

How this fits together

The public template route loads publisher-validated package metadata, release evidence, and manifest files, then renders audit metadata, install guidance, and on-demand workspace previews.

flowchart TD
  A[Template detail route] --> B[Public package API]
  B --> C[Pinned release and manifest]
  C --> D[Template detail page]
  D --> E[Shared audit verdict and meter]
  D --> F[Package install gate]
  D --> G[Selected workspace preview]
Loading

Technical review

Best possible solution:

Land the focused route and component repair using the existing release API, shared audit logic, and workspace preview owner.

Do we have a high-confidence way to reproduce the issue?

Main derives the audit label from package scanStatus without loading its report and renders previews after the full list; supplied baseline browser captures corroborate the visibility failure.

Is this the best way to solve the issue?

Best-fix verdict: best. Reusing the release API and shared verdict logic fixes the evidence source, while relocating the existing preview fixes visibility; changing install gates or introducing another preview loader would expand scope unnecessarily.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4c99bb83212b.

Provenance checked

  • Template audit presentation changes intended behavior with a stated reason (4c99bb8: The merged layout presented security metadata alongside the reused plugin install surface and retained package scan gates.)
  • Workspace preview placement keeps the original intent (4c99bb8: The layout added release-pinned workspace previews, including an inline implicit SOUL.md preview; this repair preserves their data and loading behavior.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Pinned change and current-main behavior: The introduced diff replaces scanStatus-derived audit presentation with release evidence and moves the existing preview inside the selected file row; main retains both original behaviors. (src/components/TemplateDetailPage.tsx:47, fe3cbb01e988)
  • Release pinning and graceful audit failure: The loader requests the package's exact latestVersion and rejects mismatched release evidence; fetchPackageVersion already returns null on API failure, preserving the rest of the page. (src/routes/$owner/templates/$slug.tsx:54, fe3cbb01e988)
  • Inspected browser proof: Directly inspected all four downloaded screenshots from fix: use release audit evidence and reveal template files #4487 (comment): candidate desktop SOUL.md and mobile AGENTS.md previews are visible, while the matched baseline captures show the selected filenames without visible results. (fe3cbb01e988)
  • Exact-head validation: Hosted static, unit, types-build, packages, HTTP e2e, browser smoke, and local-auth checks pass for the reviewed head; the canceled auto-response check is superseded by a successful run, and live mergeable_state is clean. (fe3cbb01e988)
  • Feature history and original intent: History across the Claw and Template route names identifies the canonical route, rename, and layout work by Patrick Erichsen; feat: match template detail layout to Paper design #4482 explains the layout and preserved install gates. Older commit metadata hit a missing-object/lazy-fetch limit, without obscuring the responsible main source or its PR. (src/components/TemplateDetailPage.tsx:42, 4c99bb83212b)

Likely related people:

  • Patrick Erichsen: Raw commit 4c99bb8 adds src/components/TemplateDetailPage.tsx:38 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4c99bb83212b; files: src/components/TemplateDetailPage.tsx)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production and regression-test scope Production +88/-42; tests +75/-7 across four files The growth covers release evidence loading, accessible inline previews, and distinct audit/preview regressions without adding a parallel subsystem.

Labels

Label changes:

  • add P2: Incorrect audit presentation and hard-to-find workspace previews affect a bounded public detail surface.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Incorrect audit presentation and hard-to-find workspace previews affect a bounded public detail surface.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 9, 2026, 12:55 AM ET / 05:55 UTC.

@Patrick-Erichsen
Patrick-Erichsen merged commit 6fe2dc0 into main Nov 9, 2026
99 of 103 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the fix-template-audit-file-preview branch November 9, 2026 05:58
@Patrick-Erichsen

Copy link
Copy Markdown
Collaborator Author

Production verification

The audit/file-preview repair is merged and the frontend is serving commit 6fe2dc0.

  • Exact-commit Test deployment passed. Its resolved DEPLOY_SHA matches the merge commit; candidate/stable HTTP checks and candidate UI smoke passed.
  • Frontend-only production workflow passed, including production tagging, at the same commit. Four HTTP and 15 UI checks passed; six authenticated UI cases skipped because the optional storage-state credential was not configured. No production backend/index mutation, CLI package release or personal Gateway change.
  • Live deployment metadata returned that exact git_commit_sha. The served runtime asset /assets/runtimeEnv-C_80xpvk.js hashes to 642196dae4650ddc014ea4e54c2ff486c3ab03a40507ddd219e20437af04b2f3, matching the build metadata.
  • Real signed-out Chromium, unchanged public backend: desktop 1440×1068 and mobile 390×844 both open SOUL.md, AGENTS.md and references/integration-contract.md directly beneath the selected filename, focused and visible at ~100px from the viewport top. All six interactions passed; no uncaught page errors or horizontal overflow. Production desktop/mobile screenshots were inspected.
  • The actual API integration engineer v0.1.2 release has a clean audit, and the live sidebar shows its report summary. Missing/mismatched/pending/failed audit evidence is supported by the earlier route/component regressions; it is not misrepresented as this real release's state. Install scan gates remain independent.

Comparable before/after screenshots and regression evidence.

This branch was successfully deployed

1 active deployment
Preview – clawhub — fe3cbb01 Deployed Nov 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant