Skip to content

fix(ui): load remote images in compact activity previews - #152045

Merged
steipete merged 4 commits into
mainfrom
codex/activity-image-previews
Sep 18, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/activity-image-previews

Conversation

@steipete

@steipete steipete commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes broken Activity previews for external HTTPS images and the oversized two-row gallery that wastes vertical space.

User Impact

Activity shows up to four compact 128×80 previews in one horizontal row, with sideways scrolling on narrow screens and full-size image expansion. HTTPS screenshots and SVG badges load correctly. The same policy also allows automatic remote-image loading in plugin READMEs and agent-file previews; Markdown attachments and Skill Workshop previews remain click-to-open. The browser contacts remote image hosts directly; thumbnails, the viewer, and neighboring-image preloads send no page referrer.

Why This Change Was Made

Activity already discovers remote transcript images, but the shared image policy rejected their hosts. The repair aligns that policy with the existing image renderer and keeps previews compact and uncropped. It preserves the new gallery navigation from #152027 and applies the same referrer policy to its preloader.

Evidence

  • 41 focused CSP, Activity media, image-viewer, and gallery-controller unit tests passed.
  • Seven desktop/mobile browser scenarios passed: HTTPS PNG/SVG loading under the production CSP, complete request headers, image expansion/navigation, refresh retention, single-row geometry, swipes, and pinch zoom. The original CSP and layout regressions failed before repair. Linux CI also exposed the gallery preloader's missing referrer policy, now set before its source URL.
  • During CI recovery, removed three duplicate declarations in SQLite test fixtures introduced by overlapping upstream changes. All three suites failed during collection before repair; all 81 tests passed afterward. These repairs were already on main by merge time, so they are absent from the final nine-file merged diff.
  • Final exact-head CI, the required openclaw/ci-gate, native prepare/merge gates, changed-code checks, and independent review passed. Inspected synthetic before/after screenshots render in both the originating task and this PR. No live Gateway deployment was performed.
CI recovery context

The first CI run exposed a stale quota-status expectation already repaired in #152010. A rebase incorporated that fix. The next run exposed server-schema imports in seven browser test suites; the independently verified import repair is now on main via #152099 and was dropped from this PR as already applied.

After integrating #152027, Linux CI caught a referrer sent by the new gallery preloader. The fix and stronger navigation/header proof are included. A later CI run encountered duplicate promisify declarations introduced by #152064 and #151366; this PR removes only the duplicate declaration in each of the three affected test fixtures.

Before

Activity previews before: a two-column gallery

After

Activity previews after: compact thumbnails in one horizontal row

@clawsweeper

clawsweeper Bot commented Sep 18, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime size: S maintainer Maintainer-authored PR labels Sep 18, 2026
@steipete
steipete marked this pull request as ready for review September 18, 2026 18:25
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Sep 18, 2026
@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 18, 2026, 4:48 PM ET / 20:48 UTC (Revision 6).

ClawSweeper review

What this changes

The PR enables HTTPS image previews, suppresses gallery referrers, displays Activity thumbnails in a compact scrolling row, updates documentation and browser coverage, and removes duplicate declarations from three test fixtures.

Merge readiness

✅ Ready for maintainer review

The prior documentation finding is resolved. The PR remains useful because current main still blocks arbitrary HTTPS images and uses the two-column Activity layout; no blocking introduced defect was found.

Priority: P2
Reviewed head: f7956559e62876a7cf0c6777e1fd2de1e4282226

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with useful visual evidence and browser coverage; the previous documentation blocker is fixed.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Inspected before/after screenshots demonstrate the Activity layout; reported browser coverage exercises production CSP and gallery requests with mocked responses, without claiming a live Gateway deployment or screenshot-based network proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Inspected before/after screenshots demonstrate the Activity layout; reported browser coverage exercises production CSP and gallery requests with mocked responses, without claiming a live Gateway deployment or screenshot-based network proof.
Evidence reviewed 8 items Previous finding resolved: The GitHub comparison against the previous reviewed head contains only the documentation correction. Line 24 now distinguishes click-to-open attachments and Skill Workshop previews from automatically loading plugin README and agent-file previews, addressing the retained finding and rank-up move.
Documentation matches renderer defaults: Document mode defaults remoteImages to true. Plugin README and agent-file callers use that default; Chat text attachments and Skill Workshop explicitly disable remote images. The current wording accurately discloses automatic browser requests.
Current main still needs the image-policy repair: At the fetched main revision, img-src permits only local sources and the fixed Gravatar and GitHub avatar hosts. Separately inspected main Activity CSS still uses a two-column grid.
Findings None None.
Security None None.

How this fits together

The Control UI receives transcript image metadata from the Gateway and renders previews through shared Chat image components. The Gateway’s browser security policy determines which image hosts those previews and document views can contact.

flowchart TD
  A[Transcript image metadata] --> B[Shared image renderer]
  C[Document previews] --> D[Browser image policy]
  B --> D
  D --> E[Local or HTTPS image source]
  E --> F[Compact Activity previews]
  F --> G[Expanded image gallery]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +7, Tests +72, Docs +2. Total +81 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 5 19 12 +7
Tests 5 87 15 +72
Docs 2 5 3 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 111 30 +81

Review metrics

None.

Technical review

Best possible solution:

Keep image loading in the existing shared renderer and CSP owner, with compact Activity presentation and accurate disclosure of automatic remote-host contact.

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

Yes, source establishes the failure path: Activity passes remote transcript images to the shared renderer while current main’s CSP rejects their HTTPS hosts. No runtime reproduction was executed during this review.

Is this the best way to solve the issue?

Yes. The patch updates the existing policy and rendering owners, preserves gallery navigation, and now accurately documents the broader document-preview behavior.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Inspected before/after screenshots demonstrate the Activity layout; reported browser coverage exercises production CSP and gallery requests with mocked responses, without claiming a live Gateway deployment or screenshot-based network proof.

Label justifications:

  • P2: Repairs broken HTTPS image previews and improves Activity layout with a bounded user-facing scope.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Inspected before/after screenshots demonstrate the Activity layout; reported browser coverage exercises production CSP and gallery requests with mocked responses, without claiming a live Gateway deployment or screenshot-based network proof.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The maintainer-authored PR is exempt from the external-contributor proof gate. Inspected before/after screenshots demonstrate the Activity layout; reported browser coverage exercises production CSP and gallery requests with mocked responses, without claiming a live Gateway deployment or screenshot-based network proof.

Evidence

What I checked:

  • Previous finding resolved: The GitHub comparison against the previous reviewed head contains only the documentation correction. Line 24 now distinguishes click-to-open attachments and Skill Workshop previews from automatically loading plugin README and agent-file previews, addressing the retained finding and rank-up move. Public docs: docs/web/control-ui/security-model.md. (docs/web/control-ui/security-model.md:24, f7956559e628)
  • Documentation matches renderer defaults: Document mode defaults remoteImages to true. Plugin README and agent-file callers use that default; Chat text attachments and Skill Workshop explicitly disable remote images. The current wording accurately discloses automatic browser requests. (ui/src/components/markdown-render-options.ts:45, f7956559e628)
  • Current main still needs the image-policy repair: At the fetched main revision, img-src permits only local sources and the fixed Gravatar and GitHub avatar hosts. Separately inspected main Activity CSS still uses a two-column grid. (src/gateway/control-ui-csp.ts:93, d2a5196a2f95)
  • Latest release retains the restrictive policy: The v2026.9.4 source also limits remote images to the fixed avatar hosts; the central HTTPS image-policy repair is not present in that release. (src/gateway/control-ui-csp.ts:93, 3a9d69db306c)
  • Browser regression coverage: The inspected test installs the production CSP, intercepts HTTPS PNG/SVG requests, checks decoded image dimensions and complete request headers, exercises gallery navigation and refresh retention, and checks compact geometry at desktop/mobile widths. These are mocked-Gateway browser tests, not live deployment evidence; this review did not execute them. (ui/src/e2e/activity-polish.e2e.test.ts:20, f7956559e628)
  • Inspected visual evidence: Both downloaded PR screenshots were inspected. They show the same synthetic Activity content changing from two rows to four compact thumbnails in one row. They establish the visible layout change, not CSP enforcement or request-header behavior. The captured PR body reports attachment in both the originating task and PR.

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 1def359 adds ui/src/components/image-lightbox-gallery.ts:86 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1def359971d0; files: ui/src/components/image-lightbox-gallery.ts)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (5 earlier review cycles)
  • reviewed 2026-09-18T18:32:36.546Z sha 53fb762fd4fbb9e55819cce7b6959815cd69139d :: needs maintainer review before merge. :: none
  • reviewed 2026-09-18T18:59:33.883Z sha 8bbbf8b6defbc81c548acfd0404cfa65f565eb03 :: blocked before merge. :: [P2] Narrow the Markdown preview no-fetch claim
  • reviewed 2026-09-18T19:36:30.344Z sha 74404d3 :: blocked before merge. :: [P2] Narrow the Markdown preview no-fetch claim
  • reviewed 2026-09-18T20:05:45.083Z sha 369e9ee :: blocked before merge. :: [P2] Narrow the Markdown preview no-fetch claim
  • reviewed 2026-09-18T20:22:46.980Z sha 6907d32 :: blocked before merge. :: [P2] Narrow the Markdown preview no-fetch claim

@steipete
steipete force-pushed the codex/activity-image-previews branch from 53fb762 to 8bbbf8b Compare September 18, 2026 18:52
@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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. labels Sep 18, 2026
@steipete
steipete force-pushed the codex/activity-image-previews branch 2 times, most recently from d6333e3 to 74404d3 Compare September 18, 2026 19:30
Allow HTTPS image previews without sending page referrers, and display Activity thumbnails in one compact horizontal row with mobile scrolling. Preserve image expansion and previews during refresh.
Apply the image referrer policy before the gallery decoder assigns its source. Exercise neighboring-image navigation and inspect complete request headers in the Activity regression.
Keep the first node:util import in each mock factory and remove the duplicate declaration introduced by overlapping upstream changes. Preserve the custom promisify descriptor and all assertions.
@steipete
steipete force-pushed the codex/activity-image-previews branch from 369e9ee to 6907d32 Compare September 18, 2026 20:15
Distinguish click-to-open attachments and Skill Workshop previews from plugin README and agent-file previews that load remote images automatically. Document the gallery preloader's referrer policy.
@steipete

