Commit Graph
1005 Commits
Author SHA1 Message Date
Menghuan1918 bf4e25db13 chore: 合入 dev(0.2.3 基线适配)到统一组件分支 2026-11-25 02:06:34 +08:00
Menghuan1918 daf0329666 refactor(ui): 外壳与残余件接入统一组件层(B4)
- Switch.tsx 删除,唯一消费者 native/guide-order.tsx 改用 ui 的 ToggleSwitch
  (native checkbox → button role="switch",受控写回契约不变:下一次值仍由 prop 推导)。
- tests/switch.spec.tsx 改名 tests/toggle-switch.spec.tsx,断言改 aria-checked;
  native-guide 两处开关查询同步改选择器。
- sidebar/dock-fallback.tsx 与 split-pane.tsx 判断不接入:前者只有定位/让位逻辑
  与 BottomDockToggle 包壳,后者是纯布局与 pointer 拖拽手柄,统一层没有语义对应件。
- 收敛文档补 B4 实施记录,并把映射表中这两行改为「判断不接入」及理由。
2026-11-25 01:05:35 +08:00
Menghuan1918 795beabe22 chore(dsh): adapt to DSH 0.2.3-alpha.2 and drop pre-0.2.3 compatibility
Raise the whole baseline to the alpha line and stop carrying code that only
exists for older hosts (no runtime compatibility layer, per AGENTS §4):

- peers/engines: 14 DSH peers and engines.dsh -> 0.2.3-alpha.2, Cordis ->
  4.2.0-alpha.1, group/include 1.2.0-alpha.1, schemastery 3.20.0-alpha.1;
  dev pins and CI/e2e/install scripts move with them; plugin version
  0.34.0-alpha.0.
- admission: DSH 0.2.3 deleted `requestRejection`, so only the injected
  `connection.authentication` provider can call `admit`; the legacy branch
  and the direct-admit fallback are gone and the fence fails loudly.
- directory events: the projection authority is `workspace-root/change`;
  the side-chat cwd stamp emits it and the worktree scan no longer reads
  the retired `working-directory/change`.
- llm types: `@deepseek-ai/dsh-llm` no longer exports `./brand`, so
  MessageId comes from `./types`.
- client anchors: only `[data-slot="main.conversation"]`; the alpha.1
  `conversation` key is retired. `webServer.getOrigin` is called directly.

Gates: peers check, typecheck, lint, test (366 files / 4615 passed),
build, check:consumer-types.
2026-11-25 01:03:57 +08:00
Menghuan1918 6f9dbdf403 refactor(ui): 补三处组件层缺件并记入收敛文档
- 新增 FileAttachmentChip:非交互的静态文件附件卡(宿主 FileTypeIcon + 名称 + 大小 +
  可选 title),补上 B2 报告的「附件卡在 SidechatAttachments 与 SideChatView 各手写一份」。
- StatusLine 的 role 扩到 'status' | 'alert',让失败行可以中断式播报,默认行为不变。
- ListRow 增加 disabled 与 aria-expanded / aria-controls / aria-label 直通:disabled 落
  disabled + data-disabled,aria 落标题按钮(plain 行落外壳),供可折叠分组头使用。
- 契约测试:FileAttachmentChip 2 例、ListRow 2 例、StatusLine 1 例。
- docs/plans/2026-11-25-ui-kit-convergence.md 追加「组件层补件记录」,写明缺口来源、
  补了什么、以及合并后需要切换的消费点。

门禁:typecheck / lint 无错;test 366 文件、4630 通过、18 skipped。
2026-11-25 01:01:36 +08:00
Menghuan1918 fd13838b09 refactor(ui): 统一组件层地基与批次规划
- 新增 DownloadLink(kit.tsx)与 FallbackPane(patterns.tsx),从 ui/index.ts 导出;
  样式只用 --dsw-* / --ds-* 令牌,覆盖下载出口与 pane 级兜底消息两个跨页面模式
- 示范替换孤儿标签页占位组件(改用 FallbackPane role="status",文案与类型 chip 不变)
  与 binary-download(整页 FallbackPane + DownloadLink),删除 binary 独占的
  .editorBinary / .editorBinaryNotice 规则
- tests/ui-kit.spec.tsx、tests/ui-patterns.spec.tsx 补两个新组件的契约:
  download 属性、inline 变体、role 只在调用方要求时透传
- docs/plans/2026-11-25-ui-kit-convergence.md:36 个未接入 tsx 的 A/B/C 分类与
  B1–B4 批次(任务/作业 → 侧边对话 → 标签页与预览宿主 → 文件树与侧栏外壳)
2026-11-25 00:55:07 +08:00
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 cea6282cec fix(rebase): keep the 0.33.0 surface and adapt to dev's newer host contracts 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 3bb884db1b test(clues): rebuild the clue suite down to 18k lines, keeping each contract 2026-11-24 16:43:27 +08:00
Menghuan1918 f082166211 feat(clues): list individual pull request checks from the detail read 2026-11-24 16:43:27 +08:00
Menghuan1918 891974c4a5 feat(clues): auto-check an authorizing device-code attempt at the CLI cadence 2026-11-24 16:43:27 +08:00
Menghuan1918 bcc0efa917 feat(windows): clue windows open docked in the right sidebar when a session is available 2026-11-24 16:43:27 +08:00
Menghuan1918 efbc21d65c refactor(i18n): ship only the official host languages, drop the better-locale override
Dictionaries now follow the host's own locale list: zh/en static, ja/de/es/fr/pt/ru
in the lazy locale chunk (new es dictionary). t() reads the host's active locale
directly (exact id, base language, then en); attachBetterLocale and the optional
@huanlin/dsh-plugin-better-locale peer are removed along with the 14 non-official
dictionaries.
2026-11-24 16:43:27 +08:00
Menghuan1918 594d75cd13 refactor(clues): settings facts, errors and empty state use the shared components
Dependency, plan, install and connection rows are FactRows (with a trailing
action seat and data-* passthrough); source-list failures are ErrorBlocks;
the empty catalogue is an EmptyState. Drops the settings sheet's dead rules.
2026-11-24 16:43:27 +08:00
Menghuan1918 3af5dd0a9c refactor(clues): pack, detail and Feishu windows use the shared components
Pack footers, conflict/binding/add errors and empty states; detail failure
and footer actions (ActionButton); Feishu task/doc fields and save rows.
Field and ActionFooter pass data-* through for e2e locators. Drops the
window sheets' now-unreferenced rules.
2026-11-24 16:43:27 +08:00
Menghuan1918 2f99b1ffea refactor(clues): tab states, scope fields and pins use the shared components
Catalogue/pin/refresh/search errors are ErrorBlocks (a busy retry stays
focusable via aria-disabled); idle/needs-scope/unsupported/no-workspace
states are EmptyStates; scope editor fields are Fields with real htmlFor;
pinned rows are ListRows. Drops 50 now-unreferenced clue-tab rules.
2026-11-24 16:43:27 +08:00
Menghuan1918 cff412f554 refactor(clues): windows use the shared field/choice/error/footer components
ChoiceCard renders a fieldset so a busy window locks every option natively;
ActionFooter gains a bleed mode for gutter-padded window roots and a status
seat for its leading fact.
2026-11-24 16:43:26 +08:00
Menghuan1918 0edd9e9e81 refactor(clues): browse and pack rows use the shared row/state components
The pack shelf and the browse results each carried their own row shell, their
own empty state and their own error+retry line. They now share ListRow,
EmptyState and ErrorBlock, and the local copies are gone.

ListRow grew the two contracts those callers actually need:
- titleLabel so the accessible name can be "Manage pack: X" while the visible
  title stays "X";
- primary so the roving-focus marker (data-list-primary + its tab stop) lands
  on the title button, which is what useListNavigation focuses;
- a navigating row keeps name + subtitle inside that button, so the whole
  two-line caption is one click target and one accessible name.

Removed from clues-tab.module.css: the .packRow/.packOpen/.packGlyph/
.packName/.packMeta/.packCount/.packReference family plus the two coarse-
pointer orphans left behind. tests/clues-tab-css.spec.ts now asserts that
contract against the shared patterns sheet, where the rules actually live.
2026-11-24 16:43:26 +08:00
Menghuan1918 9056ea2c7c feat(ui): shared page-pattern layer (facts, rows, states, fields, choices)
The clue surface carried 31 hand-written fact rows, 14 list-row shells, 10
empty states, 14 error+retry blocks, 15 stacked fields, 6 choice groups, 11
status footers and 9 action bars — 968 lines of CSS in ten near-identical
families that had already drifted apart (four spellings of the retry row,
three different "selected" pictures).

These eight components own those shapes once, on the same token-only contract
as the global kit: flat fills, one 1px border language, no shadow, no resting
state painted, native keyboard semantics (a navigating title is a real
<button>, a choice is a real <input>), tabular figures, 44px touch targets.

