Skip to content

feat(ui): channel conversation avatars in the sidebar (Discord + Slack) - #125668

Merged
steipete merged 12 commits into
mainfrom
steipete/discord-thumbnails-c46f46
Aug 18, 2026
Merged

steipete merged 12 commits into
mainfrom
steipete/discord-thumbnails-c46f46

Conversation

@steipete

@steipete steipete commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Sessions that originate from a chat channel render with generic initials or an empty slot in the Control UI sidebar. Operators running Discord/Slack-connected agents cannot tell conversations apart at a glance, even though the channels know exactly what the conversation looks like (sender avatar, guild icon).

Why This Change Was Made

Builds one generic cross-channel seam ("session channel avatar") plus two channel producers, designed so Telegram-class channels (token-bearing, expiring file URLs) fit the same contract later:

  • Contract: the channel plugin downloads the conversation image at ingress (best-effort, never blocking the reply path) via the SDK media runtime, and passes a local media reference in a new MsgContext.ConversationAvatar field. Core persists it on entry.delivery.origin.avatar (single producer: deriveSessionOrigin; invalidated on channel switch in mergeSessionOrigin). Remote CDN URLs and local paths never reach the wire.
  • Wire: additive optional channelAvatarUrl on SessionRowSchema (a gateway route URL; Swift protocol regenerated). The row projection strips origin.avatar from the exposed origin object.
  • Serving: new authenticated route /__openclaw__/channel-avatar/<sessionKey> cloned from the workspace-icon auth model (bearer → sessions.list scope → owner gate), with the shared image policy (sniffed raster allowlist, SVG safety gate, sha256 ETag/304, CSP sandbox headers) extracted into src/gateway/http-image-response.ts and reused by the workspace-icon route (net dedup there).
  • UI: new <openclaw-channel-avatar> element (blob-loaded via AuthenticatedAvatarRouteLoader), slotted into the sidebar leading indicator between the session icon and the owner chip.
  • Discord producer: DM sender avatar + guild icon (TTL-cached via the existing entity cache), downloaded through the plugin's Discord-CDN SSRF policy (extracted to media-ssrf-policy.ts), keyed by conversation+hash so repeat messages never re-download.
  • Slack producer: DM sender avatar. users.info already returned profile.image_* and discarded it; now cached and downloaded token-free from the public *.slack-edge.com CDN. GovSlack is skipped (its API plane does not expose these hosts); detection extracted to slack-client-kind.ts.

Two latent main defects discovered en route (the chat-pane-render.ts max-lines violation and the markdown-tables.test.ts isolate:false clipboard-mock leak that failed this PR's checks-ui twice) were split out and landed separately as #125766, so this PR carries only the feature.

ClawSweeper's P2 (stable avatar route URL pinning client blob/404 caches to stale images) is addressed: the route URL carries an opaque sha256 revision of the media reference, with regression coverage for mounted-row replacement and initial-404 recovery.

Accepted tradeoff: when a session has channelAvatarUrl but the image cannot load (avatar media pruned, auth not yet ready), the leading slot shows an empty circle rather than falling back to the owner chip; the slot decision is synchronous and the miss is transient/rare.

Non-goals (named follow-ups): Telegram (getChat chat photos + TTL cache), WhatsApp (profilePictureUrl), Slack workspace icon (needs team:read manifest scope), conversations.list avatar plumb-through (closed schema), directory-entry avatars.

User Impact

Discord and Slack sessions in the Control UI sidebar show the real conversation image (round thumbnail): sender avatar for DMs, guild icon for Discord guild channels. Sessions without an image render exactly as before. No config surface; on by default; no SQLite schema changes (origin persists in existing delivery state).

Evidence

Live proof on an isolated dev gateway (OPENCLAW_STATE_DIR, port 19877): sessions seeded through the real ingress path (recordInboundSessionMeta with ConversationAvatar), avatars served by the new route and rendered in the sidebar; the "Plain session" row shows the unchanged before-rendering in the same frame:

sidebar with channel avatars

  • Focused Vitest (7 shards green): session metadata/channel-switch regression, channel-avatar HTTP route (auth failures, 404, ETag/304, content types), session row projection (asserts the media path never serializes onto the wire), protocol row round-trip, Discord producer (hash-keyed cache, non-blocking miss, DM vs guild), Slack producer (cache extension, GovSlack skip), sidebar indicator priority (icon > channel avatar > owner chip).
  • node scripts/check-changed.mjs: every format/lint/typecheck lane green; the local "macOS app CI tests" lane was killed by its timeout (SIGTERM after 31 min) — deferred to this PR's exact-head CI, which runs that lane authoritatively. pnpm build green (7m34s, no ineffective-dynamic-import), Swift protocol regen committed.
  • Production LOC +880/−233, test/generated +628/−2. The +880 includes the two new HTTP/UI modules and producers; the shared image-response extraction keeps the second image route from duplicating ~150 lines.
  • Known gap: no live Discord/Slack end-to-end (real bot message → avatar in sidebar); producers are unit-tested and the gateway/UI path is live-proven above.

@clawsweeper

clawsweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: slack Channel integration: slack app: web-ui App: web-ui gateway Gateway runtime labels Aug 18, 2026
@steipete
steipete marked this pull request as ready for review August 18, 2026 06:42
@openclaw-barnacle openclaw-barnacle Bot added size: XL maintainer Maintainer-authored PR labels Aug 18, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Aug 18, 2026
@clawsweeper

clawsweeper Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 18, 2026, 8:14 AM ET / 12:14 UTC.

ClawSweeper review

What this changes

Adds Discord and Slack conversation-avatar thumbnails to Control UI sidebar sessions through authenticated Gateway image delivery.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open: the latest head still does not persist an avatar downloaded after the first inbound message, so a one-message Discord or Slack conversation never receives the advertised sidebar thumbnail.

Priority: P2
Reviewed head: 850d76aeca230b1f0233e57a17697af2b185362a

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The feature has meaningful implementation and focused tests, but its promised initial-avatar behavior remains incomplete.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR includes claimed isolated Gateway/UI proof; the prepared media manifest contains no inspectable copy of that screenshot, while the source defect independently blocks merge.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR includes claimed isolated Gateway/UI proof; the prepared media manifest contains no inspectable copy of that screenshot, while the source defect independently blocks merge.
Evidence reviewed 7 items Current main does not already contain the feature: The current main SessionOrigin has no avatar field, and the new Gateway and Control UI avatar modules do not exist there.
Discord first-message path misses persistence: The resolver starts saving asynchronously, returns undefined, and only stores the result in its local cache after the current turn has already been constructed.
Slack has the same delayed-cache-only behavior: Slack returns undefined while its save is pending and writes the result only to avatarCache; the prepared inbound context records that undefined value.
Findings 1 actionable finding [P2] Persist the avatar after the background download
Security None None.

Live Verification

Command: pnpm openclaw gateway --help

Result: PASS (completed)

pnpm openclaw gateway --help
runner@runnervmzvulz:/tmp/clawsweeper-live-proof-125668-ArMXp1/target$ pnpm openclaw gateway --help
$ node scripts/run-node.mjs gateway --help
pnpm openclaw gateway --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 399.88 kB
[log]
[success] rolldown v1.2.0 Finished in 40.87 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.7s
node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

[tsdown-build] invocation 2/2 finished in 13.9s
[plugin-control-plane-loads] verified 36 built modules with native require and checked doctor closures
runtime-postbuild: 10 phases completed in 4202ms (slowest: built plugin control-plane loads 3429ms)
│
◇

OpenClaw 2026.8.1 (850d76a) — All your chats, one OpenClaw.

Usage: openclaw gateway [options] [command]

Run, inspect, and query the WebSocket Gateway

Options:
  --allow-unconfigured      Allow gateway start without enforcing gateway.mode=local in config (does not repair config) (default: false)
  --ambient-channels        Allow the gateway to auto-configure channels from ambient environment variables (default: false)
  --auth ‹mode›             Gateway auth mode ("none"|"token"|"password"|"trusted-pro
… output truncated …

Assertions:

  • PASS expect_output: gateway

How this fits together

Discord and Slack plugins attach local avatar media references to inbound conversations. Session metadata persists those references, the Gateway serves them to authorized owners, and the Control UI renders the sidebar thumbnail.

flowchart LR
  A[Discord or Slack message] --> B[Avatar download]
  B --> C[Session origin metadata]
  C --> D[Authenticated Gateway route]
  D --> E[Session row avatar URL]
  E --> F[Control UI sidebar]
  F --> G[Conversation thumbnail]
Loading

Before merge

  • Persist the avatar after the background download (P2) - The resolver returns undefined for the first message and only caches the downloaded path afterward. The channel turn records the already-built context once, with no completion-time session update, so a one-message Discord or Slack conversation never receives an avatar. This is the prior review blocker still present at the current head.
  • Resolve merge risk (P1) - The completion update must validate the current session route before writing; otherwise a delayed old image could be associated with a newer conversation on the same session.

Findings

  • [P2] Persist the avatar after the background download — extensions/discord/src/monitor/message-avatar.ts:56-64
Agent review details

Security

None.

PR surface

Source +835, Tests +568, Other +4. Total +1407 across 47 files.

View PR surface stats
Area Files Added Removed Net
Source 35 1018 183 +835
Tests 10 569 1 +568
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 6 2 +4
Total 47 1593 186 +1407

Review metrics

Metric Value Why it matters
Production versus test change production +824/-182; tests +763/-2; generated +4; test support +2/-2 The feature spans channel ingress, persisted session metadata, Gateway protocol/HTTP, and Control UI rendering, making end-to-end owner-boundary coverage important.

Stored data model

Persistent data-model change detected: serialized state: packages/gateway-protocol/src/schema/sessions-row.ts, serialized state: src/config/sessions/types.ts, serialized state: src/gateway/session-event-payload.ts, serialized state: src/gateway/session-utils-row.ts, serialized state: src/gateway/session-utils.test.ts, serialized state: src/gateway/session-utils.types.ts, and 6 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Persist the completed download safely (recommended)
    Update the originating session after the media save only if its authoritative channel identity still matches, then cover one-message Discord and Slack flows.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Persist delayed Discord and Slack avatar downloads into the originating session without overwriting a newer channel route; add one-message completion regressions.

Technical review

Best possible solution:

Use one guarded completion-time session update that records the downloaded local reference only while the original channel identity still owns that session, with one-message regressions for both producers.

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

Yes, at source level: allow the first avatar download to finish without sending another message; the sole recorded inbound context has no avatar reference and no completion path writes one.

Is this the best way to solve the issue?

No. Background acquisition is appropriate for the reply path, but cache-only completion is too narrow; the session owner needs a guarded completion-time update.

Full review comments:

  • [P2] Persist the avatar after the background download — extensions/discord/src/monitor/message-avatar.ts:56-64
    The resolver returns undefined for the first message and only caches the downloaded path afterward. The channel turn records the already-built context once, with no completion-time session update, so a one-message Discord or Slack conversation never receives an avatar. This is the prior review blocker still present at the current head.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add merge-risk: 🚨 session-state: The PR adds persisted channel-owned media references and a delayed repair must not associate an old reference with a newer route.
  • remove merge-risk: 🚨 compatibility: Current PR review merge-risk labels are merge-risk: 🚨 session-state.
  • remove proof: 📸 screenshot: Current real behavior proof evidence kind is not_applicable.

Label justifications:

  • P2: The proposed sidebar feature fails for ordinary conversations that have only one inbound message.
  • merge-risk: 🚨 session-state: The PR adds persisted channel-owned media references and a delayed repair must not associate an old reference with a newer route.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer-authored PR includes claimed isolated Gateway/UI proof; the prepared media manifest contains no inspectable copy of that screenshot, while the source defect independently blocks merge.

Evidence

What I checked:

Likely related people:

  • steipete: Blame attributes the affected new producer paths to Peter Steinberger at the reviewed head; the related merged UI repair also lists steipete as author. (role: current-line and recent adjacent contributor; confidence: medium; commits: 850d76aeca23, fd1171f8fb52; files: extensions/discord/src/monitor/message-avatar.ts, extensions/slack/src/monitor/context.ts, src/channels/turn/execution.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Persist completion-time avatar references for a single Discord and Slack inbound message.
  • Attach or relink inspectable redacted UI proof after the repair.

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 (6 earlier review cycles)
  • reviewed 2026-08-18T07:39:14.105Z sha 4c1c09f :: needs changes before merge. :: [P2] Version the avatar route when its backing media changes
  • reviewed 2026-08-18T08:47:59.180Z sha ebd585b2a069aac8f201272f53a882cb32a6b9b3 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-18T09:08:01.055Z sha fc10ceb5958e683d96bcafe57c21f7a8efa49b91 :: needs changes before merge. :: [P2] Restore the owner fallback when the avatar route misses
  • reviewed 2026-08-18T09:46:03.044Z sha 56edd220629e57ef61b63cd39a4ccf5f7918866d :: found issues before merge. :: [P2] Restore the owner fallback when the avatar route misses
  • reviewed 2026-08-18T10:43:28.322Z sha da39c66 :: found issues before merge. :: [P2] Restore the owner fallback when the avatar route misses
  • reviewed 2026-08-18T11:45:58.234Z sha fb5de2602a7f75229fa67480d7fb6f6805302f12 :: found issues before merge. :: [P2] Persist the avatar after the initial asynchronous download

@steipete
steipete force-pushed the steipete/discord-thumbnails-c46f46 branch from 82ff4f5 to 4c1c09f Compare August 18, 2026 07:32
@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. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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. 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 Aug 18, 2026
@steipete
steipete force-pushed the steipete/discord-thumbnails-c46f46 branch from 703a47f to 56edd22 Compare August 18, 2026 09:38
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 18, 2026
steipete added a commit that referenced this pull request Aug 18, 2026
…tion (#125766)

* refactor(ui): extract chat pane rail state

chat-pane-render.ts sits at 702/700 effective max-lines on main, latently
failing the lint lane for any change that pulls it into scope. Extract the
rail/sidebar-slot model building into chat-pane-rails.ts (behavior-neutral)
to heal it without a suppression.

* test(ui): isolate markdown-tables from shared module graph

The shared UI runner reuses its module graph across jsdom registries; when
another worker file evaluates markdown-tables.ts unmocked first, this file's
clipboard vi.mock can bind to a stale instance and the copy spy records zero
calls (checks-ui failures on PR #125668). The test belongs on the canonical
singleton-sensitive list, which exists for exactly this class.
@steipete
steipete force-pushed the steipete/discord-thumbnails-c46f46 branch from 56edd22 to 225c698 Compare August 18, 2026 10:17
@steipete

Copy link
Copy Markdown
Contributor Author

Status: all feature work, both ClawSweeper P2 fixes (route revision cache-busting; owner-chip fallback), and the startup-budget accounting are complete on this branch, and every check is green except checks-node-changed-extensions-config-10 — which is a repo-wide latent breakage unrelated to this diff (the codex lane exceeds the CI no-output watchdog for every extensions-touching PR; main never runs the lane so main stays green). Evidence and suspects: #125839. This PR lands once that gate is healed; two shared-infra heals discovered en route already landed separately (#125766, #125800).

steipete and others added 12 commits August 18, 2026 09:19
A stable per-session URL let AuthenticatedAvatarRouteLoader's blob and
sticky-404 caches pin a mounted row to a stale or blank avatar after the
backing media changed. Append an opaque digest of the media reference so
replacement and 404-recovery change the route identity.
A session with a channelAvatarUrl suppressed its owner chip even while the
blob was loading, auth was not ready, or the route 404ed, leaving an empty
lead slot. The chip now rides as fallback content inside the avatar element
and yields only to a usable image. Covers 404 and auth-pending states;
avatar rows keep renderedOwnerId unset so an owner-viewer stays visible in
the facepile.
The avatar element and its authenticated blob loader rode the startup
bundle through session-leading-indicator, pushing startup JS 51 B over the
CI gzip budget. Channel avatars are not startup-critical: register the
element on the first avatar row; the owner-chip fallback covers the
one-time upgrade window. Startup JS returns ~1 KiB under the ceiling.
CI-measured startup JS is 344379 B against a 343289 B baseline (+1090 B).
The avatar element and blob loader are code-split out of startup (previous
commit); the residual is the sidebar lead-slot render branch and row
plumbing, which cannot be deferred. Baseline updated via
check-control-ui-performance --update-baseline with CI bytes per the
script's contract; well inside the 4096 B ratchet step and 358400 B
ceiling.
@steipete
steipete force-pushed the steipete/discord-thumbnails-c46f46 branch from 850d76a to 19d7bf4 Compare August 18, 2026 16:20
@steipete
steipete merged commit 2bed8ca into main Aug 18, 2026
592 of 599 checks passed
@steipete
steipete deleted the steipete/discord-thumbnails-c46f46 branch August 18, 2026 16:55
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
…tion (openclaw#125766)

* refactor(ui): extract chat pane rail state

chat-pane-render.ts sits at 702/700 effective max-lines on main, latently
failing the lint lane for any change that pulls it into scope. Extract the
rail/sidebar-slot model building into chat-pane-rails.ts (behavior-neutral)
to heal it without a suppression.

* test(ui): isolate markdown-tables from shared module graph

The shared UI runner reuses its module graph across jsdom registries; when
another worker file evaluates markdown-tables.ts unmocked first, this file's
clipboard vi.mock can bind to a stale instance and the copy spy records zero
calls (checks-ui failures on PR openclaw#125668). The test belongs on the canonical
singleton-sensitive list, which exists for exactly this class.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
…k) (openclaw#125668)

* feat(gateway): proxy channel conversation avatars

* feat(discord): capture conversation avatars

* feat(slack): capture DM sender avatars

* test(discord): bind guild avatar mock

* feat(ui): render channel conversation avatars

* fix(ui): align sidebar owner fixtures

* fix(gateway): version channel-avatar routes by media revision

A stable per-session URL let AuthenticatedAvatarRouteLoader's blob and
sticky-404 caches pin a mounted row to a stale or blank avatar after the
backing media changed. Append an opaque digest of the media reference so
replacement and 404-recovery change the route identity.

* test(ui): align sidebar owner facet

* fix(ui): keep owner chip until channel avatar loads

A session with a channelAvatarUrl suppressed its owner chip even while the
blob was loading, auth was not ready, or the route 404ed, leaving an empty
lead slot. The chip now rides as fallback content inside the avatar element
and yields only to a usable image. Covers 404 and auth-pending states;
avatar rows keep renderedOwnerId unset so an owner-viewer stays visible in
the facepile.

* perf(ui): keep channel avatar fallback within budget

* perf(ui): lazy-load the channel avatar element

The avatar element and its authenticated blob loader rode the startup
bundle through session-leading-indicator, pushing startup JS 51 B over the
CI gzip budget. Channel avatars are not startup-critical: register the
element on the first avatar row; the owner-chip fallback covers the
one-time upgrade window. Startup JS returns ~1 KiB under the ceiling.

* build(ui): raise startup baseline for channel avatars

CI-measured startup JS is 344379 B against a 343289 B baseline (+1090 B).
The avatar element and blob loader are code-split out of startup (previous
commit); the residual is the sidebar lead-slot render branch and row
plumbing, which cannot be deferred. Baseline updated via
check-control-ui-performance --update-baseline with CI bytes per the
script's contract; well inside the 4096 B ratchet step and 358400 B
ceiling.
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 channel: discord Channel integration: discord channel: slack Channel integration: slack gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant