dsh-m 0.9.82 → 0.9.83
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 +12 -0
- package/lib/client.js +56 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,12 @@ The full release history of dsh-m, maintained bilingually: **Chinese first, Engl
|
|
|
8
8
|
|
|
9
9
|
## 中文
|
|
10
10
|
|
|
11
|
+
### 0.9.83 功能:手机窄屏自适应——面板头部两行重排 + 窄视口默认全屏
|
|
12
|
+
|
|
13
|
+
- **问题(主人手机实拍)**:`.dshm-head` 是单行 no-wrap flex,最小内容宽 ~440-470px,手机面板内容宽仅 330-365px → 行尾溢出被 `.dshm-panel` overflow:hidden 裁掉:还原/关闭按钮组不可见不可点(关面板只剩遮罩点击)、版本 chip 拦腰截断、标题逐词换行、seg 键逐字竖排。移动端问题第三次以「用户手机截图反馈」方式暴露(0.9.66 触屏滑动方向、0.9.67 字号失控之后)。
|
|
14
|
+
- **方案(容器查询两行重排 + 窄视口默认全屏,grilling 共识 Q1-Q10 + 独立评审 4 轮 11 条修订 R1-R8/N1-N3)**:`.dshm-panel` 加 `container-type:inline-size`(面板宽高均公式派生不依赖内容,包含安全;灯箱 portal 挂 body、sticky 行在滚动容器内,均不受影响),`@container (max-width:600px)` 两行重排——行1 [短标题 ⋯spacer⋯ chip winctl]、行2 [seg 三键拉通 36px 触控];DOM 顺序零改动(纯 order+wrap,源锚/tab 序/读屏序稳定);标题双 span 切换(窄显「插件市场」,`title.panel` 现成 key);版本 chip 常态隐藏、warn 态缩为 ⬆ icon(tooltip/自升级语义不变),隐藏/收拢规则以专属类 `.dshm-verchip` 收窄——头部 profile 徽标(非 web profile)不在共识范围、不受影响;新规则对不支持容器查询的浏览器零生效(条件规则组等效兜底,老浏览器逐字节同旧版);窄视口(≤600px)初始挂载恒全屏(仅判定一次、不随 resize 跟随,FS_KEY 记忆窄视口下不生效——防「还原一次被永久记住挤压态」),宽视口行为逐字节同今日;overlay 窄视口 padding 8px。范围红线:ZoneChips/卡片网格/灯箱/设置页/遮罩契约/拖拽模型零触碰。
|
|
15
|
+
- **验证**:1440 项测试全绿(0.9.82 基线 1435 + 新增源锚 5 组于 client-mobile-head.test.mjs;既有 render-smoke 两处断言同步改写——「warn 类名锚 + `⬆ v…` 文本锚」,0.9.82「一处既有用例标题改写」先例同款)、typecheck 零错误(`run-command-error-digest` F1 族时序用例为既有载荷敏感假红、与本改动无关(干净 HEAD 加压复现同红)——本版随执行评审 E5 以「就绪门」根治四用例(F1/T5 abort/timeout、F1-R/A/C):3 并发加压 9/9 全绿,修复前同法 6/6 红);`node scripts/verify-panel-mobile.mjs` 真浏览器 13 断言全过(393×852 窄 + 1280×800 宽 + FS_KEY 2×2 矩阵 + chip 双态:默认全屏/winctl 可达/头部零溢出/标题切换/seg 36px 触控/chip 隐藏与 warn 收拢/还原态 8px/宽视口 FS_KEY 回归);verify 脚本照 verify-lightbox 惯例手动运行不进 CI(本地 http 源 + /dshm 桩,零外网依赖);真机复核:主人手机。
|
|
16
|
+
|
|
11
17
|
### 0.9.82 功能:外部操作记录 failed 行单条移除——红点死锁解除(ADR-0018 修订)
|
|
12
18
|
|
|
13
19
|
- **问题(红点死锁 + 操作层与展示层不对齐)**:外部记录(CLI / Agent 工具通道)失败后点亮设置 tab 红点,但外部行没有单条 ✕——0.9.79 的原裁决因服务端只有 list/clear 而不给出 ✕ 出口;唯一消除手段「清除已结束」连带清空全部终态记录(含成功历史),行为上等同永久亮灯,警报疲劳会让红点彻底失效。展示层(渠道徽标、按日分组、计数)0.9.79 起已与本地记录同构,唯独操作层掉队。
|
|
@@ -585,6 +591,12 @@ The full release history of dsh-m, maintained bilingually: **Chinese first, Engl
|
|
|
585
591
|
|
|
586
592
|
## English
|
|
587
593
|
|
|
594
|
+
### 0.9.83 Feature — mobile adaptive layout: two-row panel head + fullscreen-by-default on narrow viewports
|
|
595
|
+
|
|
596
|
+
- **Problem (user phone screenshot)**: `.dshm-head` is a single-line no-wrap flex whose minimum content width is ~440-470px, while a phone panel offers only 330-365px — the row-end overflow gets clipped by `.dshm-panel`'s `overflow:hidden`: the restore/close button group becomes invisible and untappable (closing the panel is left to backdrop taps only), the version chip is cut mid-glyph, the title wraps word-by-word into a tower, and the seg tabs stack their CJK labels one character per line. This is the third mobile issue surfaced via "user phone screenshot" (after 0.9.66 touch-swipe direction and 0.9.67 font blow-up).
|
|
597
|
+
- **Fix (container-query two-row re-layout + fullscreen-by-default on narrow viewports, grilling consensus Q1-Q10 + 11 revisions from a 4-round independent review R1-R8/N1-N3)**: `.dshm-panel` gains `container-type:inline-size` (panel width/height are formula-derived and content-independent, so containment is safe; the lightbox portals to body and the sticky category row lives inside the scroll container — neither is affected), and `@container (max-width:600px)` re-lays the head into two rows — row 1 [short title ⋯spacer⋯ chip winctl], row 2 [three seg tabs stretched full-width at 36px touch height]; DOM order is untouched (pure order+wrap — source anchors, tab order and screen-reader order all stable); the title switches via dual spans (short 「插件市场」 on narrow, reusing the existing `title.panel` key); the version chip is hidden in its idle state and collapses to a ⬆ icon when outdated (tooltip and self-upgrade semantics intact), with hide/collapse rules narrowed by the dedicated `.dshm-verchip` class — the head's profile badge (non-web profiles) is outside the consensus and unaffected; new rules are inert on browsers without container-query support (conditional-rule-group equivalent fallback — byte-identical to the old layout); on viewports ≤600px the panel mounts fullscreen by default (checked once at mount, not followed on resize; the FS_KEY memory is ignored on narrow viewports — preventing "restore once, stay cramped forever"), while wide viewports stay byte-for-byte identical to today; overlay padding drops to 8px on narrow viewports. Scope red lines: ZoneChips, card grid, lightbox, settings tab, backdrop-close contract and the drag model are untouched.
|
|
598
|
+
- **Verification**: 1440 tests green (0.9.82 baseline 1435 + 5 new source-anchor groups in client-mobile-head.test.mjs; two existing render-smoke assertions rewritten in sync — the warn class anchor and the `⬆ v…` text anchor, same precedent as 0.9.82's single retitled case), typecheck clean (`run-command-error-digest` F1-family timing cases are a pre-existing load-sensitive false-red, unrelated to this change — reproduced red under load on a clean HEAD too; this release also cures all four of them (F1/T5 abort/timeout, F1-R/A/C) with a readiness gate per execution-review E5: 3-instance concurrent stress 9/9 green, vs 6/6 red before); `node scripts/verify-panel-mobile.mjs` passes all 13 real-browser assertions (393×852 narrow + 1280×800 wide + the FS_KEY 2×2 matrix + both chip states: default fullscreen / winctl reachable / zero head overflow / title switching / 36px seg touch targets / chip hidden and warn collapsed / 8px restored overlay / wide-viewport FS_KEY regression); the verify script follows the verify-lightbox convention — manual, not in CI (local http origin + /dshm stub, zero external network); real-device recheck: the owner's phone.
|
|
599
|
+
|
|
588
600
|
### 0.9.82 Feature — per-row dismiss for failed external operation records: the red-dot deadlock is broken (ADR-0018 revision)
|
|
589
601
|
|
|
590
602
|
- **Problem (red-dot deadlock + ops layer lagging behind the display layer)**: a failed external record (CLI / agent-tool channel) lights the settings-tab red dot but had no per-row dismiss — the 0.9.79 ruling withheld the ✕ because the server only exposed list/clear. The only way to clear the dot, "Clear ended", also wipes every finished record (successful history included) — behaviorally a permanent alert, and alert fatigue defeats the dot entirely. The display layer (channel badge, day grouping, counts) has been isomorphic with local records since 0.9.79; only the operations layer lagged.
|
package/lib/client.js
CHANGED
|
@@ -2964,6 +2964,50 @@ button.dshm-dshchip:disabled{cursor:default;opacity:.75}
|
|
|
2964
2964
|
.dshm-compat-peers{margin:0 0 8px;padding-left:18px;font-size:12px}
|
|
2965
2965
|
.dshm-compat-peers li{font-family:ui-monospace,monospace}
|
|
2966
2966
|
.dshm-compat-risk{font-size:12px;color:#f87171;margin-bottom:12px}
|
|
2967
|
+
/* ---------- \u624B\u673A\u7A84\u5C4F\u81EA\u9002\u5E94\uFF080.9.83\uFF0C\u4E3B\u4EBA\u624B\u673A\u622A\u56FE\u9A71\u52A8\uFF09 ---------- */
|
|
2968
|
+
/* \u75C5\u7076\uFF080.9.82 \u5B9E\u62CD\uFF09\uFF1A.dshm-head \u5355\u884C no-wrap flex \u6700\u5C0F\u5185\u5BB9\u5BBD ~440-470px\uFF0C\u624B\u673A\u9762\u677F
|
|
2969
|
+
\u5185\u5BB9\u5BBD\u4EC5 330-365px \u2192 \u884C\u5C3E\u6EA2\u51FA\u88AB .dshm-panel overflow:hidden \u88C1\u6389\u2014\u2014winctl\uFF08\u8FD8\u539F/\u5173\u95ED\uFF09
|
|
2970
|
+
\u4E0D\u53EF\u89C1\u4E0D\u53EF\u70B9\u3001\u7248\u672C chip \u62E6\u8170\u622A\u65AD\u3001\u6807\u9898\u9010\u8BCD\u6362\u884C\u3001seg \u952E\u9010\u5B57\u7AD6\u6392\u3002
|
|
2971
|
+
\u8F7D\u4F53\u9009\u578B\uFF1A\u5BB9\u5668\u67E5\u8BE2\u800C\u975E\u89C6\u53E3\u5A92\u4F53\u67E5\u8BE2\u2014\u2014\u9762\u677F\u6709\u8FD8\u539F\u5C45\u4E2D/.abs \u62D6\u62FD\u4F4D/.full \u5168\u5C4F\u4E09\u5F62\u6001\uFF0C
|
|
2972
|
+
\u89C6\u53E3\u5BBD \u2260 \u9762\u677F\u5BBD\uFF08600px \u89C6\u53E3\u2192568px \u9762\u677F\u4ECD\u6EA2\u51FA\uFF09\uFF1B\u5BB9\u5668\u67E5\u8BE2\u8DDF\u968F\u9762\u677F\u5B9E\u9645\u5BBD\u5EA6\u3002\u9762\u677F\u5BBD\u9AD8
|
|
2973
|
+
\u5747\u4E3A min(920px,100%)/min(680px,86vh) \u516C\u5F0F\u6D3E\u751F\u3001\u4E0D\u4F9D\u8D56\u5185\u5BB9\uFF0Cinline-size \u5305\u542B\u5B89\u5168\uFF1B
|
|
2974
|
+
\u706F\u7BB1 portal \u6302 body\uFF080.9.73\uFF09\u3001\u5206\u7C7B\u884C sticky \u5728 .dshm-body \u6EDA\u52A8\u5BB9\u5668\u5185\uFF0C\u5747\u4E0D\u53D7\u7956\u5148
|
|
2975
|
+
inline-size \u5305\u542B\u5F71\u54CD\u3002\u65AD\u70B9\uFF1A\u5BB9\u5668 600px\uFF08\u4E24\u884C\u91CD\u6392\uFF09\u4E0E\u89C6\u53E3 600px\uFF08\u9ED8\u8BA4\u5168\u5C4F\u5224\u5B9A +
|
|
2976
|
+
overlay 8px\uFF09\u540C\u503C\u3002
|
|
2977
|
+
\u515C\u5E95\u8BED\u4E49\u8BF4\u660E\uFF08\u5171\u8BC6 Q3 + \u8BC4\u5BA1 R7\uFF09\uFF1A\u300C\u4E0D\u652F\u6301\u5BB9\u5668\u67E5\u8BE2\u7684\u6D4F\u89C8\u5668\u65B0\u89C4\u5219\u96F6\u751F\u6548\u300D\u6309 CSS
|
|
2978
|
+
\u6761\u4EF6\u89C4\u5219\u7EC4\u673A\u5236\u7B49\u6548\u843D\u5730\u2014\u2014.dshm-title-short \u57FA\u7840\u9690\u85CF\u4E0D\u4F9D\u8D56\u5BB9\u5668\u67E5\u8BE2\uFF08\u8001\u6D4F\u89C8\u5668\u4E5F\u8981
|
|
2979
|
+
\u751F\u6548\uFF09\uFF1B\u5176\u4F59\u65B0\u89C4\u5219\u90FD\u662F\u6574\u5757 at-rule\uFF08@supports/@container/@media \u9876\u5C42\u5144\u5F1F\uFF09\uFF0C\u4E0D\u652F\u6301
|
|
2980
|
+
\u5BB9\u5668\u67E5\u8BE2\u7684\u6D4F\u89C8\u5668\u5BF9\u672A\u77E5 at-rule \u6574\u5757\u5FFD\u7565\uFF0C\u6548\u679C\u7B49\u540C\u5168\u90E8\u5305\u8FDB @supports\u3002\u4E0D\u8981\u673A\u68B0\u518D
|
|
2981
|
+
\u5D4C\u5957\u4E00\u5C42\u3002 */
|
|
2982
|
+
.dshm-title-short{display:none}
|
|
2983
|
+
/* \u515C\u5E95\uFF1A\u4E0D\u652F\u6301\u5BB9\u5668\u67E5\u8BE2\u7684\u6D4F\u89C8\u5668\u53EA\u751F\u6548\u672C\u6761\u2014\u2014\u77ED\u6807\u9898\u9690\u85CF\uFF0C\u89C6\u89C9\u4E0E\u65E7\u7248\u9010\u5B57\u8282\u4E00\u81F4 */
|
|
2984
|
+
@supports (container-type: inline-size) {
|
|
2985
|
+
.dshm-panel{container-type:inline-size}
|
|
2986
|
+
}
|
|
2987
|
+
/* \u4E24\u884C\u91CD\u6392\uFF1A\u884C1 [\u77ED\u6807\u9898 \u22EFspacer\u22EF chip winctl]\uFF0C\u884C2 [seg \u62C9\u901A]\u3002DOM \u987A\u5E8F\u4E0D\u52A8
|
|
2988
|
+
\uFF08title\u2192divider\u2192seg\u2192spacer\u2192chip\u2192winctl\uFF09\uFF0C\u5168\u9760 order+wrap\u2014\u2014\u6E90\u951A/tab \u5E8F/\u8BFB\u5C4F\u5E8F
|
|
2989
|
+
\u96F6\u6270\u52A8\uFF1B\u89C6\u89C9\u5E8F\u4E0E DOM \u5E8F\u4E0D\u4E00\u81F4\uFF08seg \u5728 DOM \u524D\u3001\u89C6\u89C9\u5728\u540E\uFF09\uFF0C\u9762\u677F\u5185\u5143\u7D20\u5C11\u53EF\u63A5\u53D7 */
|
|
2990
|
+
@container (max-width:600px){
|
|
2991
|
+
.dshm-head{flex-wrap:wrap;row-gap:6px}
|
|
2992
|
+
.dshm-head-divider{display:none}
|
|
2993
|
+
.dshm-title-full{display:none}
|
|
2994
|
+
.dshm-title-short{display:inline}
|
|
2995
|
+
.dshm-spacer{order:1}
|
|
2996
|
+
.dshm-head>.dshm-dshchip{order:2}
|
|
2997
|
+
.dshm-winctl{order:3}
|
|
2998
|
+
.dshm-winctl button{height:36px}
|
|
2999
|
+
.dshm-seg{order:4;flex:1 1 100%}
|
|
3000
|
+
.dshm-seg button{flex:1;justify-content:center;white-space:nowrap;padding:0 10px;height:36px}
|
|
3001
|
+
/* \u7248\u672C chip\uFF08\u5171\u8BC6 Q7 + \u8BC4\u5BA1 R5 \u6536\u7A84\uFF09\uFF1A\u5E38\u6001\u9690\u85CF\uFF08\u8BBE\u7F6E\u9875\u968F\u65F6\u53EF\u89C1\uFF09\uFF1Bwarn \u6001\u7F29\u4E3A \u2B06
|
|
3002
|
+
icon\u2014\u2014\u6587\u5B57 span \u5168\u9690\u85CF\uFF0Ctooltip \u4E0E\u70B9\u51FB\u81EA\u5347\u7EA7\u8BED\u4E49\u4E0D\u53D8\u3002\u89C4\u5219\u4EE5\u7248\u672C chip \u4E13\u5C5E\u7C7B
|
|
3003
|
+
.dshm-verchip \u6536\u7A84\uFF1A\u5934\u90E8\u53E6\u6709 profile \u5FBD\u6807\uFF08span.dshm-dshchip\uFF0C\u4EC5\u975E web profile
|
|
3004
|
+
\u6E32\u67D3\uFF09\uFF0C\u4E0D\u5728\u5171\u8BC6\u8303\u56F4\u5185\uFF0C\u4E0D\u5F97\u8FDE\u5E26\u9690\u85CF */
|
|
3005
|
+
.dshm-head>.dshm-verchip:not(.warn){display:none}
|
|
3006
|
+
.dshm-verchip.warn .dshm-dshchip-name,.dshm-verchip.warn .dshm-dshchip-v,.dshm-verchip.warn .dshm-up-v{display:none}
|
|
3007
|
+
}
|
|
3008
|
+
/* overlay \u7A84\u89C6\u53E3\u515C\u5E95\uFF1A\u8FD8\u539F\u6001 8px\uFF08.full \u7684 padding:0 \u7279\u5F02\u6027 (0,2,0)>(0,1,0) \u81EA\u7136\u4FDD\u6301\uFF09\uFF1B
|
|
3009
|
+
\u7A84\u89C6\u53E3\u9ED8\u8BA4\u5168\u5C4F\u7684 JS \u5224\u5B9A\u5728 MarketPanel full \u521D\u59CB\u5316 */
|
|
3010
|
+
@media (max-width:600px){.dshm-overlay{padding:8px}}
|
|
2967
3011
|
`;
|
|
2968
3012
|
function cssVersionOf(s) {
|
|
2969
3013
|
let h2 = 5381;
|
|
@@ -5081,21 +5125,21 @@ function DshmVersionChip({ version, notify, initialCheck }) {
|
|
|
5081
5125
|
"button",
|
|
5082
5126
|
{
|
|
5083
5127
|
type: "button",
|
|
5084
|
-
className: "dshm-dshchip warn",
|
|
5128
|
+
className: "dshm-dshchip dshm-verchip warn",
|
|
5085
5129
|
title: lookup("selfupdate.available", { v: state.latest }),
|
|
5086
5130
|
onClick: doUpgrade,
|
|
5087
5131
|
disabled: busy
|
|
5088
5132
|
},
|
|
5089
|
-
"dsh-m ",
|
|
5133
|
+
h("span", { className: "dshm-dshchip-name" }, "dsh-m "),
|
|
5090
5134
|
h("span", { className: "dshm-dshchip-v" }, `v${version}`),
|
|
5091
|
-
busy ? h(Spin) : h("span", { className: "dshm-up" },
|
|
5135
|
+
busy ? h(Spin) : h("span", { className: "dshm-up" }, "\u2B06", h("span", { className: "dshm-up-v" }, ` v${state.latest}`))
|
|
5092
5136
|
);
|
|
5093
5137
|
}
|
|
5094
5138
|
const title = state.kind === "ahead" && state.latest ? lookup("selfupdate.ahead", { v: state.latest }) : `dsh-m v${version}`;
|
|
5095
5139
|
return h(
|
|
5096
5140
|
"span",
|
|
5097
|
-
{ className: "dshm-dshchip", title },
|
|
5098
|
-
"dsh-m ",
|
|
5141
|
+
{ className: "dshm-dshchip dshm-verchip", title },
|
|
5142
|
+
h("span", { className: "dshm-dshchip-name" }, "dsh-m "),
|
|
5099
5143
|
h("span", { className: "dshm-dshchip-v" }, `v${version}`)
|
|
5100
5144
|
);
|
|
5101
5145
|
}
|
|
@@ -5144,6 +5188,7 @@ function MarketPanel({ onClose }) {
|
|
|
5144
5188
|
const FS_KEY = "dshm-panel-fullscreen";
|
|
5145
5189
|
const [full, setFull] = useState(() => {
|
|
5146
5190
|
try {
|
|
5191
|
+
if (typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(max-width: 600px)").matches) return true;
|
|
5147
5192
|
return typeof window !== "undefined" && window.localStorage ? window.localStorage.getItem(FS_KEY) === "1" : false;
|
|
5148
5193
|
} catch {
|
|
5149
5194
|
return false;
|
|
@@ -5509,7 +5554,12 @@ function MarketPanel({ onClose }) {
|
|
|
5509
5554
|
e.preventDefault();
|
|
5510
5555
|
}
|
|
5511
5556
|
},
|
|
5512
|
-
h(
|
|
5557
|
+
h(
|
|
5558
|
+
"span",
|
|
5559
|
+
{ className: "dshm-title" },
|
|
5560
|
+
h("span", { className: "dshm-title-full" }, lookup("title.full")),
|
|
5561
|
+
h("span", { className: "dshm-title-short" }, lookup("title.panel"))
|
|
5562
|
+
),
|
|
5513
5563
|
h("span", { className: "dshm-head-divider", "aria-hidden": "true" }),
|
|
5514
5564
|
h(
|
|
5515
5565
|
"div",
|