Skip to content

Preview session workspace images and unsupported files - #95956

Merged
steipete merged 1 commit into
openclaw:mainfrom
Solvely-Colin:codex/session-workspace-file-edit
Jul 29, 2026
Merged

steipete merged 1 commit into
openclaw:mainfrom
Solvely-Colin:codex/session-workspace-file-edit

Conversation

@Solvely-Colin

@Solvely-Colin Solvely-Colin commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Session workspace files already support bounded viewing and hash-CAS text editing. Binary files were the remaining gap: current main converts non-UTF-8 bytes to replacement-character text, while users need real previews for browser-safe images and a truthful metadata-only state for everything else.

Why This Change Was Made

This is a full current-main rewrite of the original contribution. It keeps the established sessions.files.* owner boundary, fs-safe path controls, and 256 KiB content cap while adapting the protocol, generated Swift client, Control UI, tests, and docs to the current architecture.

User Impact

  • AVIF, GIF, JPEG, PNG, and WebP session workspace files render in the existing image detail panel.
  • Other binary files show path, detected MIME type, size, and update time without lossy decoding or an edit hash.
  • Oversized binaries remain content-free but now receive the same metadata fallback through a bounded 4,100-byte fs-safe prefix read.
  • UTF-8 text, including dependency-detected RTF, XML, WebVTT, vCard, iCalendar, registry text, and ASCII STL, retains the existing editor and CAS-save behavior.

Implementation

  • Add optional mimeType, contentEncoding, and previewKind fields to SessionFileEntry.
  • Keep the protocol change additive; no version bump or existing field behavior changes.
  • Preserve the existing Swift AgentsWorkspaceFile.encoding: AnyCodable API with a compile-time compatibility test.
  • Detect binary signatures from bytes only, never filename extensions.
  • Base64-encode only the explicit five-format browser allowlist.
  • Read only a bounded prefix for oversized-file classification after fs-safe verifies containment, file identity, symlink policy, and hardlink policy.
  • Independently enforce the same MIME/encoding allowlist in the Control UI before constructing a data URL.
  • Keep missing previewKind compatible with pre-feature Gateways, which continue to display their string content as text.

Dependency Contract

The implementation was verified directly against the pinned file-type 22.0.1 package source, types, and README. fileTypeFromBuffer is magic-byte based and returns undefined when unmatched. Its source recognizes all five allowed image MIME types and also recognizes several strict-text formats; the Gateway explicitly preserves those text formats instead of treating every detected non-image MIME as binary.

Maintainer Decision

Feature-owner approval is explicit: @steipete approved landing the bounded five-format image preview with metadata-only fallback. The branch was rebuilt from current main at e92da4c8ba9a2f890a10fa4660df1acb439635b0; subsequent default-branch movement is not being chased with another proof-invalidating rebase because exact-head CI run 30448239999 validated the synthetic merge against the then-current integration tree, and the latest ClawSweeper review found the touched-file merge clean with no code finding.

Evidence

Exact maintained head: 1d9a1b8595218287f8f4a4b618a6e12a1147c085

  • 48/48 focused Gateway session-file tests passed, covering all five image formats, unsupported BMP/HEIC/SQLite, disguised extensions, oversized binary metadata, detected text formats, edit hashes, and fs-safe boundaries.
  • 24/24 focused Control UI tests passed, including hostile metadata, invalid date handling, MIME allowlisting, encoding mismatches, old-Gateway compatibility, and the existing edit path.
  • Blacksmith Testbox tbx_01kyps07zg97k2kwfhz79kh4yv passed the exact real-browser flow: text preview, decoded PNG (naturalWidth and naturalHeight both nonzero), and metadata-only BMP fallback.
  • The same exact-head flow passed locally with system Chrome and produced screenshots plus WebM under .artifacts/control-ui-e2e/chat-file-links/.
  • pnpm protocol:check passed after the clean commit, including registry, Swift, Kotlin, protocol-since, and generated-drift gates.
  • Remote pnpm check:changed and pnpm build passed on the kept Testbox. The changed gate covered core/UI/app typechecks, full relevant lint/guards, Control UI i18n, protocol boundaries, and native-related tests; the production build passed its package, Plugin SDK, Control UI, and performance gates.
  • Exact-head CI run 30448239999 passed every selected lane and openclaw/ci-gate; macOS Swift passed on its cached attempt-two rerun, and iOS build plus release screenshots passed.
  • Final Codex autoreview returned no accepted/actionable findings at 0.91 confidence after repairing its two findings (detected text preservation and oversized binary metadata).

Visual Reference

The screenshots below show the same supported-image and unsupported-binary states as the exact current-head capture; they are retained from the earlier behavior-equivalent implementation because GitHub already hosts them on the PR proof repository.

Supported PNG preview

Unsupported BMP metadata fallback

Docs / Release Note

The Control UI documentation now names the supported formats, the 256 KiB inline limit, and metadata-only binary fallback.

Release-note context: session workspace files can now preview browser-safe images and show honest metadata for unsupported binaries without changing text editing.

Copilot AI review requested due to automatic review settings June 23, 2026 03:58
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts size: XL labels Jun 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds end-to-end session workspace file preview + lightweight editing: the gateway can now return richer file metadata (preview kind, encoding, mime type) and accept text-file writes; the web UI can open workspace files as either an inline image preview, a metadata-only view, or an editable text area, and save changes back through the gateway.

Changes:

  • Extend gateway protocol SessionFileEntry with preview metadata, and add sessions.files.set params/result schemas + validators.
  • Implement sessions.files.set handler with optimistic conflict detection (baseUpdatedAtMs) and safe workspace writes; return image previews as base64.
  • Add UI sidebar support for editable workspace text files (reset/save, dirty state) and unsupported-file metadata rendering, plus tests.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
ui/src/ui/views/markdown-sidebar.ts Adds an editable text-file sidebar rendering branch (textarea + save/reset UI).
ui/src/ui/types.ts Extends SessionWorkspaceFileEntry with preview metadata; adds SessionWorkspaceSetResult.
ui/src/ui/sidebar-content.ts Extends markdown sidebar content model to optionally include editableTextFile editor state/actions.
ui/src/ui/markdown.test.ts Adds unit test coverage for the editable text-file sidebar rendering and interactions.
ui/src/ui/app-render.ts Adds workspace file open/save flows, editor state caching, unsupported metadata view, and image data-URL rendering.
src/gateway/server-methods/sessions-files.ts Adds preview kind + encoding detection, image/base64 previews, and implements sessions.files.set with conflict checks and safe writes.
src/gateway/server-methods/sessions-files.test.ts Expands handler tests to cover text edits, conflict detection, image previews, unsupported metadata, and path safety.
src/gateway/server-methods.ts Registers sessions.files.set as a lazily loaded core handler.
src/gateway/methods/core-descriptors.ts Assigns sessions.files.set an operator.admin scope.
src/gateway/method-scopes.test.ts Verifies sessions.files.set remains admin-gated.
scripts/protocol-gen-swift.ts Updates Swift generator defaults for new optional SessionFileEntry fields.
packages/gateway-protocol/src/schema/types.ts Exposes SessionsFilesSetParams / SessionsFilesSetResult schema-backed TS types.
packages/gateway-protocol/src/schema/sessions.ts Adds preview metadata schemas + sessions.files.set params/result schemas.
packages/gateway-protocol/src/schema/protocol-schemas.ts Registers the new set params/result schemas in the protocol schema registry.
packages/gateway-protocol/src/index.ts Exports the new set schemas/types and validator (validateSessionsFilesSetParams).
apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift Regenerates Swift models for the new file entry fields and sessions.files.set types.

Comment thread ui/src/ui/views/markdown-sidebar.ts Resolved
Comment thread scripts/protocol-gen-swift.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 62f0487343

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ui/src/ui/views/markdown-sidebar.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 62f0487343

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ui/src/ui/views/markdown-sidebar.ts Resolved
@Solvely-Colin

Solvely-Colin commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 23, 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 repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@openclaw-barnacle openclaw-barnacle Bot added the agents Agent runtime and tooling label Jun 23, 2026
@Solvely-Colin
Solvely-Colin force-pushed the codex/session-workspace-file-edit branch from 5a0c46c to 368744a Compare June 23, 2026 08:00
@Solvely-Colin

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 23, 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 repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper

clawsweeper Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 29, 2026, 9:07 AM ET / 13:07 UTC.

ClawSweeper review

What this changes

The PR classifies session workspace files as text, allowlisted images, or unsupported binaries, sends safe preview metadata through the Gateway protocol, and renders images or metadata fallback in the Control UI.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

