Atlas Zeng
5cf7768dbb
Merge pull request #842 from UNscientific-9/fix/checkout-end-of-options
...
fix(git): checkout 的分支名不再被当成选项(补 4100e16 漏掉的那处)
2026-10-05 01:25:51 +08:00
Atlas Zeng
d3df20e8c9
Merge pull request #837 from dat-lequoc/fix/editor-visibility-remeasure
...
fix(editor): remeasure parked CodeMirror views
2026-10-05 01:25:36 +08:00
Andrei Sviryd
7599d4ac02
fix(ime-guard): trust keyCode 229 only inside a live composition context
...
Synthetic 229 keydowns emitted outside any IME (layout-switcher
utilities, e.g. KeyRay's layout swap: backspaces + one keydown carrying
the whole converted word via CGEventKeyboardSetUnicodeString, which
Chromium reports as keyCode 229 / isComposing=false) were swallowed by
the document-capture guard, so only the backspaces landed and the
replacement text silently disappeared.
Now the legacy 229 signal is trusted only while a composition is live,
plus a 50ms grace window after compositionend (covers legacy engines'
closing 229 keydown with isComposing === false, e.g. Safari). Real IME
composition keys (isComposing === true) are unaffected.
2026-10-04 20:16:44 +03:00
Menghuan1918
aa2644befa
test(sidechat): 钉住畸形 assistant content 不抛错(#557 移植)
...
PR #557 的实现部分已被主线的 src/assistant-live.ts 取代,但它新增的这条
用例有独立价值:守 src/sidechat-core.ts 的 messageTexts / resultBlocks 三道
守卫——单条畸形行(content 非数组、message 缺 content、block 非对象、text
非字符串)不得让整个 open-turn 快照变空。
按原样移植,**不**带上该 PR 同时删掉的两条回归用例(producer round-trip /
LEGACY 0.1.6-wrapped),那两条在 dev 上是通过的。
Refs #557
Co-authored-by: later0day <later0day@users.noreply.github.com >
2026-10-05 00:56:36 +08:00
Menghuan1918
d35f622e66
merge dev into fix/host-load-without-session-log-offset-runtime
...
# Conflicts:
# src/sidechat-routes.ts
2026-10-05 00:55:34 +08:00
Atlas Zeng
00801f5289
Merge pull request #818 from btsd321/feat/tabbar-right-actions
...
feat(tabbar): 新增 TabDescriptor.rightActions,活跃 tab 可注入 tab 栏右侧操作区
2026-10-05 00:54:50 +08:00
Atlas Zeng
e864dabe6f
Merge pull request #814 from ZinChl/fix/tasks-fold-guards
...
fix(tasks): 任务页折叠守卫的三处不一致(根卡死控制 / run 成员绕过 leaf 测试 / 文档矛盾)(#784)
2026-10-05 00:54:34 +08:00
Atlas Zeng
c571e96c65
Merge pull request #813 from ZinChl/fix/subagent-running-after-restart
...
fix(tasks): 会话「驻留」不再当作「agent 在跑」——崩溃重启后的子代理状态(#800)
2026-10-05 00:54:18 +08:00
Atlas Zeng
c7980cee7c
Merge pull request #811 from ZinChl/fix/fs-trees-batch-split
...
fix(files): fs.trees 按宿主上限分块,展开集 ≥64 的会话不再整树报错(#799)
2026-10-05 00:53:58 +08:00
Atlas Zeng
ce3527ca1e
Merge pull request #809 from ZinChl/fix/archive-status-session-scope
...
fix(files): 修「压缩并下载」必然失败——archive.status 缺 sessionId + ready 交接无护栏(#798)
2026-10-05 00:53:43 +08:00
Atlas Zeng
40f0255ad0
Merge pull request #807 from graydovee/fix/blank-session-bottom-entry
...
fix(client): 空白新会话里恢复「打开底部工作台」入口(#698 / #623)
2026-10-05 00:53:27 +08:00
Atlas Zeng
10e99dba7e
Merge pull request #806 from ZinChl/fix/search-result-directory-click
...
fix(files): 搜索结果里的目录行改为导航文件树,不再当文件打开(#801)
2026-10-05 00:53:09 +08:00
unsc9
9c248d0933
fix(git): checkout 的分支名不再被当成选项(补 4100e16 漏掉的那处)
...
`git.checkout` 把调用方给的分支名当裸操作数拼进 argv,所以 `-f` 被 git 的选项解析器吃掉,直接强制覆盖工作区并丢弃未保存的改动(`--work-tree=…` 则重定向 checkout)。同批加固 4100e16 给 show / commitDiff / revert / cherryPick 四个兄弟调用都加了 `--end-of-options`,只漏了这一处。
实测(真实 git,临时仓库):加哨兵前 `checkout -f` 退出码 0 且未保存改动被覆盖;加哨兵后 `-f` 与 `--work-tree=…` 均被拒且改动保留,正常分支名照常切换。
回归用例:tests/git.spec.ts「never lets a branch operand reach git as an option (checkout)」。
2026-10-04 21:47:17 +08:00
LE Quoc Dat
db563ca76c
fix(editor): remeasure parked CodeMirror views
2026-10-03 20:54:00 +00:00
ymac
2c5b7621dd
fix(editor): 正文里 [path](path:131) 的链接去掉行号后缀再打开 ( #826 )
...
DSH 的 markdown 链接语法只认 GitHub 的 `#L131` 片段:目的地没有 `#` 时
`parseFileLink` 把整串当文件名返回。于是模型按编译器诊断的通用写法输出的
`[a/b.c](a/b.c:131)` 变成一次对 `b.c:131` 的文件打开,编辑器读不到、右侧栏
红字报「文件不存在」。
宿主源码不可改,纠正放在插件唯一把文件地址变成合成记录的那一步
(native/index.ts 的 fileParamsOf):尾部行号规格(`:行` / `:起-止` /
`:行:列`)在这里切掉,tab 标题按切完的文件名给(宿主用同一个字符串推导标题,
否则芯片上会写 `b.c:131`)。切完之后读、写、"打开方式"、去重、viewer 匹配
拿到的都是真实路径,所以没有需要重试或记住的状态。
切分规则与宿主的 `#L` 语法对齐:1 起、无前导零、锚在串尾(`data:2024.csv`
和盘符 `C:` 因此原样通过),并拒绝空前缀、只剩一个字符的前缀(`C:131`)和
倒序区间(`a.c:20-12`)。
取舍:从聊天链接打开一个真名以 `:数字` 结尾的文件会丢掉后缀。文件树 / 搜索 /
插件自有流程的路径不经过这一步(只有 `openResource` 的地址会),而 `:` 在
Windows 上本就不是合法文件名字符。
测试:新增 tests/path-line.spec.ts(9 例,含全部「必须原样通过」的反例);
tests/native-surface.spec.ts 补 fileParamsOf 四例 + editor 类型对带行号地址的
标题。typecheck / lint 全绿;全量 1503 passed,tests/locales.spec.ts 的 ja
词典缺 key 在干净 origin/main 上同样失败(既有问题,不在本 PR 范围)。
2026-10-01 22:05:56 +08:00
ymac
c0b66e11b1
fix(git): answer the dubious-ownership guard per command ( #690 )
2026-10-01 22:00:36 +08:00
HuanLinOTO
9cc40472f8
fix(paths): Copilot review 四条全修——共享解析契约贯穿 media/html/fs 变更入口
...
- html 路由 decoder 保留 ~ 首段原样(~/x.html 不再被拼成绝对 /~/x.html),
encoder/decoder 往返与相对资产解析均保持 ~ 标记(#713)
- media/download 路由去掉 isAbsolute 预拼接,raw 直达 ensureWorkspacePath
(~ 展开不再被 cwd 前缀遮蔽);fs.trees 同型守卫
- fs-operations 的 rename/remove/mkdir(resolveEntry)与 upload(base)全部
改走 resolveTarget 共享契约,会话相对路径四入口齐活(#646/#713)
- session-path 的 fs 落盘 remote-mirror 用例改为 Windows-only(win32.join 的
meta 路径拼写在 POSIX 上不指向已创建文件,修 ubuntu ci 红)
新用例 8 个;四处变异验证(还原任一修复对应测试必红)。
2026-10-01 18:41:27 +08:00
HuanLinOTO
0500aa045a
Merge PR #789 (ported): fix(files): 在途层渲染 loading 行,消除新展开文件夹的空目录闪烁(移植到 loadLevels 新形状,#693 #687)
2026-10-01 17:46:52 +08:00
HuanLinOTO
14320952be
fix(train): 清理 fs-write-relative-path.spec 的未用导入(lint)
2026-10-01 17:26:29 +08:00
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
d23bbde0f7
Merge PR #769 : fix(open-external): support Termux (platform android) openers
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
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
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
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
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
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