dsh-connect-trae 4.9.0 → 4.9.1

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
@@ -1,5 +1,40 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.9.1 (2026-11-06)
4
+
5
+ ### 修复
6
+
7
+ **4.9.0 的两条样式规则漏了作用域,在卡片与整页上造成回归。** 补丁号发布。
8
+
9
+ 4.9.0 给设置面板加了两个调整,写法是**无作用域**的全局选择器:
10
+
11
+ - `.dsm-trae-tab-hint` —— 把供应商行的说明视觉隐藏,省下 36px;
12
+ - `.dsm-trae-panels` —— 把分栏条改成 `position:sticky` 并加一层 layer-2 底色。
13
+
14
+ 这两个元素是**三个界面共用**的:输入框卡片、侧边栏整页、设置面板画的是同一棵树。
15
+ 写的时候只想着设置面板那一列(564px、外壳自带滚动),忘了另外两个界面也会吃到。
16
+
17
+ 实测到的两个回归:
18
+
19
+ | 界面 | 回归 | 原因 |
20
+ | --- | --- | --- |
21
+ | 卡片 / 整页 | 「企业版与国内版共用同一份 Trae CN 登录」那句话消失 | 卡片本身有 726px 宽、没有纵向空间压力,这句说明不该被裁掉 |
22
+ | 卡片 | 分栏条下方压出一条浅色带 | `position:sticky` 在没有滚动祖先时不生效,但底色留下了;底色取 layer-2,卡片本身是 layer-3 |
23
+
24
+ 两条规则现在都限定在 `.dsm-trae-section` 之下——那是"只在设置面板里生效"的结构标记,
25
+ 也是这些改动的唯一理由所在(外壳的滚动列与 564px 的宽度)。卡片与整页恢复原样。
26
+
27
+ 实测三界面(修复后):
28
+
29
+ | 界面 | 说明行 | 分栏条 |
30
+ | --- | --- | --- |
31
+ | 卡片 | 726×18px,可见 | `static`,无底色 |
32
+ | 整页 | 710×18px,可见 | `static`,无底色 |
33
+ | 设置面板 | 1×1px,视觉隐藏(读屏保留) | `sticky`,layer-2 底色 |
34
+
35
+ 新增两条用例**双向**锁定:设置页下必须命中,且无作用域的基础规则必须**不带**
36
+ `position:sticky` / `background` / `clip`——只测前者的话,下次再漏作用域仍然会绿。
37
+
3
38
  ## 4.9.0 (2026-11-06)
4
39
 
5
40
  ### 变更
package/lib/client.js CHANGED
@@ -999,16 +999,22 @@ window.__ModuleLoader__.load({
999
999
  differs, so it sits inside the tab cell without crowding the label. */
1000
1000
  .dsm-trae-tab-switch{flex:none;margin-left:auto;padding-left:10px;border-left:1px solid var(--dsw-alias-border-l1,rgba(127,127,127,.24))}
1001
1001
  .dsm-trae-tab-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:7px;vertical-align:baseline}
1002
- /* 供应商行的说明:视觉隐藏,读屏仍在(learned from workbuddy 5.19.0 的窄列实践)。
1002
+ .dsm-trae-tab-hint{margin:0;padding:0 2px;color:var(--dsw-alias-label-tertiary,#999);font-size:12px;line-height:18px}
1003
+ /* THE TWO SETTINGS-SURFACE TWEAKS, SCOPED (learned the hard way, post-release).
1003
1004
  *
1004
- * 这一行是三个芯片的注解(「企业版与国内版共用同一份 Trae CN 登录」),原本独占
1005
- * 一整行 36px,把账号池往下推。在 564px 的列里,纵向空间是稀缺资源,而这句话
1006
- * 只在「同时启用两个供应商」时才有用——那个场景下用户已经在看两个芯片了。
1005
+ * 下面两条原本是**无作用域**的:一条把供应商说明行视觉隐藏,一条把分栏条改成
1006
+ * sticky 并加一层底色。它们写的时候只想到设置面板那一列(564px、外壳自带滚动),
1007
+ * 但那两处 DOM 是**三个界面共用的**——卡片、整页、设置页画的是同一棵树。
1007
1008
  *
1008
- * 用 clip 而不是 display:none:display:none 会把它从无障碍树里摘掉,读屏用户
1009
- * 就永远拿不到这条例外说明。视觉隐藏保留了它,且不占布局高度。
1010
- * 完整文案仍可通过芯片行的 title 悬停看到(见 TraeUsageCard 的 tabSwitchHint)。 */
1011
- .dsm-trae-tab-hint{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
1009
+ * 结果在卡片上是两个回归(实测):说明行在卡片里也消失了(卡片有自己的宽度、
1010
+ * 有自己的节奏,那里根本没有纵向空间压力),分栏条拿到 position:sticky 却没有
1011
+ * 滚动祖先,且底色取了 layer-2 而卡片本身是 layer-3,于是在卡片上压出一条
1012
+ * 比周围更浅的色带。
1013
+ *
1014
+ * 所以两条都挪到 .dsm-trae-section 之下——那是"只在设置面板里生效"的结构标记,
1015
+ * 也是这些改动的唯一理由所在(外壳的滚动列与 564px 的宽度)。卡片与整页保持
1016
+ * 原样:它们没有面板外壳,也就没有这些约束。 */
1017
+ .dsm-trae-section .dsm-trae-tab-hint{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
1012
1018
  /* SECTION TABS: the card's own top-level split (account / models / diagnostics).
1013
1019
  *
1014
1020
  * Deliberately NOT the boxed chips above. Those are the REGION scope — a
@@ -1036,7 +1042,12 @@ window.__ModuleLoader__.load({
1036
1042
  *
1037
1043
  * top:-1px 而不是 0:分栏条自己的 border-bottom 画在盒子外侧,写成 0 会在它上方
1038
1044
  * 留一条 1px 的缝,滚动的行会从这条缝里露出来。 */
1039
- .dsm-trae-panels{position:sticky;top:-1px;z-index:2;display:flex;align-items:stretch;gap:2px;margin:4px 0 0;border-bottom:1px solid var(--dsw-alias-border-l1,rgba(127,127,127,.24));background:var(--dsw-alias-bg-layer-2,#24262c)}
1045
+ .dsm-trae-panels{display:flex;align-items:stretch;gap:2px;margin:4px 0 0;border-bottom:1px solid var(--dsw-alias-border-l1,rgba(127,127,127,.24))}
1046
+ /* 分栏条只在设置面板里钉住(见上方 .dsm-trae-tab-hint 的长注释:这两条原本无
1047
+ * 作用域,在卡片上留下两个回归)。卡片与整页没有"外壳的滚动列",那里的分栏条
1048
+ * 跟着内容正常滚走即可;sticky 在没有滚动祖先时不会生效,却会把底色带进来——
1049
+ * 而底色取 layer-2,卡片本身是 layer-3,色差在卡片上就成了一条浅色带。 */
1050
+ .dsm-trae-section .dsm-trae-panels{position:sticky;top:-1px;z-index:2;background:var(--dsw-alias-bg-layer-2,#24262c)}
1040
1051
  .dsm-trae-panel-tab{appearance:none;font:inherit;cursor:pointer;border:0;background:transparent;padding:7px 11px;margin-bottom:-1px;border-bottom:2px solid transparent;color:var(--dsw-alias-label-tertiary,#999);font-size:13px;font-weight:600;line-height:20px;white-space:nowrap;transition:color .15s,border-color .15s}
1041
1052
  .dsm-trae-panel-tab:hover:not(.dsm-trae-panel-tab-active){color:var(--dsw-alias-label-primary,#e6e6e6)}
1042
1053
  .dsm-trae-panel-tab:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:1px}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "dsh-connect-trae",
3
3
  "displayName": "DSH Connect Trae",
4
4
  "description": "把本机登录的 Trae 模型接入 DeepSeek Harness:国内版与国际版双供应商并行,提供用量/积分概览与每日签到领取。",
5
- "version": "4.9.0",
5
+ "version": "4.9.1",
6
6
  "author": "dingminhua",
7
7
  "copyright": "Copyright (c) 2026 LaoDing",
8
8
  "license": "MIT",