@lmzhen/dsh-evolution-settings-ui 0.27.2 → 0.27.3

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/README.md CHANGED
@@ -65,9 +65,9 @@ dropped rather than painted under another row's heading.
65
65
 
66
66
  ## The diagnostics card
67
67
 
68
- One card in the same section is the read-only **self-check** (`data-card="diagnostics"`): it renders the Host's one `DiagnosticsView` — the same object the CLI and `/api/dsh-evolution/diagnostics` answer — and owns no key list and no status vocabulary.
68
+ One card in the same section is the read-only **self-check** (`data-card="diagnostics"`): it renders the Host's `DiagnosticsView` runtime window — the same rows the CLI and `/api/dsh-evolution/diagnostics` answer — and owns no key list and no status vocabulary. The view's documentation facts are a CLI/JSON concern and are deliberately not rendered here: a settings page carries the runtime reading, not a spec sheet.
69
69
 
70
- It leads with a plain-language verdict derived from the frozen runtime statuses (`运行正常` / `{n} 项需要注意` / `{n} 项异常` / `{n} 项待确认`, decided fail > warn > unknown > ok), then groups the view as **环境信息** (fact label above value) and **运行状态** (status dot and word, detail line, remedy line). The raw material — view schema, check time and each fact's source home — sits behind one **技术详情** disclosure, so the default reading path carries no identifiers.
70
+ It leads with a plain-language verdict derived from the frozen runtime statuses (`运行正常` / `{n} 项需要注意` / `{n} 项异常` / `{n} 项待确认`, decided fail > warn > unknown > ok), then renders **运行状态** rows (status dot and word, detail line, remedy line).
71
71
 
72
72
  The card is collapsible with the same `.evolution-param-head` button and body inset as the parameter cards; Refresh is an explicit control in the body (one read on mount, one per click), and a failed read renders the shared failure block with the `/evolution doctor` command fallback.
73
73
  ## A seat that arrives late revives the card
