fix(chatview): 修复 Hub 图片消息转录不显示 - #1978
Merged
Merged
Conversation
- 门禁对齐: Web/Desktop 用 (id ?? session_id) 匹配真实 REST 会话 (#1972 根因) - 归一化器: image/file 缺附件时产出诚实降级块, 禁止静默丢弃 - 新增 gate/透传/降级行为测试与中英 i18n 键 Co-authored-by: Codex <codex@vectorcontrol.tech>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
根因
GET /client/sessions的真实 DTO 使用session_id,但 Web/Desktop transcript 激活门禁只匹配session.id,导致真实会话的 messages/pins 查询未启用;message.new即使触发缓存失效,也没有正确激活的历史查询可刷新。MessageResponse会通过projectOneMessage透传 join 后的attachments;实时message.new帧是存储层model.Message,不含 join 后附件,因此 live 路径必须失效缓存并回到同一 REST history 投影。normalizeHubMessagesToTranscript遇到image/file且附件数据缺失时会落入文本路径;图片内容没有可渲染文本,最终返回null,整条用户消息被静默丢弃。修复
(id ?? session_id)解析,兼容真实 RESTsession_id与旧id形状。attachments原样进入共享 transcript normalizer;Web/Desktop 使用同一附件块投影。id/session_id、附件透传与诚实降级行为断言。origin/master78cbcede,保留 feat(review): 单 run 聚合只读审查入口(#1967 部分交付) #1975runReview.*双语键与 ci(verify): shared 组件三件套棘轮接入门禁 #1977ToastStack.test.tsxrename/三件套 CI 棘轮事实。验证
以下均在独立 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 passedpnpm exec vitest run web/src/platform/useWebWorkbenchModel.test.ts --no-file-parallelism --maxWorkers=1— 36 passedpnpm exec vitest run desktop/src/platform/useDesktopWorkbenchModel.test.tsx --no-file-parallelism --maxWorkers=1— 13 passedpnpm exec vitest run web/src/platform/webHubRealtime.test.ts --no-file-parallelism --maxWorkers=1— 31 passedpnpm exec vitest run shared/src/chatview/i18n/resources.test.ts --no-file-parallelism --maxWorkers=1— 12 passedpnpm --filter @agenthub/shared typecheck— passedpnpm --filter agenthub-web typecheck— passedpnpm --filter agenthub-desktop typecheck— passedpython scripts/verify/verify-i18n-callsites.py— passedpython scripts/verify/verify-shared-trio-ratchet.py— passedpython scripts/verify/verify-ci-gates.py— passedreal_tested=false:本轮只完成 L0 行为/类型/治理门禁验证,未执行新的 L3 真实栈或 packaged Desktop E2E。Issue 中 2026-08-25 的旧 real evidence 仅用于定位根因,不作为本 PR 的本轮真实 E2E 证据。Closes #1972