Skip to content

fix(chatview): 修复 Hub 图片消息转录不显示 - #1978

Merged
DeliciousBuding merged 1 commit into
masterfrom
fix/image-transcript-e2e
Aug 25, 2026
Merged

fix(chatview): 修复 Hub 图片消息转录不显示#1978
DeliciousBuding merged 1 commit into
masterfrom
fix/image-transcript-e2e

Conversation

@DeliciousBuding

Copy link
Copy Markdown
Collaborator

根因

  • Hub GET /client/sessions 的真实 DTO 使用 session_id,但 Web/Desktop transcript 激活门禁只匹配 session.id,导致真实会话的 messages/pins 查询未启用;message.new 即使触发缓存失效,也没有正确激活的历史查询可刷新。
  • Hub REST history 的 MessageResponse 会通过 projectOneMessage 透传 join 后的 attachments;实时 message.new 帧是存储层 model.Message,不含 join 后附件,因此 live 路径必须失效缓存并回到同一 REST history 投影。
  • normalizeHubMessagesToTranscript 遇到 image/file 且附件数据缺失时会落入文本路径;图片内容没有可渲染文本,最终返回 null,整条用户消息被静默丢弃。

修复

验证

以下均在独立 worktree 依赖(pnpm install --frozen-lockfile --ignore-scripts)和最新 origin/master 基线上串行执行:

  • pnpm exec vitest run shared/src/transcript/normalizeHubMessages.test.ts --no-file-parallelism --maxWorkers=1 — 14 passed
  • pnpm exec vitest run web/src/platform/useWebWorkbenchModel.test.ts --no-file-parallelism --maxWorkers=1 — 36 passed
  • pnpm exec vitest run desktop/src/platform/useDesktopWorkbenchModel.test.tsx --no-file-parallelism --maxWorkers=1 — 13 passed
  • pnpm exec vitest run web/src/platform/webHubRealtime.test.ts --no-file-parallelism --maxWorkers=1 — 31 passed
  • pnpm exec vitest run shared/src/chatview/i18n/resources.test.ts --no-file-parallelism --maxWorkers=1 — 12 passed
  • pnpm --filter @agenthub/shared typecheck — passed
  • pnpm --filter agenthub-web typecheck — passed
  • pnpm --filter agenthub-desktop typecheck — passed
  • python scripts/verify/verify-i18n-callsites.py — passed
  • python scripts/verify/verify-shared-trio-ratchet.py — passed
  • python scripts/verify/verify-ci-gates.py — passed

real_tested=false:本轮只完成 L0 行为/类型/治理门禁验证,未执行新的 L3 真实栈或 packaged Desktop E2E。Issue 中 2026-08-25 的旧 real evidence 仅用于定位根因,不作为本 PR 的本轮真实 E2E 证据。

Closes #1972

- 门禁对齐: Web/Desktop 用 (id ?? session_id) 匹配真实 REST 会话 (#1972 根因)

- 归一化器: image/file 缺附件时产出诚实降级块, 禁止静默丢弃

- 新增 gate/透传/降级行为测试与中英 i18n 键

Co-authored-by: Codex <codex@vectorcontrol.tech>
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1683d395-1788-4edc-ab3a-5d70c542e712

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DeliciousBuding
DeliciousBuding merged commit 80a8fb9 into master Aug 25, 2026
40 checks passed
@DeliciousBuding
DeliciousBuding deleted the fix/image-transcript-e2e branch August 25, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(chatview): Hub 送达的用户图片消息在 Web transcript 不显示(发图→看图端到端断裂)

1 participant