patterns.module.css joins the theme guard and the host-token guard; the new
spec pins the contract structurally (default states unstyled, native controls
preserved) rather than cosmetically.
2026-11-24 16:43:26 +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
蔡少毅 089246e660 fix(host): 0.2.3 的 admit 需要注入 connection.authentication
DSH 0.2.3 起 Connection.admit 把凭据校验委托给嵌套服务
connection.authentication,而 cordis 只允许显式注入该服务的调用方读取它。插件
此前只注入 connection,admit 一被调用就抛 cannot get property
"connection.authentication" without inject,又被宿主兜底成空 body 的 400:底部
终端 chunk 加载、打开文件、侧边对话全部只剩 HTTP 400。

准入改为三级:requestRejection 存在时照旧;否则走
ctx.inject(['connection.authentication']) 子 fiber 里的 admit(0.2.3+ 的宿主
在这里能读到凭据校验器);再否则直接 admit。rc.2–rc.5 没有该嵌套服务,子 fiber
不激活,旧宿主行为不变;不重建信任表,无准入路径时仍直接抛错。

测试:tests/trusted-hosts.spec.ts 新增 0.2.3 形状——插件上下文调用 admit 抛
inject 错误、经注入的 provider 上下文裁决——覆盖放行 / 401 / 403 三档。