package/lib/client.js CHANGED
@@ -1069,15 +1069,15 @@ window.__ModuleLoader__.load({
1069
1069
  //#endregion
1070
1070
  //#region src/client/DiagnosticsCard.ts
1071
1071
  /**
1072
- * The diagnostics card (W7 S7): the browser face of the SAME DiagnosticsView the CLI and the
1072
+ * The diagnostics card (W7 S7): the settings face of the SAME DiagnosticsView the CLI and the
1073
1073
  * `/api/dsh-evolution/diagnostics` route answer.
1074
1074
  *
1075
1075
  * Read-only by construction: it fetches once on mount and only refetches on an explicit Refresh; a
1076
- * failed read renders the shared FailureBlock with the command-face fallback. The client still owns
1077
- * no key list and no status vocabulary: it renders the host view's own order, groups the two
1078
- * sections the view carries (environment facts / runtime rows) and gives a plain-language summary
1079
- * from the frozen status set. Raw identifiers, source paths and the view schema live behind the
1080
- * one `技术详情` disclosure, not in the main reading path.
1076
+ * failed read renders the shared FailureBlock with the command-face fallback. The client owns no
1077
+ * key list and no status vocabulary: it renders the host view's frozen runtime rows and leads with
1078
+ * a plain-language summary. The view's documentation facts are a CLI/JSON concern and are
1079
+ * deliberately NOT rendered here (0.27.2 real-machine feedback: a settings page is not a spec
1080
+ * sheet; the runtime window is the whole reading).
1081
1081
  * @module @lmzhen/dsh-evolution-settings-ui/client/DiagnosticsCard
1082
1082
  */
1083
1083
  /** Which word one status gets (the frozen W1 status set). */
@@ -1113,15 +1113,6 @@ window.__ModuleLoader__.load({
1113
1113
  count: 0
1114
1114
  };
1115
1115
  }
1116
- /** A locally formatted check time; an unparseable stamp stays visible instead of becoming NaN. */
1117
- function checkedAt(iso) {
1118
- try {
1119
- const at = new Date(iso);
1120
- return Number.isNaN(at.getTime()) ? iso : at.toLocaleString();
1121
- } catch {
1122
- return iso;
1123
- }
1124
- }
1125
1116
  /**
1126
1117
  * Render the card.
1127
1118
  * @param props - the copy seat, the host call and the command fallback.
@@ -1166,21 +1157,12 @@ window.__ModuleLoader__.load({
1166
1157
  className: "evo-diag-badge",
1167
1158
  "data-status": summary.status
1168
1159
  }, t(SUMMARY_KEYS[summary.status], summary.count === 0 ? void 0 : { n: summary.count })), (0, react.createElement)("span", { className: "evolution-param-chevron" }, open ? "▲" : "▼"));
1169
- const facts = (view) => view.facts.length === 0 ? null : (0, react.createElement)("div", {}, (0, react.createElement)("h3", { className: "evolution-param-group" }, t("diagFactsTitle")), (0, react.createElement)("div", { className: "evo-diag-list" }, ...view.facts.map((fact) => (0, react.createElement)("div", {
1170
- key: "fact-" + fact.key,
1171
- className: "evo-diag-item",
1172
- "data-kind": "fact"
1173
- }, (0, react.createElement)("span", { className: "evo-diag-label" }, fact.label), (0, react.createElement)("span", { className: "evo-diag-value" }, fact.value)))));
1174
1160
  const runtime = (view) => view.runtime.length === 0 ? null : (0, react.createElement)("div", {}, (0, react.createElement)("h3", { className: "evolution-param-group" }, t("diagRuntimeTitle")), (0, react.createElement)("div", { className: "evo-diag-list" }, ...view.runtime.map((row) => (0, react.createElement)("div", {
1175
1161
  key: "runtime-" + row.key,
1176
1162
  className: "evo-diag-item",
1177
1163
  "data-kind": "runtime",
1178
1164
  "data-status": row.status
1179
1165
  }, (0, react.createElement)("div", { className: "evo-diag-row-head" }, (0, react.createElement)("span", { className: "evo-diag-dot" }), (0, react.createElement)("span", { className: "evo-diag-label" }, row.label), (0, react.createElement)("span", { className: "evo-diag-status" }, t(STATUS_KEYS[row.status]))), row.detail === void 0 ? null : (0, react.createElement)("span", { className: "evo-diag-detail" }, row.detail), row.remedy === void 0 ? null : (0, react.createElement)("span", { className: "evo-diag-remedy" }, t("diagRemedy") + row.remedy)))));
1180
- const details = (view) => (0, react.createElement)("details", { className: "evo-diag-meta" }, (0, react.createElement)("summary", {}, t("diagDetails")), (0, react.createElement)("div", { className: "evo-diag-meta-body" }, (0, react.createElement)("span", {}, t("diagCheckedAt", { at: checkedAt(view.generatedAt) })), (0, react.createElement)("span", {}, t("diagSchema", { n: view.schemaVersion })), view.facts.length === 0 ? null : (0, react.createElement)("span", { className: "evo-diag-sources-title" }, t("diagSourcesTitle")), ...view.facts.map((fact) => (0, react.createElement)("span", {
1181
- key: "source-" + fact.key,
1182
- className: "evo-diag-source"
1183
- }, (0, react.createElement)("span", { className: "evo-diag-source-label" }, fact.label), (0, react.createElement)("span", { className: "evo-diag-source-home" }, fact.home)))));
1184
1166
  const body = () => {
1185
1167
  if (state.phase === "loading") return (0, react.createElement)("p", { className: "evolution-param-loading" }, t("stateLoading"));
1186
1168
  if (state.phase === "failed") return FailureBlock({
@@ -1194,7 +1176,7 @@ window.__ModuleLoader__.load({
1194
1176
  className: "evolution-param-button",
1195
1177
  onClick: refresh,
1196
1178
  "data-action": "diag-refresh"
1197
- }, t("diagRefresh"))), facts(view), runtime(view), details(view));
1179
+ }, t("diagRefresh"))), runtime(view), view.runtime.length === 0 ? (0, react.createElement)("p", { className: "evolution-param-note" }, t("diagNoRows")) : null);
1198
1180
  };
1199
1181
  return (0, react.createElement)("section", {
1200
1182
  className: "evolution-param-card",
@@ -1310,8 +1292,7 @@ window.__ModuleLoader__.load({
1310
1292
  approvalDiffRemoved: "{n} 行删除",
1311
1293
  approvalDiffCut: "改动区域已截断",
1312
1294
  diagTitle: "诊断",
1313
- diagSubtitle: "安装、兼容与运行状态的只读自查;不会改动任何东西。",
1314
- diagFactsTitle: "环境信息",
1295
+ diagSubtitle: "运行状态的只读自查;不会改动任何东西。",
1315
1296
  diagRuntimeTitle: "运行状态",
1316
1297
  diagSummaryOk: "运行正常",
1317
1298
  diagSummaryWarn: "{n} 项需要注意",
@@ -1324,10 +1305,7 @@ window.__ModuleLoader__.load({
1324
1305
  diagStatusFail: "异常",
1325
1306
  diagStatusUnknown: "未知",
1326
1307
  diagRemedy: "建议:",
1327
- diagDetails: "技术详情",
1328
- diagCheckedAt: "检查时间:{at}",
1329
- diagSchema: "数据版本 v{n}",
1330
- diagSourcesTitle: "数据来源",
1308
+ diagNoRows: "没有可显示的运行状态",
1331
1309
  stateLoading: "正在读取…",
1332
1310
  failureUnauthorized: "需要登录:重新打开这个页面完成登录后再试。",
1333
1311
  failureForbidden: "平台拒绝了这个请求(身份不是 owner)。",
@@ -1397,8 +1375,7 @@ window.__ModuleLoader__.load({
1397
1375
  approvalDiffRemoved: "{n} lines removed",
1398
1376
  approvalDiffCut: "the changed region is truncated",
1399
1377
  diagTitle: "Diagnostics",
1400
- diagSubtitle: "A read-only check of the install, compatibility and runtime state; nothing here changes anything.",
1401
- diagFactsTitle: "Environment",
1378
+ diagSubtitle: "A read-only check of the runtime state; nothing here changes anything.",
1402
1379
  diagRuntimeTitle: "Runtime status",
1403
1380
  diagSummaryOk: "All healthy",
1404
1381
  diagSummaryWarn: "{n} need attention",
@@ -1411,10 +1388,7 @@ window.__ModuleLoader__.load({
1411
1388
  diagStatusFail: "failing",
1412
1389
  diagStatusUnknown: "unknown",
1413
1390
  diagRemedy: "Suggested: ",
1414
- diagDetails: "Technical details",
1415
- diagCheckedAt: "Checked: {at}",
1416
- diagSchema: "data version v{n}",
1417
- diagSourcesTitle: "Data sources",
1391
+ diagNoRows: "no runtime status to show",
1418
1392
  stateLoading: "reading…",
1419
1393
  failureUnauthorized: "Sign-in is required: reopen this page and sign in, then retry.",
1420
1394
  failureForbidden: "The platform refused this request (not the owner principal).",
@@ -2091,7 +2065,7 @@ window.__ModuleLoader__.load({
2091
2065
  * @returns the section element.
2092
2066
  */
2093
2067
  function SettingsSection(face) {
2094
- return (0, react.createElement)("div", { className: "evolution-params" }, (0, react.createElement)("h2", { className: "evolution-params-title" }, face.t("title")), (0, react.createElement)("p", { className: "evolution-params-subtitle" }, face.t("subtitle")), (0, react.createElement)("p", { className: "evolution-params-about" }, "0.24.0 · Web settings cards for the evolution family's parameter namespaces"), (0, react.createElement)("div", {
2068
+ return (0, react.createElement)("div", { className: "evolution-params" }, (0, react.createElement)("h2", { className: "evolution-params-title" }, face.t("title")), (0, react.createElement)("p", { className: "evolution-params-subtitle" }, face.t("subtitle")), (0, react.createElement)("p", { className: "evolution-params-about" }, "0.27.3 · Web settings cards for the evolution family's parameter namespaces"), (0, react.createElement)("div", {
2095
2069
  key: PENDING_CARD_KEY,
2096
2070
  className: "evolution-params-group"
2097
2071
  }, face.renderSlot(CARD_SLOT, {}, { entryKey: PENDING_CARD_KEY })), (0, react.createElement)("div", {
@@ -2194,7 +2168,6 @@ window.__ModuleLoader__.load({
2194
2168
  ".evo-diag-item{padding:var(--evo-space-12) 0}",
2195
2169
  ".evo-diag-item+.evo-diag-item{border-top:var(--evo-hairline-width) solid var(--dsw-alias-border-l2)}",
2196
2170
  ".evo-diag-label{display:block;color:var(--dsw-alias-label-tertiary);font-size:var(--evo-type-xs);line-height:var(--evo-leading-base)}",
2197
- ".evo-diag-value{display:block;margin:var(--evo-space-2) 0 0;color:var(--dsw-alias-label-primary);font-size:var(--evo-type-sm);line-height:var(--evo-leading-base);overflow-wrap:anywhere}",
2198
2171
  ".evo-diag-row-head{display:flex;align-items:baseline;gap:var(--evo-space-6);flex-wrap:wrap}",
2199
2172
  ".evo-diag-dot{width:var(--evo-space-6);height:var(--evo-space-6);border-radius:var(--evo-radius-pill);background:var(--evo-diag-tone,var(--dsw-alias-state-idle-primary));flex:none}",
2200
2173
  ".evo-diag-status{color:var(--evo-diag-tone,var(--dsw-alias-state-idle-primary));font-size:var(--evo-type-xs);line-height:var(--evo-leading-base)}",
@@ -2203,14 +2176,7 @@ window.__ModuleLoader__.load({
2203
2176
  ".evo-diag-item[data-status=\"fail\"]{--evo-diag-tone:var(--dsw-alias-state-error-primary)}",
2204
2177
  ".evo-diag-item[data-status=\"unknown\"]{--evo-diag-tone:var(--dsw-alias-state-idle-primary)}",
2205
2178
  ".evo-diag-detail{display:block;margin:var(--evo-space-2) 0 0;color:var(--dsw-alias-label-secondary);font-size:var(--evo-type-xs);line-height:var(--evo-leading-base);overflow-wrap:anywhere}",
2206
- ".evo-diag-remedy{display:block;margin:var(--evo-space-4) 0 0;color:var(--dsw-alias-label-tertiary);font-size:var(--evo-type-xs);line-height:var(--evo-leading-base)}",
2207
- ".evo-diag-meta{margin:var(--evo-space-12) 0 0;padding-top:var(--evo-space-8);border-top:var(--evo-hairline-width) solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);font-size:var(--evo-type-xs);line-height:var(--evo-leading-base)}",
2208
- ".evo-diag-meta>summary{cursor:pointer;user-select:none;padding:var(--evo-space-4) 0}",
2209
- ".evo-diag-meta-body{display:flex;flex-direction:column;gap:var(--evo-space-2);padding:var(--evo-space-4) 0 0}",
2210
- ".evo-diag-sources-title{padding-top:var(--evo-space-6)}",
2211
- ".evo-diag-source{display:flex;justify-content:space-between;gap:var(--evo-space-8);overflow-wrap:anywhere}",
2212
- ".evo-diag-source-label{flex:none}",
2213
- ".evo-diag-source-home{text-align:right;overflow-wrap:anywhere}"
2179
+ ".evo-diag-remedy{display:block;margin:var(--evo-space-4) 0 0;color:var(--dsw-alias-label-tertiary);font-size:var(--evo-type-xs);line-height:var(--evo-leading-base)}"
2214
2180
  ].join("\n");
2215
2181
  /**
2216
2182
  * Inject the stylesheet once per document.
@@ -1,13 +1,13 @@
1
1
  /**
2
- * The diagnostics card (W7 S7): the browser face of the SAME DiagnosticsView the CLI and the
2
+ * The diagnostics card (W7 S7): the settings face of the SAME DiagnosticsView the CLI and the
3
3
  * `/api/dsh-evolution/diagnostics` route answer.
4
4
  *
5
5
  * Read-only by construction: it fetches once on mount and only refetches on an explicit Refresh; a
6
- * failed read renders the shared FailureBlock with the command-face fallback. The client still owns
7
- * no key list and no status vocabulary: it renders the host view's own order, groups the two
8
- * sections the view carries (environment facts / runtime rows) and gives a plain-language summary
9
- * from the frozen status set. Raw identifiers, source paths and the view schema live behind the
10
- * one `技术详情` disclosure, not in the main reading path.
6
+ * failed read renders the shared FailureBlock with the command-face fallback. The client owns no
7
+ * key list and no status vocabulary: it renders the host view's frozen runtime rows and leads with
8
+ * a plain-language summary. The view's documentation facts are a CLI/JSON concern and are
9
+ * deliberately NOT rendered here (0.27.2 real-machine feedback: a settings page is not a spec
10
+ * sheet; the runtime window is the whole reading).
11
11
  * @module @lmzhen/dsh-evolution-settings-ui/client/DiagnosticsCard
12
12
  */
13
13
  import { type ReactNode } from 'react';
@@ -5,7 +5,7 @@
5
5
  * description, so the settings surface can state both without a hand-written copy.
6
6
  */
7
7
  /** The family version this surface belongs to. */
8
- export declare const FAMILY_VERSION = "0.24.0";
8
+ export declare const FAMILY_VERSION = "0.27.3";
9
9
  /** What this surface is for, in one line. */
10
10
  export declare const PACKAGE_PURPOSE = "Web settings cards for the evolution family's parameter namespaces";
11
11
  //# sourceMappingURL=generated-about.d.ts.map
@@ -72,8 +72,7 @@ export declare const zh: {
72
72
  readonly approvalDiffRemoved: "{n} 行删除";
73
73
  readonly approvalDiffCut: "改动区域已截断";
74
74
  readonly diagTitle: "诊断";
75
- readonly diagSubtitle: "安装、兼容与运行状态的只读自查;不会改动任何东西。";
76
- readonly diagFactsTitle: "环境信息";
75
+ readonly diagSubtitle: "运行状态的只读自查;不会改动任何东西。";
77
76
  readonly diagRuntimeTitle: "运行状态";
78
77
  readonly diagSummaryOk: "运行正常";
79
78
  readonly diagSummaryWarn: "{n} 项需要注意";
@@ -86,10 +85,7 @@ export declare const zh: {
86
85
  readonly diagStatusFail: "异常";
87
86
  readonly diagStatusUnknown: "未知";
88
87
  readonly diagRemedy: "建议:";
89
- readonly diagDetails: "技术详情";
90
- readonly diagCheckedAt: "检查时间:{at}";
91
- readonly diagSchema: "数据版本 v{n}";
92
- readonly diagSourcesTitle: "数据来源";
88
+ readonly diagNoRows: "没有可显示的运行状态";
93
89
  readonly stateLoading: "正在读取…";
94
90
  readonly failureUnauthorized: "需要登录:重新打开这个页面完成登录后再试。";
95
91
  readonly failureForbidden: "平台拒绝了这个请求(身份不是 owner)。";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-settings-ui",
3
3
  "description": "Web settings cards for the evolution family's parameter namespaces (community build)",
4
- "version": "0.27.2",
4
+ "version": "0.27.3",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },