Repository navigation
feat(sidechat): render local images and present deliveries - #1044
Merged
Merged
Conversation
Cache markdown label objects by value so MarkdownText's memo survives parent re-renders; pass streaming for unsettled assistant rows. Rewrite local image destinations in Side Chat prose against the session cwd through the existing /sidebar/file media route. Map present tool calls and deliverables/presented events to a compact delivery card with thumbnails and the plugin's file-open path. Add the change spec, exploration notes, and regression tests.
Replace a failed present card with the generic failed tool row; keep one event-authoritative card whichever of the call and its delivered event lands first. Use the host's real border token for the delivery card; include the visible description in the file button's accessible name and resolve its title path. Handle CommonMark angle-delimited image destinations and preserve titles; add transcript, prose-rewrite, and DOM regression tests. Update the change spec with review-driven acceptance commands, status, and evidence.
NolanHo
force-pushed
the
fix/sidechat-render-parity
branch
from
October 23, 2026 09:48
e2a7869 to
6f14792
Compare
davidLi17
added a commit
to davidLi17/DSH-better-sidebar
that referenced
this pull request
Oct 24, 2026
Selectively backport upstream dev PR omdsh-dev#1044 (6f14792) and pointer fixes from PR omdsh-dev#1041 (dc38513), retaining LHG image attachments, draft bridge and compacted-history inheritance. Resolve delivered files against current scope cwd. Do not adopt new folding preferences. Ship 0.28.1-lhg.3 with matching prebuilt assets. Verified 2747 tests passed / 17 skipped, typecheck, lint, build, pack, consumer types, scratch DSH startup and Git package consistency. Browser UI verification blocked by environment. Details: docs/plans/2026-10-24-lhg-selective-maintenance.md
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.
问题
Side Chat 与主 Session 历史的渲染能力差距较大:
MarkdownText只接受绝对 http(s),Side Chat 未提供图片词汇);present的文件/图片只有通用 tool 行,没有交付卡片;markdownTextProps每次新建 labels,打穿宿主MarkdownText的 memo);live 行也没有streaming。改动
markdownTextProps按五个 label 值缓存 labels(32 条 FIFO);SideChatView对未 settled 的 assistant 行传streaming。rewriteLocalImageUrls语义,按 session cwd 解析为/sidebar/file绝对 URL;支持 angle destination(含空格)和 title;代码区域、remote、anchor 不变。present调用与deliverables/presented事件渲染 compact 交付卡片(图标/basename/描述/图片缩略图/点击openSidebarFile);失败 present 回退 generic failed 行;event-first/call-first 都只有一张事件权威卡片;seed 内事件不渲染。验证
vitest run2717 passed / 17 skipped,唯一失败为本地 git 2.34.1 的既有环境用例(基线同失败)。pnpm typecheck、pnpm lint、pnpm build、pnpm pack通过。SideChatViewjsdom 性能:200 markdown 组件 push 5.38 ms / keystroke 3.18 ms(基线 101.7–117.8 / 105.1–117.2,约 19–37×);100 组件 2.19/1.96 ms;labels 引用稳定,未变化行MarkdownText执行数 0;8 KB 增长行 settled 22.0 ms → streaming 1.01 ms。Present files卡片、文件描述、图片缩略图、assistant 本地 Markdown 图片(/sidebar/file,naturalWidth=28)、点击打开 README 均通过。Present files卡片,按钮 aria 带描述(Open README.md: …、Open running-whale@2x.png: …),review 修复后的边框/aria 已确认生效。关联
docs/plans/2026-10-22-sidechat-render-parity/spec.md909f536,e2a7869