AI-Co-Authored-By: lead
2026-11-24 11:59:08 +08:00
hairyfbot 3be1065d54 test(e2e): 真实宿主断言关闭按钮常驻 Tabs 行最右侧(#991)
git-graph 用例在「提交详情」页签上断言面板只有一个关闭按钮、它挂在 Tabs 那一行(tablist 的父行)末尾,切到「差异」后仍在同一行,点击它关闭整块面板。
2026-11-21 17:55:11 +08:00
hairyfbot 4a6c1bd880 fix(changes): Git 详情面板的关闭按钮常驻 Tabs 行最右侧(#991)
底部面板的「提交详情 / 内容 / 差异」是一条 Tabs,但关闭整块面板的 X 原先画在「内容 / 差异」的页内头行上——切到「提交详情」时那条头行整块不渲染,于是该页签没有关闭入口,只能先切页签再点 X。

现在关闭按钮属于 Tabs 那一行:无论选中哪个页签都停在最右端、位置不变,点击关闭的是整块面板;「内容 / 差异」头行里重复的 X 已移除。只有一个视图、没有 Tabs 行的预览保持原来的头行位置。
2026-11-21 17:45:14 +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 ddcd435f5f Merge pull request #1236 from omdsh-dev/fix/changes-lens-underline-tabs
fix(changes): 「Git / 本轮文件」切换恢复会话页的下划线 Tabs
2026-11-21 14:02:57 +08:00
hairyfbot 3f0f7c37e3 fix(changes): 「Git / 本轮文件」切换恢复会话页的下划线 Tabs
#1101 为摆脱宿主私有哈希类名(#1098)改用公开的 SegmentedControl,视觉随之退回灰底胶囊;#939 已按审阅意见改成官方会话页的下划线 Tabs,这一版把它丢了。

现在这条切换由插件自己的 changes.module.css 绘制:13px/500、未选中三级文字、选中态品牌色 + 2px 下划线压在页头分隔线上、24px 间距,ARIA 关联与左右方向键 / Home / End 漫游焦点照旧;不引用任何宿主私有类名。

Refs: #1235
2026-11-21 13:38:58 +08:00
Hairy a543cd257b Merge pull request #1233 from WinterXMQ/fix/sidebar-fullscreen-bottom-panel
fix: 侧边栏全屏时自动收起底部工作台
2026-11-21 12:58:15 +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
Hairy be0b5a3142 Merge pull request #948 from hairyf/fix/task-graph-square-control-items
fix: square task graph control items
2026-11-21 12:54:29 +08:00
hairyfbot ea8ee92527 test(baseline): CI 宿主钉版跟随 engines.dsh 到 rc.3
ci.yml 的宿主钉版已由维护者改为 0.2.2-rc.3,dsh-baseline 的 CI 断言从 dev 钉版
常量 baseline 换成运行侧常量 hostBaseline,与 e2e / 安装脚本同一来源。
2026-11-21 12:00:00 +08:00
hairyfbot 6024337a73 fix(host): 准入改用 admit 兜底,运行侧钉版抬到 rc.3
DSH 0.2.2-rc.3 之后官方删除 connection.requestRejection(升级指南写明用 admit
替代),插件此前每个请求第一句就抛 TypeError,被宿主兜底成空 body 的 400。
fence 改为:requestRejection 存在时照旧调用,缺席时改调 admit 读同一个
rejection 字段,两者都没有仍抛 TypeError,不重建信任表。

engines.dsh 已要求 rc.3,因此把真正运行插件的钉版同批抬到 rc.3:CI 的
npm install -g、e2e-common.sh 的 DSH_NPX_SPEC / expected、两个独立安装脚本的
npx 回退。dev 钉版与 14 条 peer 仍是 rc.2(rc.3 与本插件消费面无 API 差异),
tests/dsh-baseline.spec.ts 相应拆成两个常量。

关联 #1204。
2026-11-21 11:54:00 +08:00
WinterXMQ a5046aae12 fix: 侧边栏全屏时自动收起底部工作台 2026-11-20 23:09:51 +08:00
Menghuan1918 09b01dd67e feat(sidechat): render PTC run_code sub-call rows
Fold the log-only PTC pair (tool/ptc-dispatch-start + tool/ptc-dispatch) into nested sub-call rows on the run_code transcript row. Sub-calls render indented below the root (outside its disclosure, so a collapsed root still shows them) through the same terminal/diff/read/search/web cards as direct calls; running, failed and start-less dispatches are covered. The run_code line shows the model description and its expanded body shows the program plus the final result. Successful PTC write/edit targets join the clickable path mentions; a PTC present keeps its top-level delivery card and also leaves a sub-call row. Tests: sidechat-ptc-rows, sidechat-ptc-subcalls, sidechat-mention-sources.
2026-11-18 16:56:36 +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
xucl 416e20d292 fix(git): re-spell the linked worktrees a WSL repository lists
`git worktree list` prints the same POSIX spelling as `rev-parse
--show-toplevel` when it runs inside the distribution, so in a WSL workspace
every linked checkout arrived as `/home/...`. That broke the worktree selector
in two ways at once: `current` compared a POSIX entry against the now-UNC
current root and never matched (so no checkout was marked as the current one),
and `resolveWorktree` handed the POSIX entry back as a command target, which
the Windows git then refused.

Re-spell in `listedWorktrees()`, the single place both the inventory
(`worktrees()`) and the selector (`resolveWorktree()`) read from.

Refs #1189
2026-11-18 00:07:48 +08:00
xucl 2c7c0cba22 fix(git): keep the UNC spelling of a WSL repository root
`rev-parse --show-toplevel` runs INSIDE the distribution (wslLaunch), so it
names the repository with a POSIX path — `/home/me/repo` for a
`\\wsl.localhost\Ubuntu\home\me\repo` cwd. wslLaunch only recognises the UNC
spelling, so every later command on that root fell through to the Windows git
and died with `cannot change to '/home/me/repo'`: `git.status`, `diff`, `log`,
`blame`, `stage` and `commit` all resolve their base through
`repoRoot()` → `runGit(root, …)`, so the whole Git panel read as "failed to
load" while the file tree and the editor stayed fine.

Re-spell the reported root through the cwd it was discovered from. The
function reproduces the share the cwd arrived on (`wsl.localhost` or the
legacy `wsl$`), which is why WSL_UNC_ROOT now captures it; wslLaunch reads the
same groups, so there is still one spelling of the UNC shape in this file.

Refs #1189
2026-11-18 00:07:48 +08:00
Menghuan1918 ddfcb67017 fix(client): mint tab ids without crypto.randomUUID (closes #1166)
Side Chat and the bottom terminal called crypto.randomUUID() unguarded. In an insecure context — a GUI served over plain http:// on a LAN address — that throws, so the host left a dead data-slot-error instead of a tab. Mint both ids through one local freshId() helper: randomUUID when available, otherwise a base36 timestamp plus two getRandomValues draws (getRandomValues is exempt from the secure-context restriction). The helper stays internal; the public service surface is unchanged.

The regression test drives the real built-in createTab factories with randomUUID removed and checks unique ids plus a non-empty meta[INSTANCE_FIELD].
2026-11-18 00:07:48 +08:00
Menghuan1918 58cf84b733 fix(settings): re-show a start-page card with an explicit false (#1212) 2026-11-18 00:07:48 +08:00
Menghuan1918 c337adbbf7 fix(client): apply side-card prefs that arrive after the boot timeout (#1159) 2026-11-18 00:07:48 +08:00
Menghuan1918 62a9ceeed5 fix(editor): keep a single very long line out of the edit buffer (closes #1165) 2026-11-18 00:07:11 +08:00
Menghuan1918 da13770e35 fix(editor): offer find when the host owns the header (closes #1214) 2026-11-18 00:02:24 +08:00