@q253595422/dsh-imagegen-video 1.15.1 → 1.15.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/CHANGELOG.md CHANGED
@@ -5,6 +5,53 @@ Attribution for third-party code is in [NOTICE](./NOTICE).
5
5
 
6
6
  ## Releases
7
7
 
8
+ ### 1.15.3 — 视频工作室不再是死路
9
+
10
+ - **生视频标签页此前无法返回生图。** The shell hides the image config sidebar
11
+ on the video tab (two composers must never be shown at once), and that sidebar
12
+ is the only place the text/edit/video pills are rendered — so the tab had no
13
+ return control anywhere on screen, and leaving meant reloading or detouring
14
+ through the gallery. `VideoPanel` now takes an optional `onExit` and renders a
15
+ "← 返回生图" button at the head of its own toolbar. The button is defined once
16
+ and shared by both return branches, including the no-model branch, which is the
17
+ screen that most needs an exit.
18
+ - **"普通生图" in the top nav did nothing while the video tab was open.** The
19
+ video tab maps onto workspace index 0, the same index 普通生图 occupies, and
20
+ `GooeyNav.select()` returned early on `index === activeIndex` — swallowing the
21
+ callback along with the burst animation it meant to skip. The short-circuit now
22
+ gates only the animation; `onSelect` fires unconditionally. Click and keyboard
23
+ share that function, so both paths are fixed.
24
+ - **`video.back` ships in zh / en / ru.**
25
+ - Full detail, including the verification that this was never observable through
26
+ the existing guards and the one change that was measured and then reverted, is
27
+ in `docs/releases/v1.15.3.md`.
28
+
29
+ ### 1.15.2 — 视频取片支持 `/content` 回退
30
+
31
+ - **A finished task with no URL in its body is now downloaded instead of
32
+ failed (#9).** OpenAI's video API — and the OpenAI-compatible relays that
33
+ copy it — report `status: "completed"` with no `url` anywhere and serve the
34
+ bytes only from `GET /videos/{id}/content`. `readPoll()` treated that body as
35
+ "completed but no video address" and failed a render the provider had already
36
+ finished. The poll now reports the content endpoint as the clip source, and
37
+ the download leg fetches it unchanged — same-origin key forwarding, MIME
38
+ inference and the size cap all still apply. A body URL is still preferred,
39
+ and a `/content` that 404s reports the download leg rather than passing as a
40
+ silent success.
41
+ - **A batch of UI fixes ships in the same version.** Eight modules were driven
42
+ in a real browser: a fully covered canvas node now marks both nodes and
43
+ carries a `role="status"` badge naming what covers it (the hint survives
44
+ pointer-up, when the node is still hidden); the sixty error/warning
45
+ declarations that referenced `--dsw-alias-label-error` / `-warning` — which
46
+ the dsh theme never defines — now use the resolvable
47
+ `--dsw-alias-state-error-primary` / `-state-warn-primary`; the ecommerce
48
+ section title no longer shrinks to 69px against a hint needing 70 (no column
49
+ width changed); saving, channel tests, update checks and diagnostics clearing
50
+ report what actually happened instead of reading as successes; dialogs trap
51
+ and restore focus, and the select exposes combobox semantics with
52
+ `aria-activedescendant`; PPT setup reports per-step state. Full detail in
53
+ `docs/releases/v1.15.2.md`.
54
+
8
55
  ### 1.15.1 — 火山适配的收口修复
9
56
 
10
57
  - **Ark pixel sizes stay inside the budget.** At 4K / 16:9 the solved
package/README.md CHANGED
@@ -49,13 +49,13 @@
49
49
  dsh plugin --profile web add @q253595422/dsh-imagegen-video
50
50
 
51
51
  # 或 GitHub Release 资产
52
- dsh plugin --profile web add https://github.com/q253595422/dsh-imagegen-video/releases/download/v1.7.8/q253595422-dsh-imagegen-video-1.7.8.tgz
52
+ dsh plugin --profile web add https://github.com/q253595422/dsh-imagegen-video/releases/download/v1.15.2/q253595422-dsh-imagegen-video-1.15.2.tgz
53
53
  ```
54
54
 
55
55
  也可以先到 [Releases](https://github.com/q253595422/dsh-imagegen-video/releases) 页面下载 `.tgz`,再安装本地文件:
56
56
 
57
57
  ```bash
58
- dsh plugin --profile web add ./q253595422-dsh-imagegen-video-1.7.8.tgz
58
+ dsh plugin --profile web add ./q253595422-dsh-imagegen-video-1.15.2.tgz
59
59
  ```
60
60
 
61
61
  > ⚠️ **不要与 `@dickpy/dsh-imagegen` 同时安装。** 两者注册的是同一套
@@ -68,7 +68,7 @@ dsh plugin --profile web add ./q253595422-dsh-imagegen-video-1.7.8.tgz
68
68
  <summary><b>其他安装方式、升级与回滚</b></summary>
69
69
 
70
70
  - **让 Agent 安装:**把上面的安装命令发给 DSH、Codex 或其他 coding agent。
71
- - **指定版本:**把 URL 里的 `v1.7.8` 与文件名里的版本号换成目标版本,或从 [GitHub Releases](https://github.com/q253595422/dsh-imagegen-video/releases) 下载对应版本的 tgz 后安装。
71
+ - **指定版本:**把 URL 里的 `v1.15.2` 与文件名里的版本号换成目标版本,或从 [GitHub Releases](https://github.com/q253595422/dsh-imagegen-video/releases) 下载对应版本的 tgz 后安装。
72
72
  - **升级:**重复执行 `add` 命令指向新版本即可;插件也会在面板中提示新版本。更新后重启 `dsh web`。
73
73
  - **DSH Desktop 用户:**宿主 CLI 不允许写入 `desktop` 这个 profile,所以面板不会假装去更新,而是直接给出可复制的命令和下载地址,由你自己执行——不会只甩一句「更新失败」而没有原因。
74
74
  - 渠道配置、历史记录和画廊数据保存在 DSH 宿主侧,正常升级不会清空。
@@ -0,0 +1,42 @@
1
+ # v1.15.2 — 视频取片支持 `/content` 回退
2
+
3
+ 一句话概括:任务已经渲染完成、轮询却因为没有 URL 被判失败的情况,现在会真的把成片取回来。
4
+
5
+ ## 为什么
6
+
7
+ `readPoll()` 只在轮询响应体的六个字段里找视频地址,找不到就把任务判成失败,弹出「视频任务已完成但未返回视频地址」。
8
+
9
+ 但 OpenAI 官方的视频 API——以及照抄它的 OpenAI 兼容网关——在终态里**不返回任何 URL**:`status` 走到 `completed`,成片只通过 `GET /v1/videos/{id}/content` 以二进制流提供。于是上游明明渲染好了,插件这边报失败,用户拿不到片子;对按次计费的上游来说,这次调用是白花的。
10
+
11
+ 这不是某一个网关的私有行为,所以修在上游协议这一层,而不是给某个渠道加特判。
12
+
13
+ ## 做了什么
14
+
15
+ - **轮询结果能表达两种取片来源**:响应体里有 URL 就照旧用 URL(优先级不变,它通常指向 CDN,比回源更省事);没有任何 URL 但状态已完成时,轮询把 `/content` 端点作为片源返回,而不是判失败。
16
+ - **下载沿用同一条腿**:`/content` 的字节走原有的下载函数,同源鉴权转发、MIME 推断、体积上限全部照旧生效——没有为它新开一条绕过这些约束的通道。
17
+ - **失败仍然是失败**:`/content` 返回 404 之类的错误时,报的是下载环节的真实错误,不会静默当作成功。任务真失败(`failed` / `expired`)的判定也完全没变。
18
+
19
+ ## 验证
20
+
21
+ - `scripts/smoke-video.mjs` 新增两条用例:一条让 mock 上游只给 `/content`、响应体不含 URL,断言成片被取回;一条让 `/content` 返回 404,断言报出的是下载错误而不是「已完成但无地址」。
22
+ - `scripts/verify-negative.mjs` 加了对应的缺陷注入:把回退移除后,新用例会变红,确认这两条测试确实在看这件事。
23
+ - `node scripts/smoke-video.mjs` 全绿。
24
+
25
+ ## 同一版本里的界面修复
26
+
27
+ 这一版还带上一批真浏览器逐项复核过的界面问题(八个模块)。它们与视频链路无关,但同样进 1.15.2 的包,所以记在这里:
28
+
29
+ - **被完全盖住的画布节点现在有提示。** 把节点拖到另一个节点正下方,原来屏幕上什么都不剩、也没有可点的目标。现在两个节点会互相描边,被盖的那个带一个 `role="status"` 徽标,写明压在它上面的是谁。提示**松手后仍保留**——那正是节点还看不见的时候。节点分开后自动消失。
30
+ - **错误色此前全是死引用。** `--dsw-alias-label-error` / `-warning` 在 dsh 主题里根本没有定义,六十处声明一直在静默回退到继承色,包括上面那个徽标(白字配透明底)。现在统一用实测能解析的 `--dsw-alias-state-error-primary` / `-state-warn-primary`。
31
+ - **电商分区标题莫名折行。** 标题是 flex 行里的裸文本节点,被旁边的提示挤到 69px,而五个字要 70px。标题改为不收缩、提示补 `min-width: 0`,顺带让原本失效的 `text-overflow: ellipsis` 真正生效。**栏宽没有改动**。
32
+ - **看起来成功的失败。** 保存设置、测试渠道、检查更新、清空诊断,现在都会说明到底发生了什么,并保留上游给出的原因而不是一句通用文案;连接测试失败不会再显示成通过。
33
+ - **弹窗与下拉键盘可用了。** 焦点会被困在弹窗内并在关闭时归还;下拉具备 combobox 语义、`aria-activedescendant`、首字母跳转与方向键导航;快捷键说明成为真正可聚焦的对话框。
34
+ - **PPT 配置步骤能看出进行到哪一步。** 每一步各自报告状态,运行状态显示在产生它的控件旁边;提示框随内容增长而不是被裁掉。
35
+
36
+ 配套的契约检查:冒烟套件断言重叠徽标会出现、松手后保留、节点分开后清除;UI 契约检查断言分区标题不收缩、提示的省略号能解析。
37
+
38
+ ## 影响面
39
+
40
+ 视频修复只影响「轮询响应体里没有视频地址」的分支;有 URL 的渠道走的是原来那条路径,行为不变。界面部分不改变任何接口与数据格式。
41
+
42
+ Closes #9.
@@ -0,0 +1,35 @@
1
+ # v1.15.3 — 视频工作室不再是死路
2
+
3
+ 一句话概括:进了「生视频」能回得来,回不来的时候至少还有一条能点的路。
4
+
5
+ ## 为什么
6
+
7
+ 这一版修的是两个叠在一起的死路。它们单独看都不致命,叠起来把用户困在一个怎么点都没反应的页面上。
8
+
9
+ **第一处:进得去,出不来。** 外壳在视频标签页上会把生图参数侧栏整块隐藏(两块输入面板不能同时出现),而侧栏正是「文字 / 编辑 / 视频」三枚切换 pill 唯一的渲染位置。于是一旦切到视频,界面上就不存在任何回到生图的控件——不是难找,是根本没有。用户唯一能做的只有刷新页面,或者绕去图库再从那里回来。
10
+
11
+ **第二处:点得动,但不发生。** 顶部导航里「普通生图」那一项看起来是常态可点的。但视频标签在工作区映射中被算成索引 0,与「普通生图」撞在同一个索引上;`GooeyNav` 的选择函数在 `index === activeIndex` 时直接 `return`,而这个 `return` 连回调一起吞掉了——它本意只想跳过那一下果冻动画。结果就是点了没有任何反应,也没有任何提示说明为什么。
12
+
13
+ 两处叠起来的实际体验是:**屏幕上所有看起来能返回的东西都点不动。** 这也解释了为什么它此前没被发现:现有的布局守卫里没有 `videoToolbar` / `videoBack` / `videoEmpty` 这几个 fixture,`GooeyNav` 的点击回调则完全没有测试覆盖。
14
+
15
+ ## 做了什么
16
+
17
+ - **工作室自己带一条出路。** `VideoPanel` 新增可选 `onExit`,在标签页自己的工具栏首位渲染一枚「← 返回生图」按钮,由父组件传入(切换工作区/标签的状态在父组件里)。按钮**只定义一次、被两个 return 分支共用**——尤其是「没有可用视频模型」那条分支:一个满屏只有提示文字的页面,恰恰最需要出口。
18
+ - **导航短路只作用于动画。** `select()` 改为「果冻动画只在真正换页时播放,`onSelect` 无条件调用」。点击与键盘走的是同一个函数,所以两条路径一起修好了。
19
+ - **三语文案。** `video.back` 进了 zh / en / ru,沿用现有键名风格与两空格缩进。
20
+
21
+ ## 验证
22
+
23
+ - **全量测试**:`pnpm test` 20 个脚本全绿(`EXIT=0`),`verify-reproducible` 断言两次构建的 4 个产物逐字节相同。
24
+ - **真浏览器**:现有布局守卫的 fixture 里没有视频工具栏,所以另写了一支在真 Chrome 里量的检查——按钮 92×28、`pointer-events` 未被遮挡、CDP 真实鼠标按下能到 handler、空状态文案没有被新工具栏挤掉。
25
+ - **点击契约**:`GooeyNav` 此前零覆盖,补了 jsdom 真渲染 + 真 `dispatchEvent` 的五个场景(当前页点击、换页点击、Home、ArrowRight、越界 activeIndex)。关键是**做了反向对照**——把修复回退成旧的 `if (index === activeIndex) return`,测试立刻报出 2 条失败;恢复后全绿。这证明这几条断言确实在看这件事,而不是必然通过。
26
+
27
+ ## 一处被撤回的改动
28
+
29
+ `.videoEmpty` 的 `height: 100%` 一度被改成 `flex: 1; min-height: 0`,理由是「新增 28px 工具栏 + 14px 间距超过了 100%,会溢出被裁」。
30
+
31
+ 对照实验否定了这个推理:两种写法在 420px 与 150px 两种视口下测出的数字完全一致(`scrollHeight == clientHeight`,元素底边都正好落在内容边界上)。原因是 `.videoWorkspace` 的 `overflow: hidden` 配合 flex 默认的 `min-height: auto` 已经把状况吃住了。改动没有收益,已恢复原样——本版 `panel.module.css` 的新增只有 `.videoBack` 两段。
32
+
33
+ ## 影响面
34
+
35
+ `onExit` 是可选属性,不传就与改动前完全一致,其他挂载点不受影响。`select()` 的语义变化只影响「点击当前已选中的标签」这一种此前无任何效果的交互。不改变任何接口、数据结构或持久化格式。