This is a focused, well-proven continuation of the session workspace file work: the previously merged editor PRs cover text viewing and CAS editing, while this PR supplies the remaining image and unsupported-binary preview path. The current branch is cleanly mergeable but behind current main, and its protected maintainer label plus additive protocol surface require explicit feature-owner approval and a current-main refresh rather than automated cleanup.

Priority: P2
Reviewed head: 1d9a1b8595218287f8f4a4b618a6e12a1147c085
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Strong real-browser proof, focused tests, and defensive Gateway/UI validation support the feature; the remaining gate is owner approval and a normal current-main refresh.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (recording): The PR supplies exact-head browser-run evidence for text, decoded PNG, and metadata-only BMP behavior, with recording/screenshot artifacts and a successful real-behavior-proof check; private data should remain redacted in any refreshed evidence.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (recording): The PR supplies exact-head browser-run evidence for text, decoded PNG, and metadata-only BMP behavior, with recording/screenshot artifacts and a successful real-behavior-proof check; private data should remain redacted in any refreshed evidence.
Evidence reviewed 7 items Gateway classification boundary: The proposed Gateway implementation classifies strict text, five browser-safe image MIME types, and unsupported binaries; oversized files use a bounded prefix read instead of returning content.
Filesystem-safe prefix read: The proposed prefix reader retains the existing fs-safe open policy, including symlink and hardlink rejection, before reading only the requested bounded prefix.
Protocol remains additive: The branch adds three optional session-file fields—MIME type, content encoding, and preview kind—without changing existing required fields; the generated Swift model keeps the encoding field compatible.
Findings None None.
Security None None.

How this fits together

Session workspace file reads are opened through filesystem-safe Gateway helpers, classified by the Gateway, and returned over the Gateway protocol to the Control UI file detail panel. The panel preserves the existing text editor, renders only allowlisted base64 images, and presents metadata when a binary is not safe for inline preview.

flowchart LR
  A[Workspace file] --> B[Filesystem-safe file reader]
  B --> C[Gateway preview classifier]
  C --> D[Session file protocol response]
  D --> E[Control UI file panel]
  E --> F[Text editor]
  E --> G[Allowlisted image preview]
  E --> H[Unsupported binary metadata]
Loading

Decision needed

Question Recommendation
Should the feature owner approve this additive session-file preview protocol and land the refreshed branch after it is rebased onto current main? Refresh and approve the feature: Rebase onto current main, verify the clean merge result, and merge the narrow image/unsupported-binary preview capability.

Why: The implementation is a new cross-client Gateway protocol and Control UI capability, and the protected maintainer label requires explicit human ownership despite strong proof and no identified patch defect.

Before merge

  • Resolve merge risk (P1) - The branch is behind current main; before landing, maintainers should refresh the actual three-way merge and re-confirm the additive protocol/UI behavior against the current workspace-panel interfaces.
  • Resolve merge risk (P1) - The new optional protocol fields cross Gateway, Control UI, and generated native clients, so their additive compatibility contract should receive feature-owner approval before merge.
  • Complete next step (P2) - No concrete repair defect remains; the next action is feature-owner approval and a current-main refresh for this protected, additive protocol/UI feature.
Agent review details

Security

None.

PR surface

Source +231, Tests +517, Docs 0, Other +32. Total +780 across 13 files.

View PR surface stats
Area Files Added Removed Net
Source 7 251 20 +231
Tests 3 522 5 +517
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 33 1 +32
Total 13 807 27 +780

Review metrics

Metric Value Why it matters
Session-file protocol surface 3 optional fields added The MIME type, content encoding, and preview kind fields cross Gateway, web, and generated native clients, so additive compatibility deserves owner confirmation.

Stored data model

Persistent data-model change detected: serialized state: packages/gateway-protocol/src/schema/sessions.ts, serialized state: src/gateway/server-methods/sessions-files.test.ts, serialized state: src/gateway/server-methods/sessions-files.ts, unknown-data-model-change: src/gateway/server-methods/sessions-files.test.ts, unknown-data-model-change: src/gateway/server-methods/sessions-files.ts, vector/embedding metadata: src/gateway/server-methods/sessions-files.test.ts, and 1 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Refresh the additive contract before merge (recommended)
    Rebase this branch on current main and confirm existing Gateway, web, and generated native clients retain their old behavior when the new optional fields are absent.
  2. Accept the cross-client contract now
    A feature owner may accept the additive protocol surface as-is if the current clean merge result and compatibility guarantees are confirmed.
  3. Pause the capability expansion
    Defer image and unsupported-binary previews if maintainers do not want to extend the session-file protocol in this release window.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Rebase onto current main, verify old-Gateway fallback and generated client compatibility for absent preview fields, then run the required merge checks on the refreshed head.

