Commit Graph
963 Commits
Author SHA1 Message Date
unsc9 9f121ac600 fix(tasks): 编辑保存使用打开编辑时的 revision 快照 2026-11-06 12:38:22 +08:00
unsc9 9278ecf1d9 fix(editor): 保存期间继续输入保持脏标记与草稿备份 2026-11-06 12:38:22 +08:00
unsc9 5cdf7e0ea2 fix(git): 路径按字面匹配,防「丢弃改动」误伤同名文件 2026-11-06 12:38:22 +08:00
unsc9 47a7ffc888 fix(floating): 修正控件带通知与无带子时的布局偏差
viewport-inset 的快照原本是 { top } 对象,重读时每次新建,引用比较永远不等:
带子存在时每次 resize / geometrychange 都会广播,三个浮层各重渲染一次。改为
直接存数字,值不变就不通知。

AnchoredPopover 新增的让位原本无条件执行,普通浏览器里锚点贴到视口最顶时
弹层会从 6px 变 8px,与「无带子时逐字等价」的承诺不符。改为只在带子存在时
才抬高。

顺带删除 mermaid 工具栏里恒被内联样式覆盖的 CSS top(不跑 JS 时该弹层不存在,
不是降级),并补上测试:同值不广播、resize 兜底、visible 运行时翻转、浮窗
高度让位、AnchoredPopover 三个位置用例。

文档:接入指南的 WCO 例外改标「尚未发布」(v0.29.0 从未发布到 npm),计划
文档修正 #430 对照表与测试清单。
2026-11-05 13:16:39 +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
unsc9 a95c65c09c fix(tasks): 节点详情弹层同样避开窗口控件带
锚定弹层顶部下限也是 8px,锚点靠近窗口顶部时整张卡片的头部会落进原生窗口
按钮带。改用同一份控件带几何:锚点自身在带内时也向下退让,拖拽纵向下限同步。
2026-11-05 13:15:57 +08:00
unsc9 3939fe5b6e fix(floating): 任务详情浮窗的标题栏不再落进窗口控件带
浮窗顶部下限原本写死 8px,而自身标题栏高 34px,关闭键正好落在 Windows 原生
窗口按钮那条带子里,点击被原生层吃掉(elementFromPoint 仍返回按钮本身,所以
页面侧看起来正常)。改为 8px + 控件带高度,覆盖锚点定位、拖拽、resize 三条
路径;带子变大时把已摆好的窗抬出去,变小时不主动下拉(不移动用户摆好的窗)。

普通浏览器无 WCO 时 inset=0,与改动前逐字等价。
2026-11-05 13:15:56 +08:00
unsc9 4108e1544c feat(floating): 新增壳的原生窗口控件带几何
桌面壳用 Electron titleBarOverlay 在页面顶部画最小化/最大化/关闭,那条带子
的鼠标事件到不了网页(#805 已实测)。这里只读标准 WCO 几何作为唯一来源:
无 API、visible=false(幽灵接口)、0 高(全屏)、读取抛错一律退化为 0,
普通浏览器与网页版行为不变。

不写偏好、不加设置项、不发布 CSS 变量、不复活 #430 删掉的
--dsh-title-bar-strip / body[data-dsh-title-bar-compat]。
2026-11-05 13:15:56 +08:00
Menghuan1918 ad159053f1 fix(settings): 侧边卡片的导航图标改走 settings.section.icon 插槽(此前标记 + CSS 遮罩会叠出两个图标) 2026-11-05 00:55:17 +08:00
Menghuan1918 7ef1dfa989 fix(sidechat): 模型切换不再把 model/selection 记两次(0.2.2 的 AgentModel.select 自己落盘) 2026-11-04 22:20:41 +08:00
Menghuan1918 7a4a15292e chore(dsh): 适配 DSH 0.2.2-rc.1(基线/peer/CI/脚本/文档 + AgentModel 与 PTC 类型变化) 2026-11-04 22:13:07 +08:00
Menghuan1918 91a5d79f19 merge #1072/#1071: fix(editor) 原生页签关闭与桌面退出保留未保存草稿(宿主无确认钩子,改草稿备份 + 重开恢复)
# Conflicts:
#	CHANGELOG.md
#	CHANGELOG_EN.md
2026-11-04 21:06:04 +08:00
Menghuan1918 4224c78a98 fix(editor): 原生页签关闭与桌面退出保留未保存草稿(#1072 / #1071)
宿主原生页签条的关闭路径只有一个同步清理钩子(唯一的阻止方式是 throw,
会把异常抛给 replaceTab / 公共 close() 调用方),桌面 Cmd+Q 则完全在壳内
完成(before-quit → app.exitRequested),页面没有可取消事件;壳内也没有
will-prevent-unload 处理器。插件因此不伪造拦截,改为降低损失:

- 草稿变脏时按 1 s 节流把实时文档写入 localStorage(sessionId::path,
  单条 200k 字符 / 总计 600k / 最多 8 条 FIFO)
- 原生 registerCloseHandler('editor') 与 beforeunload 时立即 flush
- 重开同一文件提示恢复;保存、确认丢弃、确认刷新/换文件即删除备份

新增 src/client/editor-draft-backup.ts;docs/host-contracts.md §C 记录宿主
限制与将来的接法。测试:新增 editor-draft-backup.spec.tsx(8 例)+ guard
spec 2 例;去掉任一修复点后对应用例均转红。
2026-11-04 21:04:16 +08:00
Menghuan1918 45b4d42ef6 fix(sidechat): rebase inherited delivery watermarks in the compaction seed
A side thread opened while the parent was mid-turn could persist a child
session the host can never read again: SessionFormatError "delivery
throughSeq must precede its marker".

Root cause: when the parent has compacted, buildSidechatInheritance copies
the log around its last checkpoint with RENUMBERED seqs, but the inherited
session-log-deepseek/delivery-accepted watermark (throughSeq) is an
absolute seq. Left alone it keeps pointing at the parent's position and
can land at or after the marker's own new seq, which the v4 reader treats
as corrupt; the parent's includeDescendants export then fails with it.

The rebase now carries the watermark through the same map it applies to
every other seq citation, and drops the record when the watermark fell
inside the dropped span (there is no child-side equivalent). The verbatim
full-copy path is untouched — seqs are identity there, so nothing changes.

Tests: tests/sidechat-compaction-seed.spec.ts builds a compacted parent
carrying real delivery markers and asserts every surviving marker cites
the same earlier event the parent marked, while markers whose watermark
was trimmed away do not survive (red before the fix: throughSeq 15 for a
marker at seq 8).

Closes #1109
2026-11-04 20:59:08 +08:00
Menghuan1918 89b85a82a8 merge #1111: feat(sidebar) 划选引用 chip 可点击回跳源文件并闪行段(合入前修正:二次点击 nonce、落盘失败回退、注册契约与文档)
# Conflicts:
#	CHANGELOG.md
#	CHANGELOG_EN.md
2026-11-04 20:48:47 +08:00
Menghuan1918 45b538283d merge #1099: feat(sidechat) 支持粘贴/选中图片(合入前修正:大 body 才计入准入、宿主附件错误分类、文档与常量收敛)
# Conflicts:
#	CHANGELOG.md
2026-11-04 20:47:47 +08:00
Menghuan1918 90238e1cc2 fix(client): 引用 chip 二次点击仍跳转闪光,落盘失败回退内置 chip 2026-11-04 20:46:52 +08:00
Menghuan1918 68778b36a0 chore(sidechat): share image constants and drop the dead transcript helper 2026-11-04 20:45:25 +08:00
Menghuan1918 7780387820 fix(sidechat): gate image prompt admission and classify host failures
Only a prompt body past the 1 MiB metadata cap is counted toward the concurrent image admission limit, so plain-text prompts are never rejected; exceeding the cap answers 413 too-large instead of a retryable 503. admitPromptContent failures now route on the host attachment code: oversized images are 413 too-large, storage faults are 500 sidechat-error, both keeping the host message.
2026-11-04 20:45:22 +08:00
Menghuan1918 82921c78ab review(merge batch): Windows-only case fold for repo roots; changelog entries for #1101/#1110 2026-11-04 20:38:49 +08:00
Menghuan1918 85593d4769 merge #1112: feat(git) 容器工作区在 Git 面板顶部显示全部子仓库并可切换(#988 可见性后续)
# Conflicts:
#	CHANGELOG.md
2026-11-04 20:36:37 +08:00
Menghuan1918 5178cabcec merge #1101: fix(changes) 视角切换改用公开 SegmentedControl,删除对宿主私有 CSS 哈希类名的依赖(#1098) 2026-11-04 20:33:57 +08:00
Menghuan1918 f6008bdf65 merge #1110: fix 页面 CSS zoom 不再被误判为页面级 transform(panel host 几何自检按累积 zoom 归一) 2026-11-04 20:31:31 +08:00
Zabo f49bad2279 feat(git): show every child repository in the Git panel with a visible switcher
A container workspace (a project directory that is not itself a repository)
can hold several independent repositories. Discovery and `git.status`
already report all of them; the panel listed them only in the
"more actions -> repository" submenu, so nothing on screen said the others
existed and the body silently rendered repositories[0].

Render one chip per discovered root above the Changes section, mark the
root the panel is pinned to, and switch through the existing chooseRepo so
reads, mutations and the commit graph follow the selection. A single
repository workspace renders no row; the menu entry stays.
2026-11-04 16:55:51 +08:00
xiangzz 805a03f91f feat(sidebar): 划选「添加到对话」落可点击引用 chip(点击回跳源文件并闪行段)
- 移植到 dev 基线(#1052 / #1002 之上):只加「可点击 + 行段落地」,不重做 chip 本体
- 自有 input-trigger source `betterSidebarQuote`:`openReference` 校验会话后回跳,
  `codec.serialize` 在发送时还原成与升级前字节一致的 `路径:起止` + 围栏正文
- 行段末行走模块级一次性旁路 `src/client/line-target.ts`(key = path + line,cap 32),
  不写进宿主导航参数(宿主 `SidebarRightResourceParamsMap.file` 只声明了 `line`)
- 引用记录存 `localStorage`(`dsh-better-sidebar:quote-refs`,FIFO 200):模块同时进
  core bundle 与 lazy editor chunk,两个实例只能靠它互见;插入失败即回滚记录
- 行段闪光用 CodeMirror 行装饰 + 皮肤令牌 `--dsw-alias-interactive-bg-hover-accent`
- 三级降级:自有 chip → #1052 内置 chip → 纯文本,永不比升级前更差
- 新增 peer `@deepseek-ai/dsh-client-ui-input-trigger` `^0.2.1-rc.1`(DSH peer 增至 14 条)
- 文档:指南新增 §7.2,并补 `openFile` options / `FileViewerProps.lineEnd` / peer 说明;
  AGENTS §3、CHANGELOG 双语、README 双语、`docs/plans/2026-11-03-selection-quote-chip.md`
- 测试:`selection-quote` 23、`quote-flash` 13、`line-target` 7,`conversation-draft` +2
2026-11-04 01:47:15 +08:00
HootRock d3b887f179 fix: account for CSS page zoom in panel host geometry checks 2026-11-03 20:18:22 +08:00
WinterXMQ b9ae0024af fix(terminal): stop the bottom workbench terminal from painting black
The terminal area was a solid black rectangle inside a panel that was not,
which read as a surface the plugin had chosen rather than the emulator
showing through.

Two independent causes, both needed:

1. CSS Modules hashed xterm's own class names. `.screen .xterm-viewport`
   compiled to `.o8IiwG_screen .o8IiwG_xterm-viewport`, while the real DOM
   carries xterm's unhashed `.xterm-viewport` — the rule never matched
   anything. Wrapped in `:global()`.

2. xterm.css ships `.xterm .xterm-viewport { background-color: #000 }` and
   injects that sheet when `open()` runs, after this module. Matching its
   specificity (0,2,0) therefore loses on source order every time, so the
   selector climbs to 0,3,0 with the extra `.xterm`. Measured in Chromium:
   0,2,0 leaves `rgb(0, 0, 0)`, 0,3,0 resolves to `rgba(0, 0, 0, 0)`.

`.screen` itself also stops painting `--dsw-alias-bg-base`, which was a second
surface inside the panel.

No `!important` (outranking by specificity is enough) and no
`allowTransparency` (measured no effect on the viewport background under the
DOM renderer xterm 6 uses by default).
2026-11-03 11:51:49 +08:00
Kunping Wang 3ce803c691 fix(changes): 修复 Changes 视角切换按钮样式 2026-11-02 20:57:24 +08:00
CCColastic c15a8c45bd fix(sidechat): use the host paperclip for image attachments 2026-11-02 15:19:28 +08:00
CCColastic 00bb16ae6c fix(sidechat): guard model changes before image enqueue 2026-11-02 15:19:28 +08:00
CCColastic ba72fc4c9c fix(sidechat): defer image reads until message projection 2026-11-02 14:02:44 +08:00
CCColastic dcafe7d2dc fix(sidechat): restore thread bindings after page reload 2026-11-02 13:46:22 +08:00
CCColastic 23a2b61f33 feat(sidechat): accept pasted and selected image prompts 2026-11-02 13:37:43 +08:00
Menghuan1918 7bff1a1cb4 merge fix/949-951: block archiving side threads (#949), keep sidebar_open registered while settings are unreadable (#951) 2026-10-29 23:53:34 +08:00
Menghuan1918 d77adf25e3 merge fix/1009-card-toggles: hidden tab types are not settings cards (#1009) 2026-10-29 23:53:10 +08:00
Menghuan1918 d7483f6b33 fix(sidechat): disable archiving a side thread the host can never recover (#949)
The host's session list hides every subagent-origin row in ALL archive filters (sessionVisible() returns false before the filter), and its unarchive control only lives on those rows. Archiving a side conversation is therefore a one-way door with no entry left to recover it, so the composer-bar action is disabled for any bound session the list cannot show again, with a hover tip (all 21 dictionaries) explaining why and pointing at Save as new session. The handler keeps the same guard.
The archive-and-rebind path stays covered for a host-visible binding.
2026-10-29 23:51:47 +08:00
Menghuan1918 af0e7b7c9d fix(host): keep sidebar_open registered when the settings row is unreadable (#951)
The gate read an absent settings row (the host only lists entries whose fiber is ACTIVE) as the schema default false and unregistered a live tool mid-session. Read the switch tri-state instead: only an explicit boolean is a decision, so an absent row or a thrown read keeps the current registration.
Also re-evaluate right after a settings write and after the loader settles, so enabling the feature registers the tool for the first turn instead of waiting for an unrelated settings.get.
2026-10-29 23:51:45 +08:00
Menghuan1918 15b51ca55e fix(settings): stop inventorying programmatic-only tab types (#1009)
Hidden tab types (the built-in diff page, dsh-remote's dsh-remote:file)
have no + menu row and no native guide entry, yet the side-card inventory
still gave them an enable switch. Turning one off changed nothing in the
sidebar and only made openTab silently refuse that type - which the
reporter saw as "remote:file cannot be turned off / git:diff does
nothing", and dsh-remote saw as "remote files stop opening".

- SideCardSection: the inventory skips hidden types (the count badge
  follows); tabOrder becomes the order-only tabInventory.
- service.isTabEnabled: a hidden type is always enabled, so a
  tabsEnabled[id] = false written by an older build cannot keep refusing
  its programmatic opens.
- docs/external-plugin-guide.md and CHANGELOG describe the contract; the
  two new specs fail on the previous code.
2026-10-29 23:48:23 +08:00
Menghuan1918 dcd5cf66b1 merge fix/1014-panel-host-dvh: use 100dvh for the panel host (#1014) 2026-10-29 23:45:22 +08:00
Menghuan1918 eb7edb0818 fix(panel-host): 宿主高度改用 100dvh 回退 100vh,修掉手机端整页可拖动(#1014)
`height: 100vh` 取的是大视口:手机浏览器地址栏展开时该层比布局视口
(innerHeight)高,挂载自检把 rect.height 与 innerHeight 的差值当成页面级
transform,降级为 position:absolute 后高度计入文档并持续触发自检,整页可
上下拖动且不自愈。dvh 跟随动态视口(即 innerHeight),声明在 vh 之后;
不支持 dvh 的引擎在解析期丢弃该行、保留 vh,即 #616 的修复不变。

tests/panel-host-css.spec.ts 把高度声明整表钉为
['height: 100vh', 'height: 100dvh'],级联顺序即契约。
2026-10-29 23:44:40 +08:00
Menghuan1918 04c6cb8a10 merge review/mermaid-frame: #1040 sandbox-iframe mermaid layout isolation 2026-10-29 23:43:11 +08:00
Menghuan1918 ac8fcd5516 merge review/path-roots: #1079 UNC prefix, #1070 subdirectory session root 2026-10-29 23:42:13 +08:00
Menghuan1918 88c86abb11 merge review/markdown-links: #1067 angle-bracket link destinations, #1074 Side Chat local source links 2026-10-29 23:42:06 +08:00
Menghuan1918 2e691142da merge review/1083-editor-draft: #1083 confirm before an in-place file switch drops an unsaved draft 2026-10-29 23:41:57 +08:00
Menghuan1918 b1c33577be merge review/html-preview-mime: #972 serve preview assets with real MIME types 2026-10-29 23:41:47 +08:00
Menghuan1918 51f8cebda5 merge review/menu-submenu: #974 close the reduced-motion media query, #988 submenu flip tokens for Git More Actions 2026-10-29 23:41:37 +08:00
Menghuan1918 e17ab5c52e merge: keep the UNC prefix when folding separators (#1079) 2026-10-29 23:36:41 +08:00
Menghuan1918 6d9e02c3ce fix(active-worktree): keep the session cwd's own path as the root
The guard still substituted the repository top level whenever the caller's
base spelling was not lexically under git's canonical top (macOS /var vs
/private/var, symlinked workspaces), so #1070's argument-order swap only
covered the lexically-canonical case - its own subdirectory test is red on
macOS.

Make the session cwd authoritative: canonicalize it once with realpath (so
containment against git's canonical paths still works and nested-worktree
adoption stays correct, #952) and never substitute the repository top.
Linked-worktree following is unchanged.

Refs #1024 #1080 #1070
2026-10-29 23:36:32 +08:00
Menghuan1918 845837f958 merge: keep a subdirectory session cwd (#1070) 2026-10-29 23:36:10 +08:00
Menghuan1918 f1d52c9241 merge: PR #1074 (Side Chat local source links) 2026-10-29 23:31:01 +08:00