@young1lin/dsh-ui-gitworkbench 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  本文件记录面向使用者的变更。格式参考 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循语义化版本。
4
4
 
5
+ ## [0.1.14] - 2026-08-31
6
+
7
+ ### 修复
8
+
9
+ - **回车在 diff 里画出来了。** CRLF 文件在 CHANGES 点开,是一整面红绿行而两侧文本看上去一模一样——文件没有被过滤(树逐字来自 `git status`),是 diff 行文本原样携带的回车字节浏览器一个像素都不画,只改行尾的变更于是「整文件都变了却看不出改了什么」。现在每个回车在渲染时画成 `␍`(U+240D,回车控制字符的标准图形,git 里 `^M` 想说的同一件事):CHANGES 的分栏视图在每个回车处标出;History / Compare 的 unified 视图标在行尾——词级高亮是行内字符偏移,行中插字形会把它们推偏。行里没有回车就只多付一次 `includes`,纯 LF 文件渲染与之前一致。编辑器对 CRLF 的拒绝不变(编辑框会把行尾统一成 LF,任何一次保存都会重写整个文件),但两条拒绝提示(CHANGES 与 Files)现在都直接建议把行尾统一成 LF。
10
+
5
11
  ## [0.1.13] - 2026-08-25
6
12
 
7
13
  ### 新增
package/CHANGELOG_EN.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  User-facing changes, newest first. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versioning follows SemVer.
4
4
 
5
+ ## [0.1.14] - 2026-08-31
6
+
7
+ ### Fixed
8
+
9
+ - **The carriage return is drawn now.** Opening a CRLF file in CHANGES showed a wall of changed lines whose two sides looked byte-identical — nothing filtered the file (the tree lists `git status` verbatim), but the CR byte the diff text carries through verbatim gets zero pixels from a browser, so an endings-only rewrite read as "everything changed and nothing shows what". Every carriage return now renders as `␍` (U+240D, the standard picture of the control character — what git's `^M` means to say): the CHANGES side-by-side pane marks each one, and History/Compare's unified view marks the line's end, because word-level highlights are char offsets into the row text that a mid-line glyph would shift. A line without a CR pays one extra `includes` and renders exactly as before. The editor still declines to arm on CRLF (the edit box would normalise the endings, and any save would rewrite the whole file), but both refusal notices — CHANGES and Files — now recommend normalising the file to LF.
10
+
5
11
  ## [0.1.13] - 2026-08-25
6
12
 
7
13
  ### Added
package/README.md CHANGED
@@ -431,6 +431,32 @@ gutter 一变不透明就把它埋了。二是探针查不了这件事:`elemen
431
431
  box-shadow 的命中测试,行号左边那个点照样报 `.cm-line`,只能截图看像素,或者直接
432
432
  读 `getComputedStyle(...).boxShadow`。`scripts/verify_gutter.py` 走的是后者。
433
433
 
434
+ ### 6.21 探针「什么都没测到」的三种样子,都不长得像失败
435
+
436
+ 探针最贵的失败不是断言变红,是它根本没走到要测的那一步,然后一路 PASS 或者报一个
437
+ 和真实原因无关的超时。三条都是在实机上撞出来的:
438
+
439
+ **一、会话列表默认是折叠的。** 侧边栏按 workspace 分组,全新的无头上下文拿到的
440
+ `dsh.workspace.view.v5` 里 `groupExpansion` 是空对象——每个组都收着,会话行**根本不在
441
+ DOM 里**。`page.get_by_text('会话标题')` 于是永远找不到,再怎么等也没用。要先把
442
+ `[class*="projectRow"][aria-expanded="false"]` 一个个点开。这条会伪装成
443
+ `Locator.click: Timeout 30000ms exceeded` 卡在 `cardBranch` 上,看起来像抽屉没渲染。
444
+
445
+ **二、Changes 侧不点「编辑」就没有编辑器。** 未武装时 diff 右列渲染的是 `<span>`
446
+ (`DiffViews.tsx`),CodeMirror 只在 `layer === 'unstaged' && edit.armed` 时挂载。
447
+ 探针点开一个改动文件就去找 `.cm-gutters`,找不到是**对的**——但如果把这种情况写成
448
+ `SKIP`,那一整段就永远不会被验,而它看起来一直是绿的。要么点「编辑」把它武装起来,
449
+ 要么把「未武装时不该有编辑器」写成一条真断言。
450
+
451
+ **三、挑文件别用 `.first`。** fixture-01 的第一个改动文件是 PNG,二进制文件走的是
452
+ 「无文本差异」分支:没有分栏、没有「编辑」按钮、没有编辑器。用 `.first` 拿到它,
453
+ 报出来的是「分栏视图没有编辑按钮」——一个从来不存在的 bug。按扩展名挑一个文本文件。
454
+
455
+ 还有一条量级的:**把窗格「拖窄到一定要横向滚动」不能写死像素**。`320px` 在 Files 侧
456
+ 够窄,在 Changes 右列比最长的行还宽,于是 `scrollLeft` 停在 0,那一段测的是「没滚动
457
+ 所以没有重叠」——不是「没有 bug」。按 gutter 自身宽度加一条缝算目标宽度,再
458
+ `scrollLeft = scrollWidth` 滚到底,重叠就一定发生在最坏处。
459
+
434
460
  ---
435
461
 
436
462
  ## 7. dsh 仓库里的关键参考文件(去哪里抄)