@eddyskywalker/dsh-chatgpt-subscription 0.39.1 → 0.39.2

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
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.39.2 - 2026-10-24
6
+ - **[codex] 账号卡登录行不再换行:三个入口改用短标签,完整语义留在 aria-label,窄宽度下省略而不是折行**
7
+ - **现象**:ChatGPT 订阅页账号卡右上角那一行有三个按钮(添加账号 / 用设备代码添加账号 / 导入本机 Codex CLI 登录),在正常设置面板宽度下第三个被挤到下一行,右边还被裁掉一截。
8
+ - **根因**:`.dsha-btn` 自带 `white-space:nowrap`,而 `.dsha-account-add-actions` 是 `flex-wrap:wrap`。两个长标签(`用设备代码添加账号` 9 字、`导入本机 Codex CLI 登录` 14 字符)加起来放不进那一行的剩余宽度,于是容器按 `wrap` 换行——换行不是兜底,它把这个行读成了两块内容。
9
+ - **改法(短标签 + 完整语义)**:`deviceCodeLogin` 由 `用设备代码添加账号` 改为 `设备代码登录`,`localCodexLoginImport` 由 `导入本机 Codex CLI 登录` 改为 `导入本机登录`;新增 `deviceCodeLoginDetail` 键专门存完整句子(`用设备代码添加账号`),接到设备的 `aria-label` 与 `title` 上。中文、英文(`Device-code sign-in` / `Import local sign-in`)、俄文(`Вход по коду устройства` / `Импорт локального входа`)三份语言包同步。可见文字只说机制,完整含义仍在读屏器与 tooltip 里,没有丢信息。
10
+ - **改法(窄宽度兜底)**:`src/client/styles.ts` 为本页的 `.dsha-account-add-actions` 增加两条声明——`flex-wrap:nowrap` + `min-width:0`,子按钮 `flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis`。这样即使将来文案再变长,也是三个按钮等分宽度、超长省略,而不是某个按钮整块掉到下一行。选择器用 `:where()` 裹住以保持低特异性,且只作用于 `.dsh-codex-page` 之内——Claude / GLM / Cline Pass / OpenDesign 等共用同一个类名的线路不受影响。
11
+ - **测试**:`test/codex-local-signin-ui.test.tsx` 由 7 例增至 8 例——新增「完整句子在 accessible name 里而不是可见标签里」(钉住两个按钮的 `aria-label` 与 `title` 都等于 `deviceCodeLoginDetail` / `localCodexLoginImport`),并在原有行内用例补一条长度上限(两个短标签 ≤ 8 字),把「以后改词又变长、再次破版」变成会红的断言。设备码用例里对 `aria-label` 的断言随之更新为 `deviceCodeLoginDetail`。
12
+ - **验证**:`npm run typecheck` 三工程 0 错误;全量 `LANG=C.UTF-8 npm test` **287 文件通过 / 2 skipped,4757 passed / 8 skipped / 0 failed**(比上一版多 1 例即本轮新增);`npm run build` 后核对产物:`设备代码登录` 进入 `lib/client.js`,`用设备代码添加账号` 仅作为 `deviceCodeLoginDetail` 的句子保留。
13
+ - **为什么上一版没生效**:`lib/` 是 `prepack` 里重建的构建产物,`src/` 改完不构建则 DSH 加载的还是旧 bundle。本轮已重新构建;npm 包由 `prepack` 触发重建,不依赖本地 `lib/` 状态。
14
+
5
15
  ## 0.39.1 - 2026-10-24
6
16
  - **[dispatch] 0.39.0 自审修补:R2 补齐降级路径,plan-mode 访谈上限与 R0 对齐,全插件通用的空清单提示去掉设置推广语**
7
17
  - **R2 补“标注缺失”这一读法(`presets/dispatch/agent.cordis.yml` / `src/host/agent-preset.ts`)**:0.39.0 让 R2 从 `list_subagent_models` 的输出里**读**路由姿态,但那段标注是 `tools/post-execute` 写的,而 `src/index.ts:508-520` 里守卫有三条不入场的路径——`subagentModelAuthorization: false`、宿主没有 `sessions` 服务、`tools.guard` 不是函数。三种情况下输出里既没有授权路由块、也没有「No allowlist is in force」,而 0.39.0 的 R2 只写了三态、没写“什么都没读到”怎么办。现在补一段:行为上按 `[State: Unlisted]` 处理(照常派发、不要把缺参数指望守卫来拦),但不得声称任一姿态、只能说「未确认」,且不得据此把任何路由报成「已授权」。这是“把状态塞进工具结果”和“断言工具一定在场”之间的差别,前一版的措辞把后者当成了前提。
package/lib/client.js CHANGED
@@ -2040,7 +2040,8 @@ window.__ModuleLoader__.load({
2040
2040
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
2041
2041
  className: "dsha-btn",
2042
2042
  disabled: busy !== null,
2043
- "aria-label": t("deviceCodeLogin"),
2043
+ "aria-label": t("deviceCodeLoginDetail"),
2044
+ title: t("deviceCodeLoginDetail"),
2044
2045
  onClick: () => void startDeviceLogin(),
2045
2046
  children: busy === "device-login" ? t("deviceCodeLoginStarting") : t("deviceCodeLogin")
2046
2047
  }),
@@ -2048,6 +2049,7 @@ window.__ModuleLoader__.load({
2048
2049
  className: "dsha-btn",
2049
2050
  disabled: busy !== null,
2050
2051
  "aria-label": t("localCodexLoginImport"),
2052
+ title: t("localCodexLoginImport"),
2051
2053
  onClick: () => void importLocalSignIn(),
2052
2054
  children: busy === "adopt" ? t("localCodexLoginImporting") : t("localCodexLoginImport")
2053
2055
  })
@@ -18745,10 +18747,11 @@ window.__ModuleLoader__.load({
18745
18747
  hubUpdateManualOnly: "有新版本 {version};当前安装方式无法自动更新",
18746
18748
  hubUpdateCheckFailed: "检测失败:无法连接 npm 源,请检查网络或代理",
18747
18749
  hubUpdateCommandLabel: "手动更新命令",
18748
- localCodexLoginImport: "导入本机 Codex CLI 登录",
18750
+ localCodexLoginImport: "导入本机登录",
18749
18751
  localCodexLoginImporting: "导入中…",
18750
- deviceCodeLogin: "用设备代码添加账号",
18751
- deviceCodeLoginStarting: "正在获取代码…",
18752
+ deviceCodeLogin: "设备代码登录",
18753
+ deviceCodeLoginStarting: "获取代码…",
18754
+ deviceCodeLoginDetail: "用设备代码添加账号",
18752
18755
  deviceCodeHint: "在任意设备上打开下面的链接并输入这个代码,本页会自动完成登录:这条路不需要浏览器回调到本机端口。",
18753
18756
  deviceCodeLabel: "设备代码",
18754
18757
  deviceCodeOpen: "打开确认页面",
@@ -18941,10 +18944,11 @@ window.__ModuleLoader__.load({
18941
18944
  hubUpdateManualOnly: "{version} is available, but this install cannot update itself",
18942
18945
  hubUpdateCheckFailed: "Check failed: the npm registry could not be reached — check the network or proxy",
18943
18946
  hubUpdateCommandLabel: "Manual update command",
18944
- localCodexLoginImport: "Import the local Codex CLI sign-in",
18947
+ localCodexLoginImport: "Import local sign-in",
18945
18948
  localCodexLoginImporting: "Importing…",
18946
- deviceCodeLogin: "Add account with device code",
18949
+ deviceCodeLogin: "Device-code sign-in",
18947
18950
  deviceCodeLoginStarting: "Requesting code…",
18951
+ deviceCodeLoginDetail: "Add account with device code",
18948
18952
  deviceCodeHint: "Open the link below on any device and enter this code. This page finishes the sign-in by itself: nothing has to call back to a local port.",
18949
18953
  deviceCodeLabel: "Device code",
18950
18954
  deviceCodeOpen: "Open the confirmation page",
@@ -19817,10 +19821,11 @@ window.__ModuleLoader__.load({
19817
19821
  hubUpdateManualOnly: "Доступна версия {version}; этот способ установки не обновляется сам",
19818
19822
  hubUpdateCheckFailed: "Проверка не удалась: реестр npm недоступен, проверьте сеть или прокси",
19819
19823
  hubUpdateCommandLabel: "Команда для ручного обновления",
19820
- localCodexLoginImport: "Импортировать вход локального Codex CLI",
19824
+ localCodexLoginImport: "Импорт локального входа",
19821
19825
  localCodexLoginImporting: "Импорт…",
19822
- deviceCodeLogin: "Добавить аккаунт по коду устройства",
19826
+ deviceCodeLogin: "Вход по коду устройства",
19823
19827
  deviceCodeLoginStarting: "Получаем код…",
19828
+ deviceCodeLoginDetail: "Добавить аккаунт по коду устройства",
19824
19829
  deviceCodeHint: "Открой ссылку ниже на любом устройстве и введи этот код. Эта страница завершит вход сама: обращаться к локальному порту не нужно.",
19825
19830
  deviceCodeLabel: "Код устройства",
19826
19831
  deviceCodeOpen: "Открыть страницу подтверждения",
@@ -20738,6 +20743,15 @@ window.__ModuleLoader__.load({
20738
20743
  const CSS$3 = `
20739
20744
  .dsh-codex-page{box-sizing:border-box;color:var(--dsw-alias-label-primary);display:flex;flex-direction:column;gap:20px;max-width:780px;min-width:0;padding:2px 0 30px}
20740
20745
  .dsh-codex-page *{box-sizing:border-box}
20746
+ /* The pool card's login row holds three entries. They must stay on ONE line: a
20747
+ wrapped row stops reading as a set of alternatives, and the third entry is the
20748
+ one that gets pushed out. .dsha-btn carries white-space:nowrap, so shrinking
20749
+ the row means letting the buttons shrink and ellipsizing the label inside —
20750
+ the accessible name stays whole in aria-label/title, which is where the full
20751
+ sentence lives. flex-basis 0 keeps the three of them sharing the width evenly
20752
+ instead of the longest one claiming it. */
20753
+ .dsh-codex-page :where(.dsha-account-add-actions){flex-wrap:nowrap;min-width:0}
20754
+ .dsh-codex-page :where(.dsha-account-add-actions) > .dsha-btn{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis}
20741
20755
  .dsh-codex-title{font-size:15px;font-weight:650;line-height:1.4;margin:0 0 5px}
20742
20756
  .dsh-codex-intro,.dsh-codex-muted{color:var(--dsw-alias-label-secondary);font-size:13px;line-height:1.55;margin:0}
20743
20757
  .dsh-codex-group{border-top:0.5px solid var(--dsw-alias-border-l2);min-width:0}