Skip to content

Releases: Tkingxiao/dsh-any-background

v0.3.9 — 条带墨色可预期(#30),顶栏滑块管住所有头部浮层

Choose a tag to compare

@Tkingxiao Tkingxiao released this 19 Oct 14:20

v0.3.9 — 条带墨色改为可预期(issue #30),顶栏那对滑块重新管住所有头部浮层

变更

  • 「标题条带文字」现在是一个选项(issue #30):0.3.8 让条带墨色跟随它实际被画在什么上,修好了「白色开合按钮在亮条带上看不见」,但暗主题 + 亮壁纸 + 侧栏低透明度时,原生菜单条(应用 / 编辑)成了全屏唯一翻黑的文字。同一个场景两份反馈要的是相反的赢家,所以取舍交给用户:自动(沿用条带推导)/ 跟随主题(完全不写覆盖,回到宿主标签墨色)/ 始终白色 / 始终黑色。键已补进宿主半侧白名单,npm test 断言「落盘 → 重读」并让未知值塌回 auto。
  • 就地的头部浮层会被认领了:session-log-export 的 … 菜单不带 portal,就地挂在 [data-slot="conversation.session.header.utilities"] 里,此前只靠 [role="menu"][class*="_denseList"]:not([class*="_portal"]) 这条脆弱分支才没失效。认领判据改为「portal 到 <body>,或头部槽位锚点的后代」;模态依旧绝不认领,输入位自己的就地列表继续归卡片组。
  • 认领不再等一帧:一次性 flush 从 requestAnimationFrame 挪到微任务队列 —— 排下去的帧在窗口不绘制时根本不会跑(后台标签页、被遮挡或最小化的桌面窗口、后台 Electron 表面),于是标记永远落不下、面板一直保持「卡片」组的样子。真实 dsh web 里量过:不绘制的页面下,打开的头部菜单无限期保持未标记;改微任务后同一个菜单下一个微任务就被标记上。顺带消掉打开时那一帧的卡片样式闪动。
  • 标题行的霜不再吞掉子层的模糊:backdrop-filter 压在行身上会让行同时成为层叠上下文与 backdrop root,挂在行内的就地浮层只能采到行自己画的一片平色。改走 ::before 垫层(isolation:isolate 是层叠上下文但不是 backdrop root),行保留 z-index:10,垫层需要的 position:relative 只在模糊非 0 且宿主把行留在 static 时内联写入。
  • 菜单模糊滑块的 0 就是「无磨砂」:0.3.7 的门控让滑块下端成了最糊的一端(0 → 宿主的 blur(40px),1 → 1px),「把模糊关掉」根本够不到。现在令牌在每个取值上都声明、0 由 none 兜底,门控机制整体删除;各部件默认仍是 30px,全新安装不会丢宿主观感。
  • 未选主题色时界面透明度滑块不再是死的:readHostOpacityTokens() 采的是 :root,而宿主把整套表面令牌声明在 design-platform.css 的 body{} 块里(自定义属性只向下继承),于是读取全空、每个 alpha 都没写出来(连帧都没清)。现在从 body 采样、按宿主代次缓存,读取时临时关掉插件自己的 body{} 令牌表,避免回采到自己写的值。
  • 新增 AGENTS.md:把 46 个提交里每次真实回归反推成检查与测试手册(19 类缺陷 + 改动→必查映射 + 四条测试路径各自能证明什么)。

更新到 v0.3.9 后请重启一次 dsh web / 桌面端:宿主的兼容检查在组装 profile 时跑,不在插件更新时跑。

English

  • The caption strip's ink is now the user's call (issue #30). 0.3.8 derived it from what the strip is actually painted on, which fixed the invisible white toggle but made the native menubar the only text on screen that ignored the theme direction. The two reports of one situation wanted opposite winners, so 「标题栏」 gained a 「标题条带文字」 selector: 自动 / 跟随主题 (no override emitted at all) / 始终白色 / 始终黑色, whitelisted on the host half and round-tripped by npm test.
  • In-place header popovers are claimed, and the claim no longer waits for a frame. The session-log … menu renders without portal, so only a fragile _denseList class arm ever styled it; a candidate is now "portaled to <body> or a descendant of a header slot anchor", and the flush moved off requestAnimationFrame onto the microtask queue — a queued frame never runs while a window is not painting, which is what made the 顶栏 sliders look dead (measured live in dsh web).
  • The 「标题栏」 row's frost rides a ::before underlay now. A backdrop-filter on the row made it a backdrop root, so the panels hanging off it could only blur a flat tint; isolation:isolate keeps the stacking context without the backdrop root, and the row keeps its compensating z-index:10.
  • A 0 on a menu blur slider means no frost. Through 0.3.7 the gate made the slider's low end its high end (0 → the host's 40 px, 1 → 1 px), so "turn the blur off" was unreachable. Part defaults stay at 30 px, so a stock install keeps the frosted look.
  • Fresh installs get working opacity sliders again. The host declares its surface token set on body; sampling :root returned nothing, so with no picked theme color every alpha was never emitted. Sampling now reads body, cached per host generation, with the plugin's own token sheet switched off during the read.
  • Verified in the real dsh web app driven through the actual sliders: both header menus report rgba(243,247,252,1) + blur(4px) at 100/4 and rgba(243,247,252,0.08) + blur(44px) at 8/44; a local page running the plugin's real generated stylesheet confirms blur 0 → backdrop-filter: none and 25 → blur(25px).

Full changelog: https://github.com/Tkingxiao/dsh-any-background/blob/main/README.zh.md

v0.3.8 — 「标题栏」设置落盘、条带不再吞点击,侧栏合为一层,支持到 DSH 0.2.1-rc.2

Choose a tag to compare

@Tkingxiao Tkingxiao released this 17 Oct 15:19

v0.3.8 — 「标题栏」设置能落盘了,条带不再吞点击,侧栏重新是一个面(修 issue #28 / #29,支持到 DSH 0.2.1-rc.2)

变更

  • 「标题栏」的三项设置重启后还在(issue #28、#29 第 2 条):根因在宿主半侧的白名单——normalizeConfig() 的 blurs 列表没有 headerBar,顶层有 headerOpacity 却没有 headerBarOpacity,STROKE_GROUPS 同样缺,而 writeConfig() 是「先归一化再落盘」,于是这张卡的三项在校验层就被丢掉(控制台打 ignoring unknown config field "blurs.headerBar");浏览器半侧读回时用自己的默认值回填(30px / 50%),看起来就是"保存成功、重启还原"。保存 Profile 的归一化器有同一个洞,还额外丢了 blurs.header。现在五处补齐(PartBlurs / DEFAULT_CONFIG / STROKE_GROUPS / 两个归一化器 / ProfileAppearance),并新增 npm test:用临时 $DSH_HOME 启起真实的宿主半侧,跑「写盘 → 重读 → Profile」整条往返,同时断言那条警告保持静默。
  • 条带的左段不再吞点击(issue #29 第 1 条):Chromium 收集 -webkit-app-region 是按绘制序的,0.3.7 给生成的条带左段标的 drag 覆盖掉了原生标题栏菜单宿主自己挖的 no-drag 洞,于是左上那排导航点不动而拖窗口照常。这一段现在是纯绘制:pointer-events:none,完全不声明 app-region,拖拽仍由宿主的 .frame::before 承担。
  • 模态蒙版现在也盖得住标题条带(issue #29 第 4 条):宿主的蒙版故意从标题栏下方起(--dsh-frame-chrome-top)以保住原生拖拽条,结果壁纸一开顶部 40px 是一条亮带。这一段既然是插件自绘,就在模态存在时用宿主自己的 --dsw-alias-bg-mask-1 自行变暗,不改变任何交互。浏览器实测:关闭 box-shadow: none → 打开 inset 蒙版 → 关闭恢复 none。
  • 「只覆盖右段」是设计(issue #29 第 3 条):左侧栏正上方那一段本来就是侧栏列的表面,所以条带按宿主发布的 --dsh-windows-sidebar-width 切开——左段归「侧栏」那对滑块(同一份颜色字面量、同一份模糊镜像),右侧全部归「标题栏」;拖动或折叠侧栏时切口自己跟着走。已在两份 README 写明。
  • 压在条带上的侧栏开合按钮重新看得见了:两处叠错。一是那段板子按树序排在侧栏列之后,而侧栏一开模糊就成为层叠上下文,宿主 fixed 在条带上的按钮被我们自己的板子冲淡——改为 z-index:-1 绘制(高于壁纸、低于所有控件);二是按钮墨色取自 --dsw-alias-label-secondary,插件按选定主题色把它翻白,可条带显示的是该调色板在侧栏不透明度下叠壁纸的结果——22% 压明亮壁纸时条带偏亮,白字消失。条带现在按它实际被画在什么上推导自身墨色(约 85% 以上由表面色决定,以下由壁纸明暗决定),另有折叠态变体,由宿主自己的 data-sidebar-collapsed 切换。
  • 侧栏重新读作一个面(顶部与下方不再分层):--dsw-specific-sidebar-fill 是宿主以不透明发布的主题令牌,而侧栏区域里有三处各自 background:var(该令牌) 互相叠涂——AppFrame 的 .sidebarCol、其内 SidebarRoot 的 .root、工作区树那条 24px 的 .fade。不透明时看不出来,交给「侧栏」透明度滑块就不是;桌面端尤其明显:上方条带只画一次,于是条带一个浓度、下面的列另一个浓度。现在把该令牌在列的后代上声明为 transparent,让最外层的列成为唯一绘制者——这正是宿主在 macOS 上的选择(清 .root 底色、.fade 直接 display:none,理由同一条)。绑定用 CSS-Module 类名形状 [class*="_sidebarCol"],已在 0.2.0-rc.1 / 0.2.1-alpha.3 / 0.2.1-rc.2 三个安装产物核实一致。
  • 插件安装对话框的「npm 源」面板保持宿主的不透明度:<fieldset data-install-registry> 被 portal 到 document.body(position:fixed; z-index:1100),底色取 --dsw-alias-bg-layer-2/3——正是「卡片」滑块全局接管的令牌,于是它跟着卡片一起淡掉;而宿主写在那条规则上的注释说它必须不透明("keeps the registry form controls readable over the dialog")。现已并入 applyExemptDefaults 既有的豁免组:保持当前主题色、alpha 钉在 1,值同时覆盖子树(自定义属性只向下传播),不撤模糊、不改字色、不外溢到别的表面。
  • 版本支持到 0.2.1-rc.2:0.2.1-alpha.3 把后台任务列表改画到共享的 MenuSurface(表面根没有 role,底色与磨砂落在它的 .material 子层),于是运行时标记器也认领 body 级 [data-menu-material],顶栏选择器组加同一分支,更早自绘的 ul[class*="_menu"] 形状继续匹配。从 alpha.3 逐 tag 核到 rc.2:适配层发言的文件一个都没动。0.2.1-alpha 与 0.2.1-rc 因此合为一个 0.2.1 渠道,每个构建一条 SUPPORTED_RELEASES 行(均 exact),engines / 受门禁的 peerDependencies / dsh.compatibility 与两份 README 逐一点名。

更新到 v0.3.8 后请重启一次 dsh web / 桌面端:宿主的兼容检查是在组装 profile 时跑的,不在插件更新时跑。

English

  • The 「标题栏」 (Header bar) card's settings survive a restart (issues #28 / #29 item 2): the host half whitelists config keys before writing, and blurs.headerBar, headerBarOpacity and strokes.headerBar were never in that list — the browser half then restored them from its own defaults (30 px / 50%), which reads as "saved, reverted on reload". All five places are fixed, and npm test now boots the built host half against a throwaway $DSH_HOME and asserts the whole disk + reload + profile round trip.
  • The caption band's left segment no longer swallows clicks (#29 item 1): a -webkit-app-region: drag annotation on our generated layer overrode the no-drag holes the native caption menubar punched for itself. The segment is paint-only now; the host's own .frame::before still carries the drag region.
  • A modal's dim now reaches the caption strip (#29 item 4): the band is the plugin's own paint, so it dims itself with the host's --dsw-alias-bg-mask-1 while a modal exists, with no interaction change.
  • The band has two owners ON PURPOSE (#29 item 3): the segment above the left sidebar follows the 「侧栏」 pair, everything right of --dsh-windows-sidebar-width follows 「标题栏」.
  • The sidebar toggle over the strip is readable again: the band segment paints at z-index:-1, and the caption strip derives its own ink from what it is actually painted on (palette direction past ~85% opacity, wallpaper brightness below it).
  • The sidebar is one surface again: --dsw-specific-sidebar-fill was painted three times in that region (.sidebarCol, SidebarRoot .root, the workspace tree's bottom .fade), so a translucent 「侧栏」 opacity stacked its alpha while the caption strip above it painted once — the visible top/bottom split. The token is now transparent for the column's descendants, leaving the outermost column as the single painter, the same owner the host chose on macOS.
  • The plugin-install dialog's npm-registry panel keeps the host's opacity: a createPortaled position:fixed fieldset that fills from the layer tokens the 「卡片」 slider owns, faded despite the host's own "must stay opaque to stay readable" comment. It joins the existing exemption set — current theme color, alpha pinned to 1, subtree included, nothing else touched.
  • Supported through DSH 0.2.1-rc.2: the 0.2.1-alpha and 0.2.1-rc channels collapse into one 0.2.1 channel with a verified row per build, and body-level [data-menu-material] surfaces are now claimed so menus that paint through a MenuSurface layer keep fading and frosting with their slider.

Full changelog: https://github.com/Tkingxiao/dsh-any-background/blob/main/README.zh.md

v0.3.6 鈥?銆屾爣棰樻爮銆嶅崱鐗囨帴绠?Windows 鏍囬鏉″甫涓庡師鐢熸寜閽尯

Choose a tag to compare

@Tkingxiao Tkingxiao released this 05 Oct 14:58

v0.3.6 鈥?銆屾爣棰樻爮銆嶅崱鐗囨帴绠?Windows 鏍囬鏉″甫涓庡師鐢熸寜閽尯锛堜慨 issue #23锛?

鍙樻洿

  • **WCO 鏍囬鏉″甫缁戝畾鍒般€屾爣棰樻爮銆嶅崱鐗?*锛氭潯甯︼紙AppFrame.module.css 鐨?.frame::before锛夋鍓嶆寜瀹夸富鐨勪晶鏍忎护鐗屼笂鑹层€佸畬鍏ㄤ笉褰掓彃浠剁鈥斺€斻€屼晶鏍忋€嶆粦鏉嗕竴鍔紝绐楀彛鏍囬鍖哄氨璺熺潃鍙橀€忔槑锛屾爣棰樹笌銆屽簲鐢?/ 缂栬緫銆嶈彍鍗曟爮鐩存帴鍘嬪湪瑁稿绾镐笂銆傜幇鍦ㄦ潯甯︾殑搴曡壊灏辨槸銆屾爣棰樻爮銆嶅崱鐗囩殑鏉愯川鍦ㄨ鍗$墖閫忔槑搴︿笅鐨勫彇鍊硷紝妯$硦鍙栧悓涓€浠芥ā绯婂彉閲忥細涓€瀵规粦鍧楀悓鏃堕┍鍔ㄤ細璇濇爣棰樿涓庣獥鍙f爣棰樻潯甯︼紝涓ゅ涓嶅彲鑳藉啀瀵逛笉涓娿€?- **鍘熺敓鏈€灏忓寲 / 鏈€澶у寲 / 鍏抽棴鍧椾笉鍐嶈嚜缁樿儗鏅?*锛氬彇鑹叉帰閽堟敼鎶?transparent锛岃 Windows 涓嶇敾鎸夐挳鍧楃殑鑳屾櫙锛涙潯甯︽湰灏变弗涓濆悎缂濊鐩栬繖 40px锛屼簬鏄寜閽尯闇插嚭鐨勬鏄潯甯︽湰韬紝涓€鏁村潡杩炵画锛屼换浣曢€忔槑搴︿笅閮借嚜鍔ㄤ竴鑷淬€傦紙涓€旇瘯杩囨妸鍗$墖鏉愯川杩炲悓 alpha 鍠傜粰鎺㈤拡锛學indows 浼氭敼鎴愮粰姣忎釜鎸夐挳鍚勭敾涓€鍧楄嚜宸辩殑鑳屾櫙锛屼笁鍧楀崐閫忔槑鍙犳垚涓夊潡鏇翠寒鐨勫皬鏂瑰潡銆傦級瀛楀舰棰滆壊浠嶅崟鐙彇 --dsw-alias-label-primary锛屼繚鎸佷笉閫忔槑鍙銆?- 鍐呭鍒楀乏涓婅鏀规垚鐩磋锛歚AppFrame 缁?.centerCol 宸︿笂瑙?16px 鍦嗚骞惰鎺夋孩鍑猴紝甯т竴鏃﹁娓呮垚閫忔槑璁╁绾搁€忓嚭鏉ワ紝閭d釜缂哄彛灏卞湪浼氳瘽鏍囬琛岀殑澶村嚑涓儚绱犱笅闇插嚭澹佺焊銆傛彃浠剁幇鍦ㄦ妸璇ヨ褰掗浂锛坄dab-center-flat锛夈€?- 绌虹櫧浼氳瘽涓嶅啀琚璁ら锛氭棤浼氳瘽 / 绌轰細璇濇椂瀹夸富鎶婅琛屾爣鎴?headerBlank锛堝彧鐣?padding 鐨勫崰浣嶏級锛屾彃浠舵鍓嶇収鏍疯棰嗗苟涓婂簳鑹诧紝浜庢槸銆屾湰璇ユ病鏈夋爣棰樻爮銆嶇殑鏃跺€欏嚟绌哄啋鍑轰竴涓銆傜幇鍦ㄨ棰嗗墠鍏堟帓闄よ鏍囪锛屽苟涓旇棰嗘敼涓恒€屽彧鏈変竴涓寔鏈夎€呫€嶏細鍒囧埌绌虹櫧鎬佹垨瀹夸富鎹㈡帀杩欎竴琛屾椂锛屾棫绫讳細琚憳鎺夈€?

English

  • The Header bar card now also drives the desktop shell's Windows caption band 鈥?its fill and frost read the card's two variables, so the window caption and the session title row can never disagree (issue #23, symptom 1).
  • The native minimize / maximize / close block no longer paints a background of its own: the desktop preload's probe now reports transparent, so the band itself shows through as one continuous surface at every opacity. Glyph color is still measured separately, so it stays readable.
  • The content column's top-left 16px radius is squared (dab-center-flat), so the wallpaper no longer leaks through that notch under the conversation header.
  • Blank sessions are no longer claimed: the host's headerBlank placeholder row is skipped, and the header-bar class now has a single owner that is released when the row goes blank or is replaced.

Full changelog: https://github.com/Tkingxiao/dsh-any-background/blob/main/README.zh.md

dsh-any-background v0.3.5

Choose a tag to compare

@Tkingxiao Tkingxiao released this 05 Oct 12:56

发布物:dsh-any-background@0.3.5 | 适配宿主:DSH 0.1.5-rc.2 ~ 0.2.1-alpha.1(engines 与 peer 列表均覆盖)

新增

  • 新增第 11 个界面部件「标题栏」:会话顶部那条标题 / 操作 / 视图页签行终于有了自己的透明度 + 模糊滑块,字体页的描边分组同步新增该部件。该行由插件在运行时从 conversation.session.header* 槽位锚点向上认领最近的 header 元素并打上自己的类(与卡片、帧同款做法),不猜哈希类名;0.1.7-alpha.1 之前宿主把该槽位裸挂在会话根上、没有这一行元素,那种宿主上该部件自然无效果。

修复

  • Windows 桌面端标题栏条带不再半透明(issue #23 现象一):宿主的标题栏底(AppFrame 的 .frame 与 .frame::before)填的是 --dsw-specific-sidebar-fill,而该令牌由「侧栏」滑块改写成半透明值,于是侧栏压暗时窗口自己的标题栏行一起变空、壁纸直接顶到窗口最上沿。现在标题栏条带按材质实色作画,默认保持可读,且不跟随任何滑块。
  • 桌面端原生窗口按钮区不再发灰(issue #23 现象二):右上角的最小化 / 最大化 / 关闭由 Windows 以单色绘制,颜色来自桌面 preload 从 --dsw-specific-sidebar-fill 量到的值,而插件会把它改写成滑块的 alpha,导致按钮区看起来半透明、发灰。现在插件只把宿主那个取色探针钉回材质的实色:页面照旧跟随滑块,按钮区保持宿主自己的不透明颜色。

说明

  • 「标题栏」这对滑块只作用于会话标题行;窗口标题栏条带(WCO)不受任何滑块控制,默认保持可读。
  • 本次改动已在本机 DSH 桌面版 0.2.0-rc.2 上实测:条带计算色为不透明 rgb(64, 90, 130),标题行的透明度 / 模糊变量改写后即时生效。

dsh-any-background v0.3.1

Choose a tag to compare

@Tkingxiao Tkingxiao released this 23 Sep 19:01

dsh-any-background v0.3.1

发布物:dsh-any-background@0.3.1 | 适配宿主:DSH 0.1.5-rc.2 ~ 0.1.7-rc.1(全部七个已公开发布版本,逐条核对)

⚠️ 升级须知(宿主为 0.1.7-rc.1 的用户请先看这条)

从 0.1.7-rc.1 起,宿主在 profile 组装阶段会用 semver 校验每个插件声明的 @deepseek-ai/dsh* peerDependencies,范围不匹配就在导入任何模块之前把该插件整行禁用。已装的 0.3.0 在 rc.1 宿主上会直接不加载——请更新到本版(七个 peer 已补上 || 0.1.7-rc.1),或在插件管理器里授予「精确版本豁免」。校验只发生在启动时,所以改完 manifest 或换版本都要重启宿主。engines.dsh 仍然只是声明,真正决定能不能加载的是 peer 列表。

新增 / 变更

  • 版本适配按宿主 release 隔离:每个已核对版本一个独立目录,各自描述该版本的面板力学与顶栏槽位,新增宿主支持等于加一个目录并登记,基础代码不再比较版本字符串。
  • 落在核对表外的宿主按就近原则取档:同线不同构建(如 0.1.6-alpha.4)沿用该线档位;整条线未核对时收边(更新→最新档,更旧→最低档,夹中间→较低档),并打一条日志说明本宿主不在核对范围内、由哪一档代管——完全解析不到 release 才交给 DOM 仲裁。
  • 确定宿主版本时不再依赖 :has():顺带修掉在不支持 :has() 的引擎上,0.1.5 / 0.1.6 面板提升整条失效的问题。
  • 「插件」页的分组卡片列表加上圆角磨砂底板:此前设置界面淡出后整张表直接浮在壁纸上。
  • 界面页标签「设置界面透明度」→「设置界面」。
  • 首次安装默认值改为「原样展示壁纸」:主背景透明度 0.5 → 0、主背景模糊 30 → 0、背景页「背景模糊」30 → 0。仅影响没有历史配置的新装;已有配置的实例仍读你存的数值,想立刻看到效果需手动拖动这三条滑块。

修复

  • 展开/收起右侧栏动画期间壁纸消失:AppFrame 的透明底色原用内联 background: transparent 清除,宿主动画里重写 style 会把它丢掉,框架回落到不透明层、壁纸被盖住,其上每一层磨砂同时被压平(backdrop-filter 背后无内容即无从模糊)。现改为带 !important 的类规则,宿主写 style 也够不着。
  • 启动时「对话卡片」套到设置页上:聊天视图尚未挂载(例如开着设置面板启动)时,无标记回退按几何挑「最大的可滚动元素」,于是设置页面被穿上卡片外壳并覆一层整窗磨砂垫。现在回退只细化已存在的对话。
  • 分部位毛玻璃的覆盖区域错位:承载磨砂的元素那条类名规则漏写开头的点(dab-part-blur{isolation:isolate}),该层从未建立层叠上下文,z-index:-1 的磨砂垫落进页面级层叠上下文,取样范围与落位都不再对应那个表面。这个缺陷早于 v0.3.0 就存在。
  • 顶栏浮层选择器收敛为单一来源(此前重复三份),0.1.6-alpha.2 独有的 leading 槽位不再泄漏进基础代码。
  • 更正几条对宿主的错误假设:原生右侧栏与 ctx.sidebarRightTabs 并非新宿主特性(0.1.5-rc.2 即已提供),dockkit 本身也存在得更早——只有 host / empty 两个属性才是 0.1.7 的标记。