Technical review

Best possible solution:

Rebase the narrowed image/binary preview implementation onto current main, retain the existing session-file and filesystem-safe ownership boundaries, and merge only after the feature owner confirms the additive protocol contract and refreshed checks.

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

Not applicable: this PR adds a new session-file preview capability rather than repairing a reported current-main failure. The supplied real-browser evidence covers the intended text, PNG, and unsupported-BMP outcomes on the PR head.

Is this the best way to solve the issue?

Yes, conditionally: extending the existing sessions.files.get owner boundary with optional metadata and independently allowlisting image data URLs is narrower than creating a parallel file-preview API. A current-main rebase and feature-owner confirmation are still needed for the cross-client protocol contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against f65c933287eb.

Labels

Label changes:

  • add merge-risk: 🚨 compatibility: Three optional protocol fields and generated client models must remain compatible with older Gateways and clients during upgrade.

Label justifications:

  • P2: This is a bounded session-file preview improvement with useful operator impact but no demonstrated urgent regression.
  • merge-risk: 🚨 compatibility: Three optional protocol fields and generated client models must remain compatible with older Gateways and clients during upgrade.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (recording): The PR supplies exact-head browser-run evidence for text, decoded PNG, and metadata-only BMP behavior, with recording/screenshot artifacts and a successful real-behavior-proof check; private data should remain redacted in any refreshed evidence.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR supplies exact-head browser-run evidence for text, decoded PNG, and metadata-only BMP behavior, with recording/screenshot artifacts and a successful real-behavior-proof check; private data should remain redacted in any refreshed evidence.
  • proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. The PR supplies exact-head browser-run evidence for text, decoded PNG, and metadata-only BMP behavior, with recording/screenshot artifacts and a successful real-behavior-proof check; private data should remain redacted in any refreshed evidence.

Evidence

What I checked:

  • Gateway classification boundary: The proposed Gateway implementation classifies strict text, five browser-safe image MIME types, and unsupported binaries; oversized files use a bounded prefix read instead of returning content. (src/gateway/server-methods/sessions-files.ts:425, 1d9a1b859521)
  • Filesystem-safe prefix read: The proposed prefix reader retains the existing fs-safe open policy, including symlink and hardlink rejection, before reading only the requested bounded prefix. (src/gateway/server-methods/workspace-fs.ts:87, 1d9a1b859521)
  • Protocol remains additive: The branch adds three optional session-file fields—MIME type, content encoding, and preview kind—without changing existing required fields; the generated Swift model keeps the encoding field compatible. (packages/gateway-protocol/src/schema/sessions.ts:169, 1d9a1b859521)
  • UI independently constrains data URLs: The Control UI accepts image preview data only for its explicit browser-safe MIME allowlist and base64 encoding, rather than trusting arbitrary Gateway metadata. (ui/src/pages/chat/components/chat-session-workspace.ts:196, 1d9a1b859521)
  • Merged editor work is adjacent, not a replacement: The merged session-file editor and its hardening follow-up cover CodeMirror text previewing, hash-CAS saves, drafts, and edit authorization; the maintainer discussion explicitly identified image and unsupported-file preview as the still-useful remaining scope for this PR. (src/gateway/server-methods/sessions-files.ts:425, 82667a66e57a)
  • Maintainer scope direction: A July 12 maintainer comment asked for a narrowed rebase using the current sessions.files.get and Control UI workspace owner boundaries, and explicitly kept this PR open for that refreshed image/binary preview work. (1d9a1b859521)