Copy link
Copy Markdown
Contributor Author

Corrected the Markdown image-loading documentation in f795655. Attachments and Skill Workshop previews keep click-to-open links; plugin README and agent-file previews automatically load HTTPS images. The shared image policy now documents that broader behavior explicitly. The gallery preloader policy is also documented. Docs link audit: 13,891 links checked, zero broken; independent review and diff checks passed.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 18, 2026
@clawsweeper clawsweeper Bot added 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. labels Sep 18, 2026
@steipete
steipete merged commit 75b167b into main Sep 18, 2026
238 checks passed
@steipete
steipete deleted the codex/activity-image-previews branch September 18, 2026 20:53
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 18, 2026
…49075-c1-control-repair

* commit 'dc5b321b5f89f9cf0e704ee202ea3059fb1ce63d': (79 commits)
  fix: start background context maintenance after durable turns (#151936)
  fix(models): avoid ambient state reads during prepared selection (#152119)
  feat: recover abandoned Crabbox source staging (#152006)
  chore(ui): refresh control ui locales (#152098)
  fix(ui): keep cloud startup prompts and progress in chat (#152024)
  fix: report completed subprocess cleanup after cancellation (#152107)
  perf(reply): reuse normalized inbound text (#152110)
  fix(cron): paused future one-shots disappear after Run now (#152126)
  perf(sessions): reuse rows and skip discarded terminal labels (#152109)
  fix(ui): keep keyboard-focused automation controls clear of sticky actions (#152135)
  fix(ui): load remote images in compact activity previews (#152045)
  refactor(health): skip unused verbose account projection (#152108)
  fix: restore dashboard test limits and SQLite test compilation (#152089)
  test(qa-lab): stabilize timeout recovery delivery proof (#152100)
  fix: probe SQLite when Node denies worker threads (#152075)
  perf(gateway): keep GitHub co-author trailer scans linear (#152115)
  fix(media): report CLI models with missing command or args (#151969)
  refactor: remove retired runtime code and duplicate helpers (#151973)
  perf(plugins): combine runtime and tool call scopes (#152101)
  test(memory): seed restart fixtures with the Gateway stopped (#152038)
  ...
vincentkoc added a commit that referenced this pull request Sep 18, 2026
…of-20260918

* origin/main:
  fix(ui): load remote images in compact activity previews (#152045)
  refactor(health): skip unused verbose account projection (#152108)
  fix: restore dashboard test limits and SQLite test compilation (#152089)
vincentkoc added a commit that referenced this pull request Sep 18, 2026
…n-20260918-v4

* origin/main: (81 commits)
  fix: retire failed setup plugins without replaying facade initialization (#152026)
  fix(test): select Node for built runtime recovery fixtures (#152162)
  refactor(auth): reuse privately assembled choice groups (#152166)
  fix: preserve chat media delivery and session boundaries (#152079)
  fix: keep stale Stop messages from canceling replacement sessions (#152116)
  improve(plugins): reduce mutable argument handling overhead (#152154)
  fix(scripts): prevent host tooling drift from blocking PR workflows (#152078)
  improve: reduce model capability preparation work (#152128)
  fix: stop marking delivered scheduled reports as failed (#152165)
  fix: start background context maintenance after durable turns (#151936)
  fix(models): avoid ambient state reads during prepared selection (#152119)
  feat: recover abandoned Crabbox source staging (#152006)
  chore(ui): refresh control ui locales (#152098)
  fix(ui): keep cloud startup prompts and progress in chat (#152024)
  fix: report completed subprocess cleanup after cancellation (#152107)
  perf(reply): reuse normalized inbound text (#152110)
  fix(cron): paused future one-shots disappear after Run now (#152126)
  perf(sessions): reuse rows and skip discarded terminal labels (#152109)
  fix(ui): keep keyboard-focused automation controls clear of sticky actions (#152135)
  fix(ui): load remote images in compact activity previews (#152045)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 19, 2026
…2045)

* fix(ui): load remote images in compact activity previews

Allow HTTPS image previews without sending page referrers, and display Activity thumbnails in one compact horizontal row with mobile scrolling. Preserve image expansion and previews during refresh.

* fix(ui): suppress referrers when preloading gallery images

Apply the image referrer policy before the gallery decoder assigns its source. Exercise neighboring-image navigation and inspect complete request headers in the Activity regression.

* test: remove duplicate promisify declarations from SQLite mocks

Keep the first node:util import in each mock factory and remove the duplicate declaration introduced by overlapping upstream changes. Preserve the custom promisify descriptor and all assertions.

* docs: clarify automatic HTTPS image loading in document previews

Distinguish click-to-open attachments and Skill Workshop previews from plugin README and agent-file previews that load remote images automatically. Document the gallery preloader's referrer policy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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