Commit Graph
138 Commits
Author SHA1 Message Date
Menghuan1918 8aa4ae32b1 chore: reconcile the clues line with dev's newest client surfaces
Upstream moved under the branch while it was being rebased: the changes
lens grew its own underline tabs (#1236) and kept ONE native branch
select (#944), the task graph squared its controls (#948), the host
admission call moved to rc.3's admit fallback, and the graph viewport
got a fixed 248px floor. Where the two designs collided this takes
upstream's newer chrome and re-applies the branch's kit only where it
defines our own surfaces.

- changes/GitGraphSection: keep the branch's kit buttons but restore the
  native branch select, and give it token colours plus the 32px / 44px
  touch sizes so it stops falling back to the OS chrome in a dark panel.
- sidebar/dock-fallback: upstream's 28px host-matched geometry plus the
  branch's 44px coarse-pointer target (no longer a 32px base).
- ui/workbench-section: the disclosure bar is exactly 28px INCLUDING its
  divider, so the sections keep the heights the changes graph measures.
- tests: theme.spec, dock-fallback, git-graph-ui and git-view-worktree
  follow upstream's newer shapes; the surface sweep stops demanding one
  identical tab for upstream's underline lens strip, and the graph e2e
  clicks the shared section disclosure instead of the old div > button.
2026-11-24 16:43:27 +08:00
Menghuan1918 bdbd9f4ff6 test(e2e): pin the pack shelf's own scroll before measuring the settled row 2026-11-24 16:43:27 +08:00
Menghuan1918 a90abe4304 feat(selection): compact popup with lateral rewrite flyout 2026-11-24 16:43:27 +08:00
Menghuan1918 99ecc6dee7 feat(navigation): clarify Clues labels and reorder default guide 2026-11-24 16:43:27 +08:00
Menghuan1918 08002a0211 feat(selection): configure rewriting and translate selections directly 2026-11-24 16:43:27 +08:00
Menghuan1918 39ccabcefb feat(sidebar): polish loading, floating windows and clue provenance 2026-11-24 16:43:27 +08:00
Menghuan1918 3313b8779f fix(clues): restore horizontal source selection in wide panes 2026-11-24 16:43:27 +08:00
Menghuan1918 dc3b8aba33 feat(clues): refine resizable workbench and resource previews 2026-11-24 16:43:27 +08:00
Menghuan1918andDevin 934d57655a test(clues): follow the rebuilt workbench surfaces
The specs still drove the wide source tabs, the nested pin strip and a
separate create-pack window. Helpers and assertions now exercise the
SelectMenu source picker, the inline pack form, the docked-or-floating
window helper and the 12px workbench axis, with touch targets at 44px.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-24 16:43:27 +08:00
Menghuan1918 7c6ab16362 test(e2e): follow the docked clue windows and the rebuilt tab hooks 2026-11-24 16:43:27 +08:00
Menghuan1918 5ee81fb073 feat(clues): collect resources from files, Feishu and GitHub, adapted to DSH 0.2.2-rc.2
This lands the clue collection line on top of origin/dev (v0.32.1, DSH
0.2.2-rc.2). The 14 commits that carried it are squashed into this one
because every one of them overlapped upstream's own changes (version,
19 dictionaries, CHANGELOG), and each intermediate commit would have
failed to compile against rc.2's menu API. The pre-integration head is
kept at backup/clues-uiux-refresh-pre-rebase.

What the feature is:
- a Clues tab that reads local files, Feishu tasks/docs and GitHub
  issues/pulls through one source registry, with a scope row, shared
  search, filters, paging and stable [[dsh-clue:...]] references;
- one window host for detail, pack management, source configuration,
  new pack and sharing (preview and edit are separate paths: a read is
  never saved over);
- .cluepack export/import with per-row resolvability previews;
- a source runtime that owns dependency installs and connection
  authorization (gh, lark-cli device code) and only probes on an
  explicit read;
- the public betterSidebarClues service and the windows capability
  (features gains clues / windowHost).

Merged with upstream rather than over it:
- the settings section keeps upstream's start-page takeover group and
  this branch's clue sources group; navigation is now six groups;
- the dictionaries keep both sides' new keys (1211 each, verified equal
  across all 19), the external-plugin guide and CHANGELOG keep both
  histories, and service features list both capability sets.

Adapted to 0.2.2-rc.2:
- menu call sites use anchorPoint instead of getAnchorRect;
- the shared SelectMenu mounts the host menu only while open, because
  rc.2's Menu reads the DOM during render and broke server-rendered
  settings surfaces;
- the submenu flip workaround stays deleted (the host positions
  submenus now), pinned by an updated layout-css assertion.

Version 0.33.0 (three synced spots) with a new 未发布 / Unreleased
changelog section; package.json regains the ./clues export, lib/clues.js
and the uqr dependency that upstream never had.

Gates: typecheck, lint, 5410 unit tests, build, check:consumer-types and
the full mount lane (35 passed) against dsh 0.2.2-rc.2 in Chromium.
2026-11-24 16:43:26 +08:00
hairyfbot 3be1065d54 test(e2e): 真实宿主断言关闭按钮常驻 Tabs 行最右侧(#991)
git-graph 用例在「提交详情」页签上断言面板只有一个关闭按钮、它挂在 Tabs 那一行(tablist 的父行)末尾,切到「差异」后仍在同一行,点击它关闭整块面板。
2026-11-21 17:55:11 +08:00
hairyfbot 92899af758 test(e2e): 展开态入口位置断言改为轮询,避开面板滑入动画 2026-11-21 15:15:58 +08:00
hairyfbot fb9967b8df fix(sidebar): 空白会话在右侧栏展开时仍能打开底部工作台(#989)
blank 会话里宿主不渲染会话头 utilities,插件的底部工作台入口只剩右上角那个
备用入口;而它在宿主右侧面板展开时整个不渲染,于是「先开右栏」就再也打不开
底部工作台。#1053 修的是正常会话的会话头入口,这一处当时被留了下来。

现在展开态照常渲染,并改锚**面板左缘**:展开态宿主的 Split / Fullscreen /
Collapse 搬进了面板内部,锚在那簇控件左侧会落进面板、盖住面板内容;面板左缘
那一格是会话头那一行的右端空位,与收起态入口同一列。

真实宿主(DSH 0.2.2-rc.5 + Chromium,1440x900,空白新会话)实测:
- 收起态:入口 1364,11(不变);
- 展开态:修复前屏上 0 个入口,修复后 756,10(面板左缘 792),点击可打开底部面板。

tests/dock-fallback.spec.tsx 把「展开态不渲染」改成「展开态渲染且锚在面板左缘
756px 并仍可点击」(还原旧守卫即红);tests/e2e/blank-session-dock-entry.e2e.ts
新增真实宿主用例:展开右栏后入口仍在、屏上恰好一个、右缘不越过面板左缘。
2026-11-21 15:11:16 +08:00
Hairy 1b36babe07 Merge pull request #945 from hairyf/fix/native-tab-chip-alignment
fix: 对齐原生 Tab 与官方图标尺寸、间距和居中
2026-11-21 12:54:45 +08:00
Menghuan1918 aa2a058037 docs(editor): drop the retired new-session tab seed claim; pin the blank-session right-column open
The editorExplorer comment still promised that new sessions seed an empty
editor tab, and the external plugin guide repeated it. Neither is true since
the plugin's own right panel was retired: the host owns the right column and
a brand-new session starts with no tab, so its first open lands on the start
page this plugin takes over (#1218).

Adds the one e2e case the mount lane was missing: a blank session's first
right-column expand must already render the start-page takeover, with no host
Split action in between.
2026-11-18 10:55:36 +08:00
Menghuan1918 0441249314 feat(sidechat): make the native page mode configurable (#1115)
Keep the contributor independent-page implementation, but make it opt-in: the default is still one shared page with the session last/newest reattach, and Settings -> Side card -> Side chat can switch to one native page per thread. The descriptor gains a dynamic multiple predicate, native sync re-registers on a flip, and occurrence bindings are read/written only for sidebar://sidechat/<uuid> contentIds so the shared page can never be captured by an old binding.
2026-11-16 00:47:59 +08:00
peng xiang ba6f3a3423 fix(sidechat): preserve independent native tabs and exact thread bindings 2026-11-16 00:39:39 +08:00
Menghuan1918 e6f1af2f82 chore(dsh): 适配 DSH 0.2.2-rc.2 并补齐插件页图文详情(v0.32.1) 2026-11-12 21:20:46 +08:00
Menghuan1918 a4d11d7c09 feat(native): align, take over, and reorder start page refinements
Add centered/top alignment, a default-on start-page takeover switch, icon-plus-title More rows, and share the row-count input between settings and the reorder dialog.
2026-11-12 00:05:55 +08:00
Menghuan1918 a92252c5d3 feat(native): take over the right sidebar start page
Replace the host guide body with a plugin start page: responsive two-column cards, configurable rows, a More card for overflow, persisted order and visibility in Side Card settings, and the terminal card shell menu through the host webTerminals service.
2026-11-12 00:05:55 +08:00
Menghuan1918 9c3c01cf8e feat(markdown): render file:// image URLs through the media routes
Markdown-syntax and raw-HTML file: destinations are converted to an absolute local path before rendering or sanitization, then served by the same session media route as relative images. POSIX, Windows drive, localhost, UNC and percent-encoded URLs are covered; the file: scheme is never handed to the renderer or DOMPurify. Also prepares v0.31.1.
2026-11-11 21:58:56 +08:00
Menghuan1918 ba7d069842 fix(preview): render data images and self-contain desktop HTML previews
Markdown syntax now passes data:image/* through the image vocabulary (the host allowlist already accepts it); every other data payload stays inert. The desktop shell's sandboxed HTML preview is self-contained: the trusted top frame fetches the document and its same-origin assets, inlines them, and frames a sandboxed blob instead of a dsh-app route the shell rejects from an opaque subframe. The sandbox never gains allow-same-origin; browser and explicitly-unsandboxed paths are unchanged.
2026-11-11 21:28:39 +08:00
NolanHo bed56758c7 feat(sidechat): align the side conversation with the main pane
The side chat inherited none of the main pane's reading behaviour and could
not say where it forked off. This change brings it in line and keeps the
upstream v0.30.1 release intact.

Work details follow the main conversation's setting (transcriptView +
collapseTiming): settled turns fold behind the host's own "Completed in Ns"
line, running turns stay open, verbose never folds.

The transcript now names its origin: the events route reports the fork point,
and the block above the first row renders the inherited question as an
ordinary user bubble and the inherited answer as ordinary assistant prose,
bracketed by two divider lines and carried verbatim.

Reading the thread got cheaper and calmer: only the tail is mounted with a
step-wise reveal, scroll-follow answers an explicit intent, and the composer
guards IME composition, key repeat and the submit-gesture choice while send
and stop stay independent controls.

Everything visual rides the host's own surface: content-size and code font
axes, the host's markdown surface for reasoning, host cards for search/web/
terminal/diff results, compaction and retry rows, and host-defined design
tokens (six borders and eleven colours had referenced tokens the host never
defines, so they never painted).

Thread creation became reliable: a stored parent is resumed through the
session controller, the create budget is a deployment setting instead of a
hard-coded 15 seconds, and the child attaches at the parent's workspace cwd
while its tools keep running in the reader's current directory.

Upstream v0.30.1 brings side-chat images, clickable quote chips, editor draft
backup, the settings icon slot and the 0.2.2 model seam; its per-thread draft
owner and image projection replace the hand-written paths this branch used to
carry, so only one implementation of each survives.
2026-11-09 11:59:12 +08:00
Menghuan1918 fb1bf44ed2 test(e2e): use the shared onboarding dismissal and assert the visible marker (#963) 2026-11-08 00:37:31 +08:00
Menghuan1918 041faf3412 merge #829: fix(mermaid) zoom the content and frame on open
# Conflicts:
#	src/client/mermaid.tsx
2026-11-08 00:23:27 +08:00
Menghuan1918 11b9d4f963 merge #963: fix(sidebar) resolve relative file links from the session cwd
# Conflicts:
#	src/active-worktree.ts
2026-11-08 00:21:05 +08:00
unsc9 c3e9be88d8 fix(mermaid): 放大视图工具栏让出窗口控件带(#805)
工具栏原本 top:16px、按钮 36px,在 42px 的原生窗口按钮带下只剩 10px 可点。
改为内联 top:16px+控件带高度,CSS 的 16px 保留为无 JS 时的降级;加
data-mermaid-toolbar 稳定选择器供 e2e 测量。

挂载 lane 注入可控的假 WCO(初始 0,不影响本 lane 其它断言),把带子调到
36px 后实测工具栏 top=52,调回 0 再实测回到 16。
2026-11-05 13:15:57 +08:00
Menghuan1918 a1af72a641 test(e2e): 引用 chip 的可见标签是本地化文案,按文件名断言而不是冒号分隔(#1111 后续) 2026-11-04 21:18:08 +08:00
HootRock d3b887f179 fix: account for CSS page zoom in panel host geometry checks 2026-11-03 20:18:22 +08:00
Menghuan1918 bd6cfa55b4 test(e2e): measure the folder-archive flow in the perf audit 2026-10-30 02:14:40 +08:00
Menghuan1918 0e643852c3 test(e2e): correct the audit seed comment (the tree cap is 1,000 rows) 2026-10-30 02:07:02 +08:00
Menghuan1918 f1323d6c57 chore(e2e): launch dsh web with --no-open and add the opt-in page/API perf audit 2026-10-30 02:01:47 +08:00
Menghuan1918 2c48ff451d test(e2e): match the visible preview copy, not the hidden editor's (mount-lane flake) 2026-10-30 00:20:29 +08:00
Menghuan1918 6e29d91bec test(e2e): 选区引用改为 chip 后更新 @ 引用 e2e 断言
#1052 把「添加到对话」的多行选区改成引用 chip(正文只在发送时展开),
#1002 留下的 mount e2e 仍按旧的 plain-text 围栏断言(3 chips + 围栏正文),
合并后 plugin-mount 在真实 DSH 上红:实际 4 chips。改为断言第 4 枚 chip
落地、label 带来源文件、且不产生 plain-text reference;围栏正文的逐字
载荷由 tests/selection-payload.spec.ts 在单测层钉住。

验证:本地 (真实 DSH 0.2.1-rc.1)1 passed。
2026-10-26 15:39:40 +08:00
Menghuan1918 25fd296f99 merge #1052: feat(editor): 「添加到对话」改用引用 chip,正文只在发送时展开
# Conflicts:
#	src/client/conversation-draft.ts
#	src/context-types.ts
#	tests/conversation-draft.spec.ts
#	tests/reference-in-chat.spec.ts
#	tests/sidebar-workspace-reference.spec.tsx
2026-10-26 15:03:28 +08:00
Menghuan1918 f74369d2b6 merge #1002: fix(client): 草稿插入不再整份重写,chip 不再被展平(@ 提及两段式) 2026-10-26 15:02:38 +08:00
unsc9 b7d17e8c0a fix(editor): 气泡插入补左侧分隔,并覆盖命令气泡与冻结期
code review 挖出的六处行为问题:

- 宿主只在气泡之后补空格,之前不补,所以往 hello 后插气泡会读成
  hello[chip]。插入前先用同一条 span 通道占一个分隔位。
- 命令气泡(/goal)不在 occurrences 里(宿主只收引用气泡),但它在
  detect 投影里同样只占一个字符。补上按 claim.token 折叠,否则 span
  越界、引用插不进去;setDraft 分支也会把命令气泡碾成字面文本并丢掉
  claim,所以 claimed 状态同样走 span 通道。
- 选区气泡的 ref 是围栏正文而非路径,标成 appearance:file 会让宿主
  把它当可点开的文件,点一下拿整段正文去开文件。改为由调用方决定。
- 宿主可能已经应用了编辑再抛异常,此时报 false 会让调用方再插一份纯
  文本。异常分支先重读 revision 再判断。
- 冻结期(adjudicating/submitting)直接拒绝,不回退。

顺带删掉 insertReferenceOrText 没人覆盖的 fallbackText 参数,修掉
insertWorkspaceReference 对同一路径重复调用 mentionFor。
2026-10-24 21:39:14 +08:00
unsc9 26be90d66f test(e2e): composer 定位改用宿主的 composer slot
首屏占位符名字(Describe what you want to build)在会话有内容后就消失了,
拿它查 composer 会一直超时。改锚定 [data-slot=conversation.composer.bar]:
这是宿主自己的稳定属性,且天然把插件里同样 contenteditable 的 CodeMirror
排除在外,不用再靠 DOM 顺序猜。
2026-10-24 20:50:07 +08:00
unsc9 9067e2cac4 test: 夹具跟上 insertReference facade,e2e 复用权威 composer 定位器
- conversation-draft 的两份 composer 假件合成一个 composerCtx,删掉从未
  被调用或断言的成员(setDraft / snapshot / phase 选项)。
- reference-in-chat、sidebar-workspace-reference 改为断言 facade 调用,
  不再断言 emit 事件。
- mount.e2e 用 host.ts 导出的 composerLocator,不再用
  [contenteditable=true].first() —— 插件自己的 CodeMirror 也是
  contenteditable,按 DOM 顺序取首个会取错。
- 修正设计文档里一条与实现相反的结论(ref 存的是发送正文,不是 label)。
2026-10-24 20:29:59 +08:00
unsc9 1ed872268c test(e2e): 选区气泡探针改用真实拖拽与正确的选择器
三击/合成点击会在 mouseup 之前丢掉选区,浮层不弹;改用 mouse.move/down/up
的真实拖拽。气泡是 composer 里的兄弟装饰节点,不是 role=textbox 的后代,
选择器改按 label 文本在整页范围内定位。

真机 mount lane 已验证通过(23s):预览里选中一行 → 点按钮 → composer
里出现 diagram.md:12 气泡,草稿不含三反引号。
2026-10-24 19:39:55 +08:00
unsc9 8c431db740 test(e2e): 断言选区引用落在 composer 里是气泡,不是围栏正文
真机 mount lane 加一段:预览里选中一行 → 点「添加到对话」→ 断言
composer 里出现 path:lines 气泡,且草稿文本不含三反引号。
宿主若不认 reference-insert 事件、退化成纯文本,这条会直接失败。

同时记录设计与两套坐标系(clipboard / detect)的折算规则。
2026-10-24 19:17:42 +08:00
Menghuan1918 18dade0f63 fix(perf): address the perf-scan review findings 2026-10-24 12:10:17 +08:00
Menghuan1918 0a4a94c704 perf(graph): window the commit history rows 2026-10-24 02:17:10 +08:00
Menghuan1918 787d873a8c fix(tasks): restore graph expansion and configurable branch folding
Reset per-gesture travel before node guards so a preceding background pan cannot suppress the next card click. Index and iteratively lay out graph topology, memoize agent card contents, and project complete settled branches under independent existing-settings preferences.

Keep unknown real workflow catalogs and explicitly opened descendant paths visible. Add regression coverage and real rc.1 browser/baseline validation evidence.
2026-10-23 12:38:23 +08:00
ymac 494f5e80d0 test(e2e): 覆盖「两次插入之间夹文本」与「多行选区引用」,并补一条多行单测
真机 lane 的这条用例现在跑四种形状:两次文件 @(chip)、一次目录 @(纯文本 token)、
中间夹打字文本后再插一个文件 @、以及从 markdown 预览里框选多行后用选区弹窗插入
(payload 是带围栏的多行串)。每一段之后都要求既有 chip 数量与身份不变、纯文本 token
数量不变、且引文逐字落地(围栏与换行都在)。写成这样是因为旧实现在**任何一次**插入时
都会整份重写草稿,四种形状都会红。

lane 里踩到的两个选择器坑,注释已经写在用例上,避免下次再踩:
- 宿主为每个保留会话渲染隐藏 seat,`[data-sidebar-right-panel]` 会同时匹配隐藏副本,
  沿它取 `.first()` 拿到的可能是不可见的那个(boundingBox 为 null / 文本节点没有 rect);
- markdown 预览模式会把 CodeMirror 宿主**保留但隐藏**(未保存草稿),所以定位必须
  `filter({ visible: true })`,否则会选中隐藏的那份。

单测侧补一条:多行 payload 逐字交给宿主(围栏与换行不动)、既有 chip 的 occurrence 仍在、
`setDraft` 不被调用。
2026-10-18 20:38:20 +08:00
ymac 70eb6b7276 test(e2e): 挂载 lane 钉住 @ 引用插入不会整份重写草稿(chip 不被展平)
上游一旦改动 composer 的内部事件或坐标投影,这条链路的表现是「点击无效」而不是报错
(我们发的是非公开的 session 作用域事件),单测用假宿主钉不住这一点,所以补一条真机断言:
真实 composer 里经文件树点两次文件 @(两个 `[data-composer-chip]`,第一个仍带自己的文件名)
再点一次目录 @(落成宿主装饰的纯文本 token),四条断言都在;旧实现第二次点击就会把第一个
chip 展平成文本,前三条会红。

顺带把 `context-types.ts` 的 `setDraft` 注释补一句:上游若改该语义(保留 chip 或提供公开
插入面),要与 `conversation-draft.ts` 的两条插入路径一起复核。
2026-10-18 20:18:37 +08:00
Menghuan1918 2b8a4da569 chore(release): prepare alpha.0 with latest dev fixes 2026-10-17 12:02:59 +08:00
Menghuan1918 6417547bb5 merge origin/dev: include Context diagnostics and graph layout fixes
# Conflicts:
#	CHANGELOG.md
2026-10-17 11:52:48 +08:00
Menghuan1918 38d94bdb98 fix(git): let commit graph fill available sidebar height
Replace the 460px viewport cap with flex allocation. Bound the graph section minimum so long history scrolls internally instead of stretching the outer list. Verify tall and narrow panes, preview selection, folding and long Changes lists in the mounted host.
2026-10-17 11:33:55 +08:00