Likely related people:

  • steipete: Authored the current PR head and the merged session-file editor and hardening work that owns the adjacent Gateway and Control UI file-panel boundaries. (role: feature owner and recent area contributor; confidence: high; commits: 1d9a1b859521, 82667a66e57a, 68f0eee5ae06; files: src/gateway/server-methods/sessions-files.ts, ui/src/pages/chat/components/chat-session-workspace.ts, packages/gateway-protocol/src/schema/sessions.ts)

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 (15 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-12T19:40:35.867Z sha 80bde3872cee58ffcc457e416776fa26aa633fcd :: found issues before merge. :: [P3] Document the binary preview size boundary
  • reviewed 2026-07-12T19:48:06.304Z sha 80bde3872cee58ffcc457e416776fa26aa633fcd :: found issues before merge. :: [P3] Document the binary inline-preview size limit
  • reviewed 2026-07-12T19:56:41.674Z sha b0892aa41f9c428fc5bbb3bfc43645239529539d :: found issues before merge. :: [P3] Document the binary inline-preview size limit
  • reviewed 2026-07-12T20:05:12.756Z sha b0892aa41f9c428fc5bbb3bfc43645239529539d :: found issues before merge. :: [P3] Document the binary inline-preview size limit
  • reviewed 2026-07-12T20:12:33.402Z sha b0892aa41f9c428fc5bbb3bfc43645239529539d :: found issues before merge. :: [P3] Document the binary inline-preview size limit
  • reviewed 2026-07-12T20:19:59.303Z sha b0892aa41f9c428fc5bbb3bfc43645239529539d :: found issues before merge. :: [P3] Document the binary inline-preview size limit
  • reviewed 2026-07-12T20:35:18.039Z sha 0cef7dc092e3723bb3a282535d4f36c88dc88f6b :: needs maintainer review before merge. :: none
  • reviewed 2026-07-12T20:42:47.848Z sha 0cef7dc092e3723bb3a282535d4f36c88dc88f6b :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jun 27, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jul 7, 2026
@steipete

Copy link
Copy Markdown
Contributor

Current-main scope update: #104757 (82667a66e57a5df27275ad769550257530c699cd) and #104885 (68f0eee5ae0641f91794d12e29dca81148c4f05a) now ship the text-preview/edit/save portion with CodeMirror, hash-CAS writes, conflict handling, and hardened save semantics.

The still-useful part of this PR is image/binary preview classification (mimeType, encoding/preview metadata, safe base64 image responses, and the matching image UI). The current branch also targets the retired ui/src/ui/** surface, so it is not mergeable as-is.

Please rebase on current main and narrow this to the missing image/unsupported-file preview path, reusing the current sessions.files.get and ui/src/pages/chat/components/chat-sidebar.ts owner boundaries. That would preserve the contribution instead of duplicating the now-landed editor stack. Keeping the PR open for that narrower refresh.

@Solvely-Colin Solvely-Colin self-assigned this Jul 12, 2026
@Solvely-Colin
Solvely-Colin force-pushed the codex/session-workspace-file-edit branch from 368744a to 706a2f7 Compare July 12, 2026 06:31
@Solvely-Colin
Solvely-Colin force-pushed the codex/session-workspace-file-edit branch from 86f6830 to d5c9117 Compare July 12, 2026 15:36
@Solvely-Colin Solvely-Colin changed the title Add session workspace file preview editing Preview session workspace images and unsupported files Jul 12, 2026
@Solvely-Colin

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 12, 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 repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording 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 proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 12, 2026
@Solvely-Colin
Solvely-Colin force-pushed the codex/session-workspace-file-edit branch 2 times, most recently from 315b5b8 to acf7b0f Compare July 12, 2026 18:08
@Solvely-Colin

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 12, 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 repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@Solvely-Colin
Solvely-Colin force-pushed the codex/session-workspace-file-edit branch from acf7b0f to b22197d Compare July 12, 2026 18:15
@clawsweeper clawsweeper Bot removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 12, 2026
@Solvely-Colin

Solvely-Colin commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Documentation rank-up applied on top of the reviewed code.

Exact PR head: 0cef7dc092e3723bb3a282535d4f36c88dc88f6b
Code parent: b0892aa41f9c428fc5bbb3bfc43645239529539d
Base used for the refreshed code proof: 29a7654b299f395da8716eb326d1b4d27005dc4d

docs/web/control-ui.md now states that supported images no larger than 256 KiB render inline. This distinguishes the binary image preview limit from the separate text-write cap.

The docs-only exact head also has fresh sanitized browser proof: AWS Crabbox run run_be30da9afa90 passed both Chromium click-through tests and collected the supported 5,920-byte PNG and unsupported 4,096-byte BMP fallback artifacts.

https://github.com/Solvely-Colin/pr-proof-assets/tree/main/openclaw/pr-95956/0cef7dc092

The parent code head remains fully green across architecture, native i18n, protocol regeneration, 68 gateway tests, 24 Control UI tests, UI type checks, focused E2E lint, and GitHub CI. The PR body now points to the exact docs head GIF, screenshots, WebM, and manifest.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 12, 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 repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Jul 12, 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 repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

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 merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: L 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.

3 participants