Repository navigation
fix(clickclack): preserve MIME extension for unnamed uploads - #119646
Patrick-Erichsen merged 1 commit into
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 11:15 AM ET / 15:15 UTC. ClawSweeper reviewWhat this changesThe PR derives a MIME-based extension for unnamed ClickClack uploads while preserving supplied filenames and generic fallbacks for unknown MIME types. Merge readinessThis PR is still necessary: current main sends unnamed ClickClack uploads as Priority: P2 Review scores
Verification
How this fits togetherThe ClickClack channel plugin loads outbound media, uploads it through the ClickClack API, then creates a channel message and attachment association. The selected upload filename is also used for media-only message text. flowchart LR
A[Outbound media request] --> B[Media loader]
B --> C[ClickClack filename fallback]
C --> D[ClickClack upload API]
D --> E[Channel message]
E --> F[Attachment association]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +1, Tests +82. Total +83 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Land the plugin-owned fallback after the normal exact-head merge gate; keep filename policy local to ClickClack and reuse the public MIME mapping. Do we have a high-confidence way to reproduce the issue? Yes: current main has a reachable extensionless fallback when loader metadata lacks a filename, while the source loader permits that state with a MIME type. Is this the best way to solve the issue? Yes: placing the fallback in ClickClack’s upload owner preserves the shared loader’s channel-neutral role and matches merged Slack and Mattermost patterns. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ce06e7924e88. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
…cope * origin/main: (70 commits) fix(clickclack): preserve MIME extension for unnamed uploads (openclaw#119646) fix(memory): keep post-ready RPCs responsive (openclaw#119710) fix(browser): preserve locale, timezone, and device overrides (openclaw#119695) fix(agents): stop messaging dedupe from dropping final replies that quote a short tool send (openclaw#118178) test(agents): batch code mode budget proof (openclaw#119699) fix(memory): keep gateway RPCs responsive during startup (openclaw#119676) improve(ui): trail transient session status beside row actions (openclaw#119560) refactor(msteams): consolidate channel action target resolution (openclaw#119632) fix: tail context answers the current user message (openclaw#117364) fix(whatsapp): exercise descriptor-safe credential persistence (openclaw#119621) fix(diagnostics-otel): route OTLP endpoints by signal (openclaw#101655) refactor(skills): consolidate workshop transcript and record normalization (openclaw#119643) fix(video): harden DashScope task and media lifecycle (openclaw#117303) refactor(transcripts): consolidate persistence and export ownership (openclaw#119634) fix: preserve ClickClack discussion state contracts (openclaw#118851) fix(matrix): retire shared E2EE clients safely (openclaw#119570) refactor(cron): unify catch-up persistence and payload encoding (openclaw#119636) refactor(ui): centralize composer attachment and capability controls (openclaw#119650) refactor(daemon): consolidate managed service lifecycle ownership (openclaw#119647) fix(browser): honor explicit navigation timeouts across browser drivers (openclaw#119654) ...
What Problem This Solves
Unnamed ClickClack media uploads currently use the generic filename
attachmenteven when the media loader provides a useful MIME type such asimage/png. That loses the file extension in the upload and in the media-only message body, making downloaded attachments and previews less consistent.Why This Change Was Made
When no explicit or loader-provided filename exists, derive the filename as
attachment${extensionForMime(contentType) ?? ""}through the publicopenclaw/plugin-sdk/media-mimehelper. Existing filenames still win, known MIME types gain their extension, unknown MIME types stay on the genericattachmentfallback, and missing MIME metadata still defaults toapplication/octet-stream.This follows the recent MIME-derived filename precedent in Alix-007's merged Slack upload change and Mattermost upload change, adapted to ClickClack's upload-first delivery path.
User Impact
ClickClack users receive unnamed image uploads as
attachment.pnginstead ofattachment, while named files, unknown MIME types, durable retries, upload ordering, and attachment association remain unchanged.Evidence
node scripts/run-vitest.mjs extensions/clickclack/src/outbound.test.ts --reporter=verbose— 28 tests passed.node scripts/run-oxlint.mjs extensions/clickclack/src/outbound.ts extensions/clickclack/src/outbound.test.tsandgit diff --checkpassed.sendClickClackMedia, real loopback ClickClack HTTP API, synthetic image bytes with no filename, empty media text, and upload/message/attachment requests:36ee98d815dbffdb233205278e91e2db86cebb88: upload filename remained generic and media-only body was notattachment.png.981da82a77708e877364592a89ed7ed842387cf9: multipart filename wasattachment.pngand media-only body wasattachment.png.viewer-proof.tsremains unchanged; unknown and missing MIME types retainattachment; durable upload/message retry cases pass.proof-live.ts
Tested head SHA: 981da82.
Canonical precedent: recent Alix-007 MIME-derived upload filename PRs #119399 and #119535 use the same narrow filename-fallback treatment; this candidate applies it to ClickClack's upload and media-only message path.
AI-assisted: built with Codex