Skip to content

1.0.0 build 34: drop the redundant 中文 chip - #214

Merged
wangzhizhou merged 3 commits into
mainfrom
dev
Oct 29, 2026
Merged

wangzhizhou merged 3 commits into
mainfrom
dev

Conversation

@wangzhizhou

Copy link
Copy Markdown
Contributor

用户观察:候选框出现时中英状态永远显示「中文」,按 Shift 切英文时候选框直接消失——那这枚芯片就是多余信息。确认属实后删除(ADR-303,报告 223)。

确认:结构性冗余,不是显示 bug

  • Session::handle_key 首行 if self.english { commit; return } —— 英文模式每键立即上屏,不建缓冲区
  • composing 只在非英文分支置真 → 英文模式下永远 false
  • showCandidates 只在 isComposing 分支被调用 → 候选窗不可能在英文态出现

即:候选窗可见 ⇒ 必在中文输入 ⇒ 芯片恒为「中文」。

改动

  • CandidateStatus.chips:5 枚 → 4 枚(模式 / 全半角 / 简繁 / 标点)
  • 顺带删掉已无用途的 CandidateStatus.english 字段与「语言:」无障碍分支
  • 构造点与断言同步:InputController.candidateStatus()、Preview/main.swift、candidate-presentation、ui-snapshots

不丢信息

中英切换仍弹 HUD(约 1.15 秒),VoiceOver 仍播报「语言:中文/英文」;其它四枚芯片不变。

验证

  • make verify PASS;make macos-offline-tests 56 文件 / 303 例 PASS
  • 构建号 33 → 34

装机后请看

打字出候选 → 顶部右侧应为 4 枚芯片(如 混输 半角 简体 。),比之前窄约 36pt。

Report 222 records why build 32 only passed the width case: Shift goes
through flagsChanged rather than the menu action, and applyInputMode
cancelled the composition before switching modes.

Signed-off-by: wangzhizhou <824219521@qq.com>
Build 32 only fixed the width path because the keyboard Shift goes
through flagsChanged and applyInputMode cancelled the composition before
switching modes; both host paths are now recorded with their fix, the
verification, and the lesson that one action usually has several entry
points.

Signed-off-by: wangzhizhou <824219521@qq.com>
The window can only appear while a composition is running, and English
mode commits on every keystroke without ever composing, so the chip was
always reading 中文 and only wasted about 36pt of header width (ADR-303).

Removing it also lets the CandidateStatus.english field go; language
feedback still arrives through the HUD when the window is hidden, and
VoiceOver keeps announcing 语言:中文/英文. Build 34.

Signed-off-by: wangzhizhou <824219521@qq.com>
@wangzhizhou
wangzhizhou merged commit 27301f5 into main Oct 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant