Commit Graph
1436 Commits
Author SHA1 Message Date
HuanLinOTO aa82c4aed7 fix(train): #697 测试 harness 适配 #776 的 mounted 观测——会话列表从来沒有 current 字段(AGENTS §3.4.9) 2026-10-01 17:25:16 +08:00
HuanLinOTO 84d89067d4 Merge PR #696 (ported): fix(editor): 打开文件先问原生 tab 注册表,被认领的类型不再被硬编码 editor 顶掉(移植到 sidebar-file.ts 新载体,Fixes #695 #643)
# Conflicts:
#	src/client/EditorHost.tsx
2026-10-01 17:22:00 +08:00
HuanLinOTO 4836e25aad fix(train): 合车适配——#730 图标改用改名后的 IconPanelLeftOutlineRegular;#736 测试适配 #776 按会话记账签名 2026-10-01 17:21:42 +08:00
HuanLinOTO 56567b3c4d fix(editor): 打开文件先问原生 tab 注册表,被认领的类型不再被硬编码 editor 顶掉(#696 移植到 sidebar-file.ts 新载体,Fixes #695 #643) 2026-10-01 17:21:10 +08:00
HuanLinOTO 37fb9204b0 fix(paths): ~ 是主目录路径而不是会话相对路径,展开后再解析(Fixes #713,随 Phase 2 路径簇顺带修) 2026-10-01 17:20:06 +08:00
HuanLinOTO 3345b72699 Merge PR #744 (extracted): fix(paths): 识别 remote-mirror 工作区命名空间投影(#788 #703;html-cwd 半边已由 d71261ac 覆盖) 2026-10-01 17:18:49 +08:00
HuanLinOTO 0f9c7578c0 Merge PR #677 (ported): fix(files): 目录级别加载失败不再被当成缓存命中,自动加载路径可重试(移植到 loadLevels 新形状) 2026-10-01 17:18:49 +08:00
HuanLinOTO 4aaead5b74 Merge: 补齐第三语言词典缺键(i18n 门禁修复,BUG-FIX-261001 附 E 第 2 条) 2026-10-01 17:18:42 +08:00
HuanLinOTO d23bbde0f7 Merge PR #769: fix(open-external): support Termux (platform android) openers 2026-10-01 17:18:31 +08:00
HuanLinOTO 470ff579a2 Merge PR #730: fix: match bottom toggle to the native outline panel icon 2026-10-01 17:18:31 +08:00
HuanLinOTO 356c3b1dbc Merge PR #682: fix(trust-fence): 允许 bfcache 恢复的图片带过期 cross-site 标记(PNG 预览空白修复)
# Conflicts:
#	tests/trusted-hosts.spec.ts
2026-10-01 17:18:31 +08:00
HuanLinOTO a749b20b68 Merge PR #797: fix(ws): WebSocket 路由改用壳注入的 transport base + 接受桌面壳页面 origin(0.2.0-rc.1 / v0.24.1 基线) 2026-10-01 17:18:19 +08:00
HuanLinOTO e4cf2fd034 Merge PR #763: fix(state): 拖动窗格内最后一个 tab 到自身边缘不再直接丢失该 tab 2026-10-01 17:18:09 +08:00
HuanLinOTO a5c3befc57 Merge PR #664: fix(diff): 二进制/纯重命名/仅改模式的文件行补回路径,并关掉 git 路径 C 转义 2026-10-01 17:18:09 +08:00
HuanLinOTO 65eb0957fb Merge PR #665: fix(diff): 头部 +n/−m 改为 git 口径,一处改写不再两侧各计一次 2026-10-01 17:18:09 +08:00
HuanLinOTO 784b7cf9fb Merge PR #650: fix(editor): 「添加到对话」浮层透字——底色改用不透明令牌 2026-10-01 17:18:09 +08:00
HuanLinOTO b1c17af429 Merge PR #779: fix(markdown): render anchors without a stray close tag and keep <details> summaries as direct children 2026-10-01 17:18:09 +08:00
HuanLinOTO 8bf14268aa Merge PR #691: fix(sidechat): inherit the parent's CURRENT model selection, not its stale options snapshot
# Conflicts:
#	tests/sidechat-routes.spec.ts
2026-10-01 17:18:08 +08:00
HuanLinOTO 8c37a7e7df Merge PR #663: fix(sidechat): clear the child inbox after create — fork markers alone do not fence the runtime inbox
# Conflicts:
#	AGENTS.md
#	tests/sidechat-seed-validation.spec.ts
2026-10-01 17:17:57 +08:00
HuanLinOTO 5641c4342e fix(locales): 补齐 19 份第三语言词典缺失的 pluginMnemeName/pluginMnemeDesc(补 #726 遗留,修复 locales.spec) 2026-10-01 17:16:59 +08:00
HuanLinOTO e10510f29a fix(files): 在途层渲染 loading 行,消除新展开文件夹的空目录闪烁(#789 移植到 loadLevels 新形状)
移植 PR #789 的语义到 v0.24.1(98a446b)重写后的加载形状,原 diff 基于
已不存在的 loadDir 形状,不再适用:

- 核心条件原样保留:renderLevel 对「未请求」(undefined)与「在途标记」
  (loadLevels 非强制路径写入的 {} —— 无 entries 无 error)都画 loading
  行。修复前标记落进 entries ?? [] 渲染零行:展开新目录闪「loading →
  看似又折叠了 → 条目」,且首挂载的根层也是空体。settled 层必带 entries
  (不可读层另带 error),条件不会误伤真实数据。
- 原 PR 改在 per-level loadDir 请求时代;现形状 loadLevels 非强制路径先
  storeLevel(path, {}) 再发批量 fs.trees,在途标记形状未变,故只需渲染
  侧一处扩展,加载逻辑零改动(force 路径保留旧行的语义不受影响)。
- 测试 tests/file-tree-loading.spec.tsx 随形状移植:原版 gate 住单层
  fsTree 路由,现 gate 住批量 fsTrees 的 { levels } envelope;并按真实
  用户流拆成两批——先挂载根层、落地后再展开子目录触发第二批(批量语义
  本身由 file-tree-batch-load.spec.tsx 单独守护)。三个用例语义不变:
  展开期间 loading 行不消失、真空目录渲染零行不卡 loading、整批失败出
  错误行。判别性验证:回退修复后前两用例红(错误路径用例两态都绿,它
  守护边界而非本次回归)。
- 原 PR 未新增词典 key(复用既有 t('loading')),本次同样零词典改动,
  无需触碰 19 份第三语言词典。
- 全套件对照:改动前后均 1485 通过 / 6 失败;6 个失败(locales ja 缺
  2 key、plugin-meta 打包、tasks-model ×4)在干净 origin/main @1499502
  上同样复现,属 main 既有问题,与本提交无关。
2026-10-01 17:15:49 +08:00
HuanLinOTO b0c07c78fb Merge PR #742: fix(security): stop git operands parsing as options, and harden the API dispatch 2026-10-01 17:15:48 +08:00
HuanLinOTO 5ce98edcd0 Merge PR #733: fix(editor): never save a truncated read over the full file (#732) 2026-10-01 17:15:48 +08:00
HuanLinOTO e85ec684ac Merge PR #764: fix(fs): fs.write 改用每请求唯一临时文件,避免并发保存互相损坏
# Conflicts:
#	tests/smoke.spec.ts
2026-10-01 17:15:47 +08:00
HuanLinOTO 24a670c9e8 Merge PR #741: fix(security): sandbox SVG served by the media route 2026-10-01 17:14:59 +08:00
HuanLinOTO 002046cc47 Merge PR #655: fix(server): resolve session-relative paths in fs.write and fs.read
# Conflicts:
#	src/path-security.ts
2026-10-01 17:14:58 +08:00
HuanLinOTO 188fea0328 Merge PR #754: fix(preview): resolve workspace-relative paths against session cwd for HTML and media routes 2026-10-01 17:13:47 +08:00
HuanLinOTO ea76981c0e Merge PR #697: fix(native): 跨会话打开改为排队到上屏重放(Fixes #694)
# Conflicts:
#	src/client/native/surface.ts
2026-10-01 17:13:47 +08:00
HuanLinOTO 5256eef3ab fix(files): 目录级别加载失败不再被当成缓存命中,自动加载路径可重试(#677 移植到 loadLevels 新形状)
PR #677 was written against the pre-0.24.1 loadDir shape (one fs.tree per
directory): its error branch stored { error } in the level cache and the
cache-hit guard `dataRef.current[dir] !== undefined` treated that failure as
"already loaded", so the automatic load path never re-requested a failed
level; only the force path (refresh tick / fence-notice retry) recovered.

FileTree.tsx has since been rewritten around batched loadLevels (one fs.trees
POST for the visible set, commit 98a446b), but the bug survived the rewrite in
a new spot: BOTH failure branches now store an error in the same cache —
(a) a per-level `error` riding an otherwise-successful batch, and
(b) `{ error }` written by the whole-request catch for levels with no listing
    — and the non-force `wanted` filter (`dataRef.current[path] === undefined`)
counted both as cache hits.

Port, in current idioms:

- The non-force filter now admits a cached entry only when it carries no
  `error`: `cached === undefined || cached.error !== undefined`. The host
  guarantees a failed level never carries entries (fs.trees returns
  `{ entries: [], error }` in place), so `error` alone identifies "nothing
  usable cached" for both failure branches.
- The empty `{}` placeholder of an in-flight load is still a hit, so a
  re-render while a batch is open does not duplicate the request.
- The retry rides the batch route (wanted subset only; levels that DID list
  stay cached) and reuses the existing non-force flow, which stores `{}`
  first — same behavior the original fix gave loadDir.
- loadLevels' doc comment gains the "only a LISTING settles a level" rule.

Not ported: the original diff's comment wording about "the fence notice's
retry button" — that notice (and isOutsideWorkspaceMessage usage in the tree)
no longer exists in the current shape; recovery paths today are the refresh
tick and watch-notice/mutation re-lists, and after this fix any automatic
re-load of the expanded set.

Tests: tests/file-tree-level-retry.spec.tsx adapts the PR's spec to the
batched shape (fsTrees mock, batch-load-spec harness): (1) a per-level error
is re-requested as a batch of 1 on the next automatic load (with an added
assertion that an in-flight batch is NOT duplicated), (2) levels stored by a
failed whole request are all retryable. Both go red on the unfixed filter
(verified: "expected to be called 2 times, but got 1"). All 9 file-tree
suites (47 tests) and tsc --noEmit stay green.
2026-10-01 17:13:10 +08:00
HuanLinOTO 86ec5ccc75 Merge PR #736: fix(native): focus through the controller on surface.activate; carry meta on close
# Conflicts:
#	docs/external-plugin-guide.md
#	src/client/native/surface.ts
#	src/client/service.ts
2026-10-01 17:12:53 +08:00
HuanLinOTO 92ab1f83b8 Merge PR #776: fix(native): 按会话记账 + 宿主 keepMounted,原生 tab 状态不再跨切换丢失(#636 #661)
# Conflicts:
#	src/client/native/index.ts
#	src/client/native/tab-adapter.tsx
2026-10-01 17:12:10 +08:00
HuanLinOTO 4e02951fb5 Merge PR #662: fix(native): 文件 tab 图标不再依赖插件侧记录(Fixes #660)
# Conflicts:
#	src/client/native/index.ts
2026-10-01 17:11:37 +08:00
HuanLinOTO 84d93ba6ce Merge PR #718: fix(native): keep a link's url seed on the tab it opens
# Conflicts:
#	src/client/native/tab-adapter.tsx
2026-10-01 17:11:15 +08:00
HuanLinOTO 249968f48c fix(paths): 识别 remote-mirror 工作区命名空间投影(#744 摘取 remote-mirror 半边,#788 #703)
摘取 PR #744 中 remote-mirror 命名空间投影这一半:resolveSessionPath 在
win32 上识别 dsh-remote 镜像会话的 cwd(<home>\.dsh\remote-workspaces\
<host-key>\<workspace>),读取镜像根的 .dsh-remote-meta.json 拿到远端
POSIX 工作区路径(mtime 失效的同步缓存),把命名空间下的远端绝对路径
(/srv/app/src/a.ts)投影到本地镜像目录(mirrorRoot\src\a.ts)——否则
win32 把它盘符根化成 C:\srv\... 导致交付物 ENOENT(#788 / #703 的
Windows 远程会话症状)。只投影落在远端工作区内的路径;区外路径
(/etc/hosts)刻意不投影。无元数据/元数据损坏/非 POSIX remotePath 时
一律放行原路径,不破坏请求。

相对 PR 原版的基线适配:main 的 path-security 重写已删除工作区围栏
(resolve-only),因此「区外路径不投影」的后果从「403 containment 拒绝」
变为「保持斜杠根化 → resolve() 盘符根化 → stat 失败报缺失本地文件」,
文档与测试注释已按此改写;投影决策本身不变。

明确丢弃的另一半(html 路由 cwd hint + $c/$r marker + media 路由
resolveWorkspaceRelative + intercept.tsx 取 cwd):
- cwd hint 半边已被 main 的 d71261ac(PR #372)缓解——sessionCwdOf 现有
  header → clientCwd → persistence → process.cwd 回退链,覆盖 detach 场景;
- resolveWorkspaceRelative 与 main 的 resolveTarget 语义重复(后者已把
  会话相对目标 join 到 cwd);
- src/client/intercept.tsx 在 main 上已整体删除(turnTail 交还宿主);
- path-security 报错文案子改动随 5c95002 重写失去载体。
PR 中的 html-route / paths / sandbox-views / smoke 测试改动同属该半边,
一并不取。html 路由 clientCwd 入口仍缺(#819,另由 #754 客户端侧覆盖),
不在本提交范围。

测试:tests/session-path.spec.ts 移植 dsh-remote mirror describe 块
(10 例:区内/根/嵌套会话投影、区外与同名前缀不投影、dot 段归一、盘符
路径保留、无/坏元数据放行、非 win32 不重释),18/18 绿。
2026-10-01 17:10:47 +08:00
HuanLinOTO 931215f08f Merge PR #700: fix(client): report a rejected sidebar sync instead of failing silently 2026-10-01 17:08:55 +08:00
HuanLinOTO b47fb12457 Merge PR #652: fix(state): contain a throwing store listener instead of blanking the sidebar 2026-10-01 17:08:18 +08:00
ymac 0a83d671e5 docs: the post-merge division of labour for native tab state
Merging main moved the expansion set into the plugin store's session state
(`5c95002`: `attachStore` / `syncExpanded` / `getSessionStates().expanded`), which
was this branch's other half. Record the split so the next reader does not try to
keep two authorities: the STORE owns the expansion set, the RECORD owns identity
(`sessionId::tabId`) and lifetime (no `drop` on unmount), and `keepMounted` is
what makes both survive a tab or Conversation switch.

- `AGENTS.md` §3.4 item 9: three facts instead of two — (c) is the store authority.
- `docs/plans/2026-09-25-…md`: the merge note, plus the earlier attribution note
  that the `FILES_KIND` guard came from #777.
2026-10-01 16:47:43 +08:00
ymac 4f57cf886e test(e2e): read the on-screen seat from the visible panel, not any seat
The lane's `onScreenSession` walked every `[data-sidebar-right-session]` element
and took the first without a `hidden` attribute. On 0.2.x the host marks BOTH
each RETAINED seat (one per Conversation stays in the DOM) AND each seat's panel
with that attribute, so the walk could name a background Conversation and the
A → B → A round trip failed on `selectConversation` (real mount lane: expected
`session-eeb1…`, read `session-b8e4…`, 60s timeout).

Read the panel that is actually laid out (`[data-sidebar-right-panel]:visible`) —
the same `:visible` convention the rest of this lane already uses — and keep a
visible-seat fallback. Mount lane: 10/10 (was 9/10).
2026-10-01 16:47:43 +08:00
ymac d1c8208d56 Merge origin/main (v0.24.1, DSH 0.2.0-rc.1) into fix/native-tab-state-retention
Two conflicts, both in the native tab adapter's per-session work — main's
`5c95002` moved the expansion set into the plugin store's session state while
this branch moved the RECORD identity to `sessionId::tabId`:

- `src/client/native/tab-adapter.tsx`: keep main's store-backed expansion as
  the authority (`attachStore` / `syncExpanded` / `getSessionStates().expanded`)
  and this branch's seat-scoped identity (`views` keyed `sessionId::tabId`,
  `get/has/update/drop/versionOf/retain` take the seat session). `toggleExpanded`
  keeps main's active-`reduce` / background-`reduceFor` split, but locates the
  record by its seat and writes the SCOPE session's set — the set every view of
  that session mirrors.
- `tests/native-surface.spec.ts`: main's five expansion cases adapted to the
  session-scoped API (seat session on `ensure`, two-arg `get`/`drop`, seat on
  `toggleExpanded`); the branch's cases now bind a store before toggling, since
  expansion no longer lives in the record itself.

The `files` takeover guard and its registration invariants come from
main; this merge drops the branch's duplicate.
2026-10-01 16:37:35 +08:00
HuanLinOTO 8c17648962 fix(tabbar): rightActions 按 review 修复 + 回归测试
逐条解决 Copilot review 的 6 条 findings:

1. 空结果不挂载 wrapper:TabBar 先解析 rightActions 节点,
   null/undefined/false 直接不渲染容器(空容器是 flex item,
   会改变所有既有 tab 栏的布局)。
2. resolver 传入 tab/paneId:签名扩为
   (ctx, scope, state, tab, paneId)——single:false 且有分栏时同一类型
   可同时开多个实例、每个 pane 各渲染自己的 tab 栏,工具栏操作必须
   能定位到正确实例;paneId 与 state.activePane 比较可知聚焦 pane。
   API 未发布(本 PR 新增),签名可直接演进。
3. CSS 不再等分:.tabBarRightActions 由 flex:1 改为 0 1 auto
   (内容定宽、可收缩裁切),.tabList 独占剩余空间——等分会让
   极小的工具栏砍掉 tab 滚动区一半宽度。
4. split 递归转发:NodeView 的递归调用补上 getTabRightActions
   (此前 bottomSplits 一旦是 split,所有子 pane 的 resolver
   全部丢失,工具栏静默不渲染)。
5. 指南 §7 canonical features 清单补 'rightActions'。
6. 新增 tests/tab-bar-right-actions.spec.tsx(5 用例):节点渲染
   位置与参数、跟随活跃 tab、null/无 resolver 不挂载、嵌套 split
   树逐 pane 转发(已做变异验证:删掉递归转发该用例即红)。
2026-10-01 16:03:14 +08:00
多玩幻灵qwq 1499502bfa Merge pull request #726 from Awoodwhale/feat/plugin-catalog-agent-persona
feat(catalog): 推荐目录新增 dsh-agent-persona(人设 Tab)
2026-10-01 15:24:07 +08:00
HuanLinOTO 2cbdf25594 Merge branch 'feat/plugin-catalog-agent-persona' into main (catalog train) 2026-10-01 15:23:42 +08:00
多玩幻灵qwq 84dbee585a Merge pull request #723 from lpf20200901/feat/plugin-list-dsh-memory-delta
feat(plugin-list): add dsh-memory-delta to the recommended tab catalog
2026-10-01 15:22:57 +08:00
HuanLinOTO 3b233ceee4 Merge branch 'feat/plugin-list-dsh-memory-delta' into main (catalog train) 2026-10-01 15:22:37 +08:00
多玩幻灵qwq 975d51d92d Merge pull request #714 from OrangeX4/feat/add-tylina-tab-catalog
feat: add Tylina tab plugin to catalog
2026-10-01 15:21:22 +08:00
HuanLinOTO afd96632d1 Merge branch 'feat/add-tylina-tab-catalog' into main (catalog train, includes train-breakage repair) 2026-10-01 15:21:04 +08:00
多玩幻灵qwq 084677665a Merge pull request #810 from xlennart/codex/register-dsh-side-chat
docs: register dsh-side-chat in the tab catalog
2026-10-01 15:16:15 +08:00
多玩幻灵qwq 32812f3f44 Merge pull request #795 from OMSociety/feat/omsociety-plugin-entries
feat(plugin-list): 把 dsh-git-forge 与 dsh-ssh-tunnel 两条指向维护中的仓库与 npm 包
2026-10-01 15:15:48 +08:00
多玩幻灵qwq d99d42acce Merge pull request #711 from Lukeknow0/main
docs: add Markdown output link preview plugin
2026-10-01 15:15:21 +08:00
多玩幻灵qwq 7c32c110f2 Merge pull request #688 from KannaKuron/feat/plugin-entry-dsh-ide-git
feat(catalog): add dsh-ide-git to the tab plugin catalog
2026-10-01 15:14:55 +08:00