Skip to content

feat(windows): 新增可选的「极光」实时转写条带 - #1294

Open
DepengWang wants to merge 3 commits into
Open-Less:betafrom
DepengWang:feat/aurora-live-transcript
Open

DepengWang wants to merge 3 commits into
Open-Less:betafrom
DepengWang:feat/aurora-live-transcript

Conversation

@DepengWang

Copy link
Copy Markdown
Contributor

摘要

Related #1288(上一版,已关闭;本 PR 按评审意见重做,补齐说明、演示和 CI)。

让 Windows 听写时,用户能在胶囊上方实时看清并核对自己说的话:新增一个可选的转写条带样式「极光 / Aurora」。条带从底部 Siri 波浪的中心升起,文字逐字上屏,说完收回波浪里。默认样式完全不变。

为什么要这个效果

  1. 和底下的动画一致性高。 条带从 Siri 波浪的中心长出来、收起时回到波浪里,颜色也是同一色系(蓝 / 紫 / 粉),看起来是同一个东西在动,不是一块贴在波浪上方的独立面板。
  2. 可以实时看到自己讲的话并及时修正。 条带在麦克风就绪时就出现,随着说话变宽,文字逐字上屏;识别错了当场就能看出来,不用等整段说完、插入之后才发现。说完后整行先模糊,再从左到右对焦,对应「润色」这一步,等待润色时也有明确的视觉反馈。
  3. 深色和浅色桌面上都清楚。 背景是无边框、重度虚化的蓝紫粉光晕,文字固定为白色并带柔和阴影,不依赖桌面颜色。下面的演示分别在深色和浅色背景下录制。

为什么做成可选项(回应「已有的风格为什么要增加」)

  • 现有 Siri 样式已有一批用户在用,直接改它会改变所有人的默认体验,所以先做成可选、默认关闭:不选它时,Classic / Siri / Typeless 三种样式和 macOS 的转写都没有任何变化。
  • 如果维护者更希望不新增样式,我也可以把这套转写效果直接并入现有的 Siri 样式:去掉新的选项和设备本地偏好,改动会更小,代价是所有 Siri 用户都会看到新效果。请告诉我倾向哪一种,我来改。
  • 实现上没有新增 CapsuleStyle 枚举值,而是 capsuleStyle = siri 加一个设备本地偏好 capsuleSiriEnhanced(同步注册表里标为 Excluded,原因 local_only_visual_effect)。已同步的 capsuleStyle 会被校验为 siri / classic / typeless,新增枚举值会让不认识它的旧端把文档判成无效。

回应 #1288 被关闭时的三条意见

  1. 「已有的风格为什么要增加?」 见上面两节:它是效果层面的升级,且做成可选项以避免改变现有用户;是否并入 Siri 样式由维护者决定。
  2. 「没有 UI 改动说明和照片、视频」 本 PR 补齐:下方有深色和浅色两段演示(GIF 直接嵌入,另附 mp4)。
  3. 「UI 构建的 CI 没有通过」 原因是两个 e2e(motion.spec.ts、resource-lifecycle.spec.ts)用 getByRole('option', { name: /Siri/ }) 选 Siri 样式,而我上一版新选项的名字也带 "Siri",匹配到 2 个元素,触发 strict mode violation。这一版把名字改成「极光 / Aurora」(不含 "Siri"),选择器不再有歧义,测试本身没有改。

修复 / 新增 / 改进

  • 设置里胶囊样式多一项「极光」(8 个语言):Aurora / 极光 / 極光 / オーロラ / 오로라 / Aurore。
  • 条带在麦克风就绪后从 Siri 波浪中心升起,随文字变宽到屏幕宽度的 1/2.7,之后跑马灯滚动;关闭时收拢并沉回波浪。
  • 文字上屏时字形有短暂的模糊淡入;润色等待期间整行循环「模糊 → 从左到右对焦」。
  • 新增 useTranscriptLinger、typewriterText 辅助函数;capsule-ready-replay 测试的模拟列表补上 setSiriEnhanced。

兼容

  • 不包含:默认样式(Classic / Siri / Typeless)、macOS 同窗口转写、云同步数据结构。
  • 对现有用户 / 本地环境 / 构建流程的影响:不选「极光」时没有任何变化。该偏好是设备本地的,不参与同步,不会让旧版本把同步文档判为无效。内部标识符仍沿用 siriEnhanced / capsuleSiriEnhanced,没有改名,避免让已保存的偏好失效。

测试计划

  • 命令:npx tsc --noEmit;node scripts/capsule-ready-replay.test.mjs;node scripts/locale-format.test.mjs、locale-lifecycle、style-pack-localization、windows-ui-config;cargo check --bin openless(Windows)
  • 结果:全部通过
  • 本机没有跑的部分:Playwright e2e(本机未安装浏览器)和 macOS / Android / Linux 的编译,这两项以 CI 结果为准。
  • 证据路径:Windows 11 实机,深色和浅色背景各录一段完整听写(见下)。

演示

深色背景:

深色背景演示

浅色背景:

浅色背景演示

高清视频:深色 mp4 · 浅色 mp4

🤖 Generated with Claude Code

Adds an optional capsule style, "Aurora" (zh: 极光), for the Windows split-rail live
transcript. It is capsuleStyle=siri plus a device-local preference capsuleSiriEnhanced
(excluded from cloud sync, reason local_only_visual_effect), so devices that do not know
the flag keep rendering plain Siri and no synced document becomes invalid. The option
label deliberately does not contain "Siri": two e2e tests pick the Siri style with
getByRole('option', { name: /Siri/ }) and a second match fails strict mode.

- The band appears once the microphone is ready, grows out of the centre of the Siri wave,
  widens with the text up to 1/2.7 of the monitor, then marquees; on close it collapses
  and sinks back into the wave.
- Glyphs are born with a short blur-in; while the text is being polished the line loops
  blur -> left-to-right focus, echoing the polish step.
- The background is a borderless, heavily blurred blue/violet/pink glow with white text
  and a soft shadow in every theme, so it stays legible on light and dark desktops.

Default styles (classic, siri, typeless) and the macOS same-window transcript are untouched.
Also lists setSiriEnhanced in the capsule-ready-replay test scope.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-29T10:51:33.457565Z
We couldn’t complete this review. Comment @codex review to try again.
02b740c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@appergb appergb added the branch-retained Keep source branch while the pull request remains open label Oct 30, 2026
DepengWang and others added 2 commits October 31, 2026 15:13
Resolve the capsule style control conflict: upstream Open-Less#1308 replaced the
select with a Segmented control; keep the Aurora option and its
device-local capsuleSiriEnhanced mapping on top of it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Resolve the locale conflicts: upstream Open-Less#1315 shortened the default capsule
style label next to the Aurora entry. Keep both: Aurora plus the new
default-style wording in all eight locales.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch-retained Keep source branch while the pull request remains open

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants