@michengai/dsh-codex-ui 2.4.5 → 2.4.6

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,14 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.4.6] - 2026-11-25
4
+
5
+ - **Adaptive Auto-Hiding for Unused Default Workspace Section (Issue #114)**:
6
+ - In the plain flat view (no pinned projects and no custom sections), all built-in "Pinned" and "Projects" headers hide themselves so the sidebar falls back to the host's native flat list;
7
+ - In section mode, the default "Projects" header hides when it has no workspaces, freeing the vertical space it used to take up.
8
+ - **Isolate Floating Mica Theme Styles from Third-Party Cards and Action Tooltips (Issue #113)**:
9
+ - Prevented conversation header styles from spilling over into inline plugin headers (such as squad and fleet status cards), avoiding layout distortion or layering conflicts;
10
+ - Restored high-contrast dark backgrounds and crisp white text for conversation action tooltips (copy, branch, etc.), ensuring legibility against glass backgrounds.
11
+
3
12
  ## [2.4.5] - 2026-11-25
4
13
 
5
14
  - **Improve Workspace Section Recovery and Real-Time Synchronization**:
@@ -1,5 +1,14 @@
1
1
  # 更新日志
2
2
 
3
+ ## [2.4.6] - 2026-11-25
4
+
5
+ - **优化工作区分区展示与自适应隐身逻辑(Issue #114)**:
6
+ - 纯平铺模式(既没有置顶项目、也没有自定义分区)下,内置的「置顶」「项目」标题行全部隐身,工作区列表直接按宿主原生平铺展示;
7
+ - 分区模式下,未添加项目的默认「项目」分区标题行自动隐身,不再白占侧栏顶部空间;
8
+ - **修复云母毛玻璃主题下的第三方插件卡片与操作提示样式冲突(Issue #113)**:
9
+ - 修复第三方编队等插件的内容流顶栏卡片被误套用浮动顶栏样式导致的排版变形与层级遮挡问题;
10
+ - 修复会话底部操作栏(复制、分支等)鼠标悬停提示气泡背景色透明导致的文字看不清问题,恢复清晰统一的深色悬浮提示效果。
11
+
3
12
  ## [2.4.5] - 2026-11-25
4
13
 
5
14
  - **工作区分区恢复与实时同步体验优化**:
package/README.md CHANGED
@@ -192,7 +192,7 @@ dsh --profile web --dump-config
192
192
  | **调节输入框宽度** | 悬停至输入框左右边缘,拖拽蓝色手柄即可自定义最舒适的编写宽度。 |
193
193
  | **切换主题与质感** | 打开「设置 → Codex UI」,在「界面外观与换肤」卡片单选 14 款主题,直选原版/云母模式与材质预设。 |
194
194
  | **调整侧栏图标顺序** | 鼠标按住展开侧栏中的任意插件条目拖拽上下移动,蓝线指示放置位置,支持拖入/拖出「更多」手风琴。 |
195
- | **从分区直接添加工作区** | 悬停或键盘聚焦到任意侧栏分区(「置顶」、「项目」或自定义分区)标题,点击右侧 `···` 旁的「添加工作区」图标(随宿主目录选择能力显隐),新建的工作区会自动归入该分区并展开。 |
195
+ | **从分区直接添加工作区** | 在分区模式下,悬停或键盘聚焦到任意侧栏分区(「置顶」、「项目」或自定义分区)标题,点击右侧 `···` 旁的「添加工作区」图标(随宿主目录选择能力显隐),新建的工作区会自动归入该分区并展开。 |
196
196
  | **在欢迎页搜索并切换项目** | 点击新建会话页的工作区胶囊即可直接输入,按项目名或路径即时过滤;`↑` / `↓` 移动、`Enter` 选中、`Esc` 关闭。当前项目行尾带对勾,同名项目附带最短区分路径;底部「新建项目」只在宿主提供系统目录对话框时出现(远程连接 / SSH 启动的宿主会自动隐藏)。 |
197
197
  | **折叠/收起侧边栏** | 点击侧栏顶部折叠按钮;收缩后自动切换为 56px 原生导轨,单手盲点所有功能图标。 |
198
198
  | **生态插件批量更新** | 在「设置 → Codex UI」底部「配套管理插件」卡片,点击「全部更新」自动安装最新配套依赖。 |
package/README.zh-CN.md CHANGED
@@ -192,7 +192,7 @@ dsh --profile web --dump-config
192
192
  | **调节输入框宽度** | 悬停至输入框左右边缘,拖拽蓝色手柄即可自定义最舒适的编写宽度。 |
193
193
  | **切换主题与质感** | 打开「设置 → Codex UI」,在「界面外观与换肤」卡片单选 14 款主题,直选原版/云母模式与材质预设。 |
194
194
  | **调整侧栏图标顺序** | 鼠标按住展开侧栏中的任意插件条目拖拽上下移动,蓝线指示放置位置,支持拖入/拖出「更多」手风琴。 |
195
- | **从分区直接添加工作区** | 悬停或键盘聚焦到任意侧栏分区(「置顶」、「项目」或自定义分区)标题,点击右侧 `···` 旁的「添加工作区」图标(随宿主目录选择能力显隐),新建的工作区会自动归入该分区并展开。 |
195
+ | **从分区直接添加工作区** | 在分区模式下,悬停或键盘聚焦到任意侧栏分区(「置顶」、「项目」或自定义分区)标题,点击右侧 `···` 旁的「添加工作区」图标(随宿主目录选择能力显隐),新建的工作区会自动归入该分区并展开。 |
196
196
  | **在欢迎页搜索并切换项目** | 点击新建会话页的工作区胶囊即可直接输入,按项目名或路径即时过滤;`↑` / `↓` 移动、`Enter` 选中、`Esc` 关闭。当前项目行尾带对勾,同名项目附带最短区分路径;底部「新建项目」只在宿主提供系统目录对话框时出现(远程连接 / SSH 启动的宿主会自动隐藏)。 |
197
197
  | **折叠/收起侧边栏** | 点击侧栏顶部折叠按钮;收缩后自动切换为 56px 原生导轨,单手盲点所有功能图标。 |
198
198
  | **生态插件批量更新** | 在「设置 → Codex UI」底部「配套管理插件」卡片,点击「全部更新」自动安装最新配套依赖。 |
package/lib/client.js CHANGED
@@ -443,7 +443,7 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card {
443
443
  const GLASS_FLOAT_ATTRIBUTE = "data-dsh-glass-float";
444
444
  const GLASS_COMPAT_ATTRIBUTE = "data-dsh-glass-compat";
445
445
  const STYLE_TAG_ID = "dsh-codex-ui-glass-style";
446
- const GLASS_COMPOSER_CSS = GLASS_CSS_TEXT.replaceAll("[data-dsh-glass-float] [data-composer-card]:before", "[data-dsh-glass-float] [data-composer-card] > [data-dcu-glass-composer-surface]").replaceAll("[data-dsh-glass-compat] [data-composer-card]:before", "[data-dsh-glass-compat] [data-composer-card] > [data-dcu-glass-composer-surface]");
446
+ const GLASS_COMPOSER_CSS = GLASS_CSS_TEXT.replaceAll("[data-dsh-glass-float] [data-composer-card]:before", "[data-dsh-glass-float] [data-composer-card] > [data-dcu-glass-composer-surface]").replaceAll("[data-dsh-glass-compat] [data-composer-card]:before", "[data-dsh-glass-compat] [data-composer-card] > [data-dcu-glass-composer-surface]").replaceAll("[data-dsh-glass-float] [data-phase=active] header", "[data-dsh-glass-float] [data-phase=active] header:not(.lc-pulse-header):not([class*=\"lc-\"])").replaceAll("[data-dsh-glass-float] [data-phase] header:not([class*=headerBlank])", "[data-dsh-glass-float] [data-phase] header:not([class*=headerBlank]):not(.lc-pulse-header):not([class*=\"lc-\"])").replaceAll("[data-dsh-glass-frame][data-sidebar-collapsed] [data-phase] header:not([class*=headerBlank])", "[data-dsh-glass-frame][data-sidebar-collapsed] [data-phase] header:not([class*=headerBlank]):not(.lc-pulse-header):not([class*=\"lc-\"])").replaceAll("[data-dsh-glass-float] [data-conversation-scroll] [class*=bubble]", "[data-dsh-glass-float] [data-conversation-scroll] [class*=bubble]:not([role=tooltip]):not([class*=tooltip])");
447
447
  /** 玻璃层追加样式(拼在生成 CSS 之后,同特异性下后者胜出);导出以便契约测试断言 */
448
448
  const GLASS_EXTRA_CSS = `
449
449
  /* 插件页顶栏色差彻底消除:静止与滚动吸顶均保持底板透明,与全局背景底色与渐变自然融为一体;吸顶时呈现纯净磨砂与细线悬浮效果 */
@@ -497,11 +497,54 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card {
497
497
  这正是「还是透」的真因:兜底模糊一直在,只是被 mask 变成惰性。
498
498
  因此顶部遮挡改为与对标插件一致的做法:不给滚动容器加遮罩,只把顶栏自己的磨砂设为下限值,
499
499
  让从顶栏背后穿过的正文被磨砂化开。 */
500
- [data-dsh-glass-float] [data-phase] header:not([class*="headerBlank"]) {
500
+ [data-dsh-glass-float] [data-phase] header:not([class*="headerBlank"]):not(.lc-pulse-header):not([class*="lc-"]) {
501
501
  backdrop-filter: blur(max(var(--dsh-glass-blur, 12px), 12px)) !important;
502
502
  -webkit-backdrop-filter: blur(max(var(--dsh-glass-blur, 12px), 12px)) !important;
503
503
  }
504
504
 
505
+ /* 防御 dsh-context 编队卡片样式污染(Issue #113):
506
+ .lc-pulse-header 属于编队内容流内部卡片,严禁继承宿主会话顶栏的浮动排版
507
+ (100% 宽 + 居中最大宽 + 卡片描边 + 20px 圆角 + z-index:8 的高层级定位)。
508
+ 这里只把浮动顶栏注入的「定位与尺寸」回正为卡片自己的流式布局,让它在向上滚动时
509
+ 从真正的宿主顶栏下方平滑穿过;圆角、背景、边框、阴影等第三方视觉属性一律不碰。
510
+ 实测依据(dsh-context 已装产物):该插件内部只有这一个 <header>(class=lc-pulse-header),
511
+ 顶栏规则原本会同时套上 width:100% / 居中 max-width / 卡片描边 / 20px 圆角 / z-index:8;
512
+ 它还用自己的 ::after 画一条 2px 渐变底线,所以「header:after{display:none}」那条兄弟规则
513
+ 也必须一起排除(当前靠目标串子串重叠顺带命中,用例已锁死,别改成更精确的写法)。
514
+ 注 1:lc- 是 dsh-context 插件的类名前缀契约;第三条选择器用子串匹配覆盖
515
+ 「外层包了一层 lc- 卡片、header 在里面」的嵌套形状。当前 dsh-context 只有上面那一个
516
+ header,所以它今天与第一条选择器命中同一个节点,属于结构变化时的兜底;
517
+ 代价是它也会命中任何 lc- 容器内的 header,改动前先与 dsh-context 的实际 DOM 对一遍。
518
+ 注 2:此重置仅限定在云母浮动模式([data-dsh-glass-float]),平铺(compat)模式下
519
+ 不存在这些顶栏规则,绝不越界。 */
520
+ [data-dsh-glass-float] header.lc-pulse-header,
521
+ [data-dsh-glass-float] header[class*="lc-pulse-"],
522
+ [data-dsh-glass-float] [class*="lc-"] header {
523
+ position: relative !important;
524
+ z-index: 1 !important;
525
+ width: auto !important;
526
+ max-width: none !important;
527
+ margin: 0 !important;
528
+ }
529
+
530
+ /* 防御会话操作栏 Tooltip 气泡样式污染(Issue #113):
531
+ 对话下方功能控件(复制、分支等)的 Tooltip 气泡挂载在会话滚动流内部,
532
+ 严禁被 [class*=bubble] 污染为亮色透明背景导致的白底白字;
533
+ 严格维持宿主规范的深色底板、纯白文字与统一 8px 圆角(对齐基线预设,仅限浮动模式)。 */
534
+ [data-dsh-glass-float] [role="tooltip"],
535
+ [data-dsh-glass-float] [class*="bubble"][role="tooltip"] {
536
+ background: var(--dsw-alias-tooltip-bg, #1e1e24) !important;
537
+ color: var(--dsw-alias-tooltip-label, #ffffff) !important;
538
+ border: none !important;
539
+ border-radius: var(--dsw-radius-md, 8px) !important;
540
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
541
+ backdrop-filter: none !important;
542
+ -webkit-backdrop-filter: none !important;
543
+ }
544
+ [data-dsh-glass-float] [role="tooltip"] * {
545
+ color: inherit !important;
546
+ }
547
+
505
548
  /* 对齐平铺风格(Compat)防漏字规范:将云母输入框卡片底色提升为高遮蔽度的 card-raised,
506
549
  并锁定至少 12px 高斯磨砂,将底层滚动的历史文字彻底化开为淡淡的柔和色块,杜绝锐利笔画穿透叠字 */
507
550
  [data-dsh-glass-float] [data-composer-card] > [data-dcu-glass-composer-surface] {
@@ -14607,13 +14650,15 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
14607
14650
  /** 把标题按分区顺序放到各自第一个分组块前面;空分区贴着下一个分区显示。 */
14608
14651
  function placeHeaders(blocks, layoutState = state) {
14609
14652
  if (blocks.length === 0) {
14610
- const stalePinned = headers.get(PINNED_SECTION_ID);
14611
- if (stalePinned !== void 0) {
14612
- stalePinned.remove();
14613
- headers.delete(PINNED_SECTION_ID);
14614
- if (collapsed["pinned"] === true) {
14615
- delete collapsed[PINNED_SECTION_ID];
14616
- persistCollapsed();
14653
+ for (const builtinId of [PINNED_SECTION_ID, DEFAULT_SECTION_ID]) {
14654
+ const stale = headers.get(builtinId);
14655
+ if (stale !== void 0) {
14656
+ stale.remove();
14657
+ headers.delete(builtinId);
14658
+ if (collapsed[builtinId] === true) {
14659
+ delete collapsed[builtinId];
14660
+ persistCollapsed();
14661
+ }
14617
14662
  }
14618
14663
  }
14619
14664
  return;
@@ -14624,6 +14669,9 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
14624
14669
  const ungrouped = Array.from(list?.querySelectorAll("[data-row-key=\"workspace:\"]") ?? []).map((row) => row instanceof HTMLElement ? blockOf(row, list) : null).find((block) => block !== null);
14625
14670
  const byId = new Map(blocks.map((item) => [item.workspaceId, item.block]));
14626
14671
  const visibleById = relocatingIds.size === 0 ? byId : new Map(blocks.filter((item) => !relocatingIds.has(item.workspaceId)).map((item) => [item.workspaceId, item.block]));
14672
+ const hasCustomSections = layoutState.sections.some((s) => !isBuiltinSection(s.id));
14673
+ const hasPinnedItems = (layoutState.sections.find((s) => s.id === "pinned")?.ids.length ?? 0) > 0;
14674
+ const isPartitioned = hasCustomSections || hasPinnedItems;
14627
14675
  let reference = ungrouped ?? null;
14628
14676
  for (let index = layoutState.sections.length - 1; index >= 0; index -= 1) {
14629
14677
  const section = layoutState.sections[index];
@@ -14641,6 +14689,18 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
14641
14689
  }
14642
14690
  continue;
14643
14691
  }
14692
+ if (section.id === "default" && (!isPartitioned || section.ids.length === 0)) {
14693
+ const stale = headers.get(DEFAULT_SECTION_ID);
14694
+ if (stale !== void 0) {
14695
+ stale.remove();
14696
+ headers.delete(DEFAULT_SECTION_ID);
14697
+ if (collapsed["default"] === true) {
14698
+ delete collapsed[DEFAULT_SECTION_ID];
14699
+ persistCollapsed();
14700
+ }
14701
+ }
14702
+ continue;
14703
+ }
14644
14704
  const header = ensureHeader(section.id, section.name);
14645
14705
  if (header.parentElement !== target || nextStructuralSibling(header) !== reference) target.insertBefore(header, reference);
14646
14706
  reference = header;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michengai/dsh-codex-ui",
3
- "version": "2.4.5",
3
+ "version": "2.4.6",
4
4
  "description": "DSH Codex UI — 为 DeepSeek Harness 提供极速历史召回、全屏设置皮肤、原生物理毛玻璃换肤、模块化侧栏与桌面原生窗口菜单 · Input enhancement, settings skin, native glass theme, modular sidebar, and desktop titlebar menu for DSH",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {