Jia Sui
cadbe85bc1
feat(installer): 出厂配置模板补模糊音播种标记
...
fuzzy_seeded 为内部键(默认 false,勿手改):首次启用模糊音总开关时由
server 自动置位。模板缺这个键会被升级合并丢弃,老用户升级后第一次开
总开关会误重播种,覆盖他们修剪过的规则选择。
2026-09-13 09:33:18 +08:00
Jia Sui
a3b1e4380c
feat(server): 模糊音首次启用播种规则并持久化标记
...
总开关默认关不变;出厂态(fuzzy_seeded 未置位)第一次开总开关时,用一次
WriteConfiguredValues 批量写 13 键(总开关 + 11 规则全 true + 播种标记),
单文件原子写无部分失败态。标记置位后总开关任何翻动只写总开关一个键,
用户修剪过的选择在临时停用/恢复间原样保留。
播种信号靠持久化标记而不是「规则位全零」:用户故意全部取消勾选后位图
同样是零,无标记会把每次开启都误判成首次启用。fuzzy_seeded 是内部键,
设置快照不下发不展示;两份 toml 模板补键,缺键会被升级合并丢弃导致
老用户升级后误重播种。设置页勾选态由 host 处理 configUpdate 后重发的
configSnapshot 驱动,前端无播种逻辑。
新增首次播种用例(播种全开、修剪子集反复开关、重启保持、全取消后不
重播种);默认值三形态补标记断言;既有往返/门控/注入用例改走不门控
视图或规则键直设,避开播种路径保持用例意图纯净。
2026-09-13 09:33:14 +08:00
Jia Sui
e60c3224ae
feat(installer): 出厂配置模板补模糊音总开关
...
fuzzy_pinyin 默认 false,与 11 个规则键同段同提交入库,升级合并时
用户已改的值按模板骨架保留。
2026-09-13 09:12:57 +08:00
Jia Sui
9dbb020ac3
feat(ui-html): 模糊音分区改为可折叠风格并接总开关
...
分区头改为主题模式同款折叠结构:折叠标题按钮(标题 + chevron,
aria-expanded/aria-controls,默认收起)加右侧总开关 toggle;展开后是
既有 11 个规则复选。总开关关闭时规则复选置灰禁用并提示开启总开关后
生效。折叠样式在 input.css 用 fuzzy 专名类复制 theme-surface 规则,
不跨模块借用类名;复选禁用联动抽到 shared.ts 供点击与快照回填两侧
共用。
2026-09-13 09:12:52 +08:00
Jia Sui
b807f50d69
feat(server): 模糊音增加总开关并在聚合 getter 门控
...
[input] 新增 fuzzy_pinyin 总开关,默认关;GetConfiguredFuzzyPinyinOptions
在总开关关时返回全零 options,规则位缓存保留,临时停用后重开立即恢复。
设置页快照改用不门控的规则位视图,总开关关闭时复选框仍展示已存勾选;
configUpdate 分发把精确分支 input.fuzzy_pinyin 排在 fuzzy_ 前缀分支之前。
注入用例改为带总开关的 A-B-A-B,新增门控与默认值断言。
2026-09-13 09:12:45 +08:00
Jia Sui
58df42f5d3
feat(installer): 出厂配置模板补 11 个模糊音键
...
[input] 段新增 fuzzy_z_zh … fuzzy_uan_uang(默认 false,注释说明
全拼与双拼均生效)。缺这 11 键时升级合并会静默丢弃用户设置
2026-09-13 08:35:25 +08:00
Jia Sui
575b236231
feat(ui-html): 设置页输入分区新增模糊音开关
...
- 「输入纠错」后新增「模糊音」分区,声母 6 + 韵母 5 共 11 个复选,
复用翻页方式的流式复选布局,文案形如 z ⇄ zh
- 复选变更即发 configUpdate(input.fuzzy_*),configSnapshot 按
boolean 守卫逐键回填,重开设置页状态保持
2026-09-13 08:35:25 +08:00
Jia Sui
feb7db6de4
feat(server): 模糊音规则接入配置与会话注入
...
- [input] 段新增 11 个平铺模糊音键(fuzzy_z_zh … fuzzy_uan_uang,默认全关),
读取用固定键表驱动,键名即 FuzzyPinyinRule 枚举名小写,单一映射可评审;
位掩码缓存 uint32,reload 先清零再按位合成
- GetConfiguredFuzzyPinyinOptions 合成引擎选项,SetConfiguredFuzzyPinyinRule
按键写盘(未知名拒绝且不动位图), ApplyConfiguration 每键注入,
全拼与双拼同路径生效,设置改动即时生效
- settings_app configSnapshot 补 11 字段,ApplyConfigUpdate 用 input.fuzzy_
前缀分发;windows_webview2 死宿主不接线(InitWebviewSettingsWnd 零调用者)
- 测试:默认值三形态、逐键往返与 0x7ff 合成、未知键拒绝、
全拼/双拼 zhang→zang 候选注入用例;开发模板同步 11 键
2026-09-13 08:35:25 +08:00
Lu Fan(SonnyCalcr)
635151f936
Merge pull request #359 from fanlusky/perf/faster-local-packaging
...
perf(installer): 本地打包默认不含 PDB,并让 Release 编译真正增量
2026-09-13 04:03:25 +08:00
Lu Fan(SonnyCalcr)
7e2791ae77
Merge pull request #360 from fanlusky/fix/ui-backend-dropdown-width
...
fix(settings): 界面渲染下拉框的弹出菜单与按钮同宽
2026-09-13 04:03:11 +08:00
fanlusky
7c9856c767
fix(settings): 界面渲染下拉框的弹出菜单与按钮同宽
...
弹出菜单此前靠内容撑宽,和按钮宽度对不齐;改成 left/right 都贴住
.dropdown(与 .font-dropdown-menu 同样的做法),并把按钮文字右侧留白
收一半,同时给按钮固定最小宽度,避免切换渲染方式时按钮忽宽忽窄。
2026-09-13 03:59:33 +08:00
fanlusky
3b6b65020d
perf(installer): 本地打包默认不含 PDB,另开带符号入口
...
本地跑 test-light.ps1 等很久,慢的大头不是编译而是 Inno Setup 在压 PDB:
包里 PDB 约 140 MB,而真正的 EXE/DLL 只有约 20 MB,msime_setup.iss 又是
Compression=lzma2 + SolidCompression=yes,整整一遍压下来轻量包要 58.7 秒。
Prepare-PackageFiles.ps1 新增 -IncludeSymbols,不带它就把 server_exe\ 和
tsf_dll\ 里的 PDB 全部剔除。校验逻辑没有放松:仍然要求 Release 构建产出同名
PDB,缺符号照样打包失败,只是「符号是否随包安装」变成了显式选择。
msime_setup.iss 的两条 *.pdb 加上 skipifsourcedoesntexist,同一份脚本在带
符号和不带符号两种暂存下都能编译。
正式发布行为不变:release.yml 的打包步骤显式传 -IncludeSymbols,发布的安装包
依旧携带与二进制匹配的符号。
test.ps1 和 test-light.ps1 原本是两份几乎逐行相同的拷贝,现在一起收进
Invoke-LocalTest.ps1,三个入口都是它的薄包装:
test.ps1 含词库,不含 PDB
test-light.ps1 不含词库,不含 PDB
test-symbols.ps1 含 PDB,默认轻量,加 -Full 走完整包
轻量包 Inno Setup 耗时 58.7s -> 9.2s,安装包体积 33.4 MB -> 7.7 MB。
2026-09-13 03:56:58 +08:00
fanlusky
88a086a75b
perf(build): Release 编译跳过重复 configure,只构建打包用的目标
...
本地打包每次都要等很久,其中编译这一段有两处纯粹的重复劳动。
Visual Studio 生成器把 ZERO_CHECK 接进了每个目标,CMakeLists.txt 变化时
构建会自己重新生成,所以已有 CMake 缓存时前置的 cmake --preset 不改变任何
结果,只是每个构建目录白等约 10 秒,三个目录就是 30 秒。改成缓存存在就跳过,
需要强制重跑(改了 preset、换了工具链)时传 -Reconfigure。
构建目标也从 ALL_BUILD 收窄到 MetasequoiaImeServer / MetasequoiaImeTsf。
原先会一并构建 MetasequoiaImeServerTests、test_webview_contract、
test_windows_ipc_contract,而 Prepare-PackageFiles.ps1 随后又把它们从包里
删掉。server 目标的依赖闭包已经覆盖 Watchdog、三个面板、Settings、
DictionaryReplay 和 OpenCC 词典,产物一个不少。要连测试一起构建(比如为了
跑 ctest)传 -Target ALL_BUILD,server/AGENTS.md 里的 ctest 段落已注明。
顺带给 cmake --build 加上 --parallel,真正有代码改动时也能并行。
无改动时的增量编译:TSF 18.0s -> 3.7s,Server 21.9s -> 10.9s。
CI 不受影响,它直接调 cmake,不经过这些脚本。
2026-09-13 03:56:40 +08:00
Lu Fan(SonnyCalcr)
eec5979fd1
Merge pull request #358 from fanlusky/fix/candidate-window-edge-drift
...
fix(server): 候选窗贴边后不再随内容变化上下左右乱飘
2026-09-13 03:12:40 +08:00
Lu Fan(SonnyCalcr)
8b9b2b415f
Merge pull request #357 from fanlusky/fix/engine-compile-warnings
...
fix(engine): 消除 /W4 下的编译警告
2026-09-13 03:10:50 +08:00
fanlusky
eadcca9f1b
fix(server): 候选窗贴边后不再随内容变化上下左右乱飘
...
候选窗一旦贴住屏幕右边缘,删字后右边缘就会离开边缘;靠近屏幕下边缘时,它有时
正常停在当前行上方,有时却盖住当前行的文字。两者是同一个病根:最终定位用的不是
候选卡片本身,或者压根没有重新定位。
D2D:PlaceAndShow 末尾的水平夹取用的是宿主窗口宽度。宿主带透明阴影内边距、向上
取整到 64px、而且打字过程中只增不减,于是卡片被这些余量整体推离右边缘;删字后过
大的宿主宽度被保留,卡片左边缘就被冻住。改成夹取不透明卡片,和紧随其后的垂直夹取
用同一条规则,透明宿主允许越过屏幕边缘。
WebView2:内容更新只走「重绘不重排」的两条路径,它们从不重做上下翻转判定,只是
(a) 用「MarginTop -= 高度差」这个累加器去粘住底边,(b) 交给
KeepCandidateCardInsideHostAndMonitor 夹取,而后者在卡片底边越过工作区下边界时
直接把卡片往上推。于是本来在光标下方勉强放得下的候选窗,一旦下一个键多出一行释义
变高,就被径直推到当前行文字上面。现在两条路径都改为用实际绘制出来的尺寸重新推导
锚点(ReanchorCandidateHostToPaintedCard)——翻转判定只能信这个高度——两个累加器
随之删除。
另有两处一致性修补:MarginLeft/MarginTop 超出宿主可用余量时改为平移宿主而不是截断,
截断会让卡片毫无理由地吸到宿主的另一端;翻转判定的下边界改用 coordinates.bottom -
edgePadPx,与下游所有夹取共用一条线,否则会判定「下方放得下」,再被 2 DIP 边距顶
回来压到文字上。
已知未处理:翻转时的行高仍是写死的 24 DIP,因为 IPC 只传了文本范围的 left 和
bottom,行高在 GetPhysicalTextAnchor 里就被丢掉了。宿主报出的行比 24 DIP 高时,
翻转后的卡片底边仍会压进那一行——但现在是稳定的偏低,不再忽上忽下。
2026-09-13 03:07:52 +08:00
fanlusky
cbd95f74e3
fix(engine): 消除 /W4 下的编译警告
...
一方代码在 /W4 下已零警告。剩余警告全部来自上游副本
(googlepinyinime-rev/、vendor/opencc/ 及其捆绑的 marisa),
按 AGENTS.md 保留上游原格式,有意不改。
- data_path.h、test_pinyin.cpp: _wgetenv 改 _wdupenv_s,返回值
用 optional 包一层,由 unique_ptr 负责 free
- quanpin_dictionary.cpp: 去掉条件表达式内的赋值。外层查询原本
只用其真假,reset_cache_if_database_changed() 可能使其失效,
故保留重取
- build_sql_for_checking_word: 删掉从未使用的 jp 形参
- 未使用的 catch 形参、int/size_type 符号不匹配
- wav_writer.h: 形参 sample_rate 遮蔽同名命名空间常量,改名
requested_sample_rate;默认值改为直接引用该常量,去掉魔数
- pinyin_file_io.h: _wfopen/_wopen 改 _wfsopen/_wsopen_s
最后一项没有用微软推荐的 _wfopen_s: 它打开的文件不可共享,而这是
词库文件,Server、TSF DLL 和设置进程会并发读同一份。_SH_DENYNO
正是被弃用调用原本的共享语义,因此只消除警告,不改变行为。
_wsopen_s 的 pmode 传 0,唯一调用方 userdict.cpp 用的是 O_WRONLY,
不带 _O_CREAT。
2026-09-13 02:22:53 +08:00
Lu Fan(SonnyCalcr)
44cd59815f
Merge pull request #356 from fanlusky/fix/installer-stop-settings-process
...
fix(installer): 覆盖安装前退出驻留中的设置进程
2026-09-13 01:41:55 +08:00
fanlusky
dc87ff6383
fix(installer): 覆盖安装前退出驻留中的设置进程
...
安装器只杀 Watchdog 和 Server,从来没有停过
MetasequoiaImeSettings.exe。设置窗口以前一关就退,所以这个遗漏一直没
暴露;改成关窗只隐藏、进程驻留十分钟之后,它会一直占着
server\MetasequoiaImeSettings.exe,覆盖安装删不掉旧目录,用户只能自己
去任务管理器结束进程。Server 那条 CloseSettingsApplication() 的优雅退
出通道也指望不上——安装器是 taskkill /F 硬杀 Server,收尾逻辑根本没机
会跑。
新增 StopSettingsProcess:先投 kQuitSettings 让设置进程自己收尾落盘,
最多等三秒,再强杀兜底。停机顺序收敛进 StopImeProcesses,安装和卸载两
条路径共用,顺带补上三个面板进程——它们通常随 Server 的 /T 一起走,但
Server 若已崩溃就会变成孤儿,同样占住 server 目录。
2026-09-13 01:30:35 +08:00
Lu Fan(SonnyCalcr)
3336df2cb0
Merge pull request #355 from fanlusky/feat/webview2-candwnd-wheel-paging
...
feat(server): WebView2 候选窗口支持滚轮翻页,并加上默认关闭的开关
2026-09-13 01:16:05 +08:00
fanlusky
c71bbeeca5
docs(agents): 约定新增配置项必须同步进 installer 出厂模板
...
installer/default_config/config.default.toml 是安装包真正打进去的那一
份,Server 升级时 MergeConfigIntoTemplate 以它为骨架重建用户配置,
模板里没有的键会被丢弃。只在 ime_config.cpp 里加读取和默认值,代码
本身能跑,但用户在设置页改过的值会在下次升级时静默消失,且没有任何
编译期或运行期报错。顺带点名同一个提交里必须一并更新的另外三处。
2026-09-13 01:02:09 +08:00
fanlusky
426bb9d544
feat(server): WebView2 候选窗口支持滚轮翻页,并加上开关
...
PR #351 只给 D2D 候选窗口加了滚轮翻页,WebView2 后端还没有。
网页端只上报一个以 WHEEL_DELTA 为单位的原始 delta,notch 累加仍然
交给 CandidateWheel::ConsumeWheelDelta,两个宿主最终都汇聚到
WM_PAGE_CANDIDATE,翻页逻辑一份不重复。Chromium 的 wheelDeltaY 本身
就是 ±120/格,正是原生累加器期望的单位,deltaY 作标准回退。
同时把滚轮翻页做成可配置的 general.paging_mouse_wheel,默认关闭:
候选宿主是 NOACTIVATE 且从不获得焦点,滚轮只有在 Windows「当我悬停
在非活动窗口上方时滚动它们」开启时才会送达,无法无条件承诺,所以设为
opt-in,设置页里也写明了这个前提。开关只在 WM_PAGE_CANDIDATE 一处
判断;D2D 那边在 WM_MOUSEWHEEL 顶部提前返回 false,关闭时消息照旧
交给 DefWindowProc,与功能加入前一致。
2026-09-13 01:02:02 +08:00
Lu Fan(SonnyCalcr)
87158b2262
Merge pull request #351 from LilyCarry/feat/candwnd-mousewheel-paging
...
feat(server): support mouse wheel paging on candidate window (refs #81 )
2026-09-13 00:38:00 +08:00
fanlusky and Carry
63eab2f88f
refactor(server): 滚轮翻页复用键盘翻页逻辑并移出按键热路径
...
在 #351 的基础上收敛几处实现:
- CloseContextMenu 里新增的 hover 清理和 Present 原本无条件执行,而
ShowFromGlobalState 和 Hide 每次按键都会调它。没有菜单时按键路径上会多出
一次整屏重绘,画的还是更新前的旧场景。改为只在确实有 popup 要销毁时才做。
- 分页与动态扩充的逻辑从键盘路径复制了一份。抽成
ExpandCandidatesKeepingPagePosition 和 MoveCandidatePage,键盘与滚轮共用。
- 每一格滚轮直接投一个任务,而每个任务都可能回引擎和用户词库。改为在队列里
合并成 page_steps,一次快速滚动只重绘一次。
- 窗口层不再直接调 EnqueueCandidateUiAction,改为与其它候选窗动作一致,
PostMessage 到宿主 WndProc(WM_PAGE_CANDIDATE)。EnqueueCandidateUiAction
的序号校验随之恢复原样。
- 滚轮累加拆成纯函数 CandidateWheel::ConsumeWheelDelta 并补上单元测试;
候选窗隐藏时忽略迟到的滚轮消息。
滚轮翻页仍然把页内高亮重置为首项,键盘翻页仍然保留原有的页内索引。
Co-authored-by: Carry <xu762556@outlook.com >
2026-09-13 00:16:18 +08:00
Lu Fan(SonnyCalcr)
9586d2a2a2
Merge pull request #354 from fanlusky/fix/webview2-candidate-shadow-padding
...
fix(server): 避免 WebView2 候选窗阴影被裁切
2026-09-12 23:56:16 +08:00
fanlusky
e860eaab43
fix(server): 避免 WebView2 候选窗阴影被裁切
2026-09-12 23:50:31 +08:00
Lu Fan(SonnyCalcr)
e0fbc64dbf
Merge pull request #353 from fanlusky/feat/settings-window-linger
...
feat(server): 设置窗口关闭后先隐藏,十分钟后才真正退出
2026-09-12 22:59:10 +08:00
fanlusky
559dd588a6
fix(ui-html): 设置页关闭按钮的红色高亮不再在下次打开时闪一下
...
关闭按钮是页面自己的元素,红色背景来自 CSS :hover。点下去时它先渲染成红色,
然后窗口才隐藏,于是 WebView2 保留的那一帧就是红的。窗口以前会被销毁,这一帧
再也不会回来;现在进程留着,下次打开会先把它显示出来,等页面按真实指针位置
(在托盘上,不在按钮上)重算 :hover 才消失,就成了开头的一次闪红。
最小化按钮早就解决过同一个问题:点击时加 window-controls-click-reset,再延迟
100ms 才发消息,让页面带着这个类重绘一次之后窗口才消失。关闭按钮照着做即可,
那个类会把标题栏按钮的背景压成透明,与指针位置无关,保留的帧因此是干净的。
下次指针移进标题栏时既有的 mouseenter 监听会把类摘掉,悬停照常。
2026-09-12 22:48:44 +08:00
fanlusky
c01327cc0b
feat(server): 设置窗口关闭后先隐藏,十分钟后才真正退出
...
设置是独立进程,每次关闭都销毁窗口,于是每次打开都要重新建 WebView2 并等首屏
导航,冷启动的等待完整地落在用户那一侧。现在用户关闭窗口只隐藏,进程继续持有
已经导航完成的 WebView2,十分钟内重新打开直接显示,超时后才走原来的退出路径。
隐藏期间停掉 300ms 的配置轮询并把 controller 置为不可见,让页面被浏览器降频,
免得一个看不见的窗口白占 CPU。重新露面时在 CancelLinger 里对称地恢复,并调用
WM_ACTIVATE 早就接好、此前一直是空操作的 Resume()。
窗口隐藏时保留的那一帧会在下次打开时先显示出来,所以隐藏前要清掉标题栏按钮的
悬停高亮,复用 WM_SIZE 在最小化/还原时已经用的那个 helper。页面自己的关闭按钮
在点击时清,这里覆盖 Alt+F4、启动图关闭按钮等不经过页面的路径。顺带清掉本地的
g_maximize_button_hover:隐藏的窗口收不到 WM_NCMOUSELEAVE,那个标志会一直是脏
的,下次真的移进去时不再发 enter。
两个边界:
首帧之前被关掉直接真退出,不留半初始化的进程——那种进程重新打开时启动图已经
dismiss 过,用户会对着一个空窗口等。这条同时覆盖启动图自己的关闭按钮,它发的
也是 WM_CLOSE。
CloseSettingsApplication() 是 Ctrl+Shift+Alt+T 的终止通道,紧接着 Server 自己
也要退出。它原来发 WM_CLOSE,而 WM_CLOSE 现在只隐藏,会把设置进程留在 Server
之后,所以改发新的 kQuitSettings 直通真正的退出。
OpenSettingsApplication() 不再自己 ShowWindow,改为投 kActivateSettings 让设置
进程自己处理:在这边直接显示不会取消延迟退出定时器,窗口会在用户面前被销毁,
而且 SW_SHOWNORMAL 还会把之前最大化的窗口还原掉。
2026-09-12 22:48:31 +08:00
Carry
0fb8001022
feat(server): support mouse wheel paging on candidate window ( fixes #81 )
2026-09-12 19:46:24 +08:00
Lu Fan(SonnyCalcr)
b21a16719f
Merge pull request #349 from fanlusky/fix/fallback-font-arrow-cursor
...
fix(settings): 补充字体下拉框的箭头不再显示文本编辑光标
2026-09-12 19:19:54 +08:00
fanlusky
a2a23be1db
fix(settings): 补充字体下拉框的箭头不再显示文本编辑光标
...
候选窗主字体的箭头包在 .arrow 容器里,补充字体的箭头则是直接挂在
按钮上的 img,原规则选不中它,.font-combobox 的 cursor: text 就继承
到了箭头上。补一个 .font-combobox > img 选择器,让两处表现一致。
2026-09-12 19:18:36 +08:00
Lu Fan(SonnyCalcr)
9c3e235241
Merge pull request #348 from fanlusky/fix/candidate-clip-stale-generation
...
fix(server): 候选窗右侧截断——去重的 show 不再让待应用的裁剪区失效
2026-09-12 18:47:45 +08:00
fanlusky
2717000084
fix(server): 候选窗右侧截断——去重的 show 不再让待应用的裁剪区失效
...
WebView2 后端下候选窗右边总是被竖切一刀,且多半切在最后一个候选上。
根因在 WndProcCandWindow:g_candidate_content_generation 在处理函数最顶
部无条件自增,早于下面的去重判断。IME 每次按键会投递两次 show,于是每一
次按键的时序都是:
gen N -> path=content-only,InflateCandWnd 带着捕获 gen N 的回调发出
DOM 更新;
gen N+1 -> 帧签名相同,走 path=dedup,什么都没画、什么都没排,但把计数
器留在了 N+1;
gen N 的 dom-callback 触发,发现 N != N+1,直接 return。
结果 SetWindowRgn 只会被完整的 FineTune 刷新,区域一直冻结在上一次
FineTune 量到的宽度上。后面的候选页一旦更宽,就会画到过期区域之外 —— 右
边缘的硬切;更窄时只是多出一块看不见的透明留白,所以这个 bug 时隐时现。
诊断日志(851 行)里的证据:path=content-only 18 次,dom-callback 世代
不匹配 18/18,clip-measure-submit / apply / drop 全为 0,ui-region 7 次且
全部来自 path=full-layout。区域算术本身在 7 个样本里都正确。
修复:去重分支把世代还回去(compare_exchange,仅在期间无人自增时生效),
因为一次去重的 show 什么都没画,DOM 里仍然正是那次在途测量对应的帧。上面
的 path=superseded 出于同样的原因在自增之前就返回。
顺带修掉同一个 bug 的另一半与它为何一直查不出来:
- 去掉 #msime-fast-layout 那张给 .container/.row-wrapper 强加
white-space:nowrap!important 的样式表(并在应用外观时移除历史残留),
它让卡片长过 --msime-max-width-dip 的上限,再被 overflow-x:hidden 从字
中间切开;
- ApplyCandidateFrame 与测量脚本改用 max-content,不再写死 nowrap;
- 量测宽度纳入 scrollWidth,并把 rw/ow/sw/cw 一并回传;
- webview_utils.cpp 里被 #define 成空操作的 ui-measure 日志恢复,裁剪路径
的静默 return 补上 clip-refresh-skip 一行 —— 正是这两处的沉默让「区域
从不刷新」在日志里毫无痕迹。
新增的日志只记录数字、坐标与状态,不含任何用户输入或候选文本。
Release / Debug 构建通过,ctest -C Debug 2/2 通过,打包安装后人工验证不再截断。
2026-09-12 18:42:04 +08:00
Lu Fan(SonnyCalcr)
60d6d5991f
Merge pull request #346 from fanlusky/feat/settings-restart-server-button
...
feat(settings): 外观页新增「重启输入法进程」按钮
2026-09-12 16:55:31 +08:00
fanlusky
a8c10a63a6
feat(settings): add a restart-server button under the UI backend setting
...
界面渲染 only takes effect at Server startup, so the setting already told the
user to restart the IME process but offered no way to do it outside the
Ctrl+Shift+Alt+R developer shortcut. Add a 重启 button in the same section.
Settings runs in its own process, so the request travels the Aux pipe — the
supported cross-integrity control path the config notifications already use —
and the Server exits with the Watchdog restart code. The shortcut and the
button now share RestartServerProcess().
2026-09-12 16:41:13 +08:00
Lu Fan(SonnyCalcr)
28bdea5dc0
Merge pull request #345 from fanlusky/fix/261-learn-generated-phrase
...
fix: learn phrases composed with whole-sentence candidates, and keep AI context
2026-09-12 16:18:03 +08:00
fanlusky
aba4851f90
test: do not require a lattice sentence from the locked dictionaries
...
Whether a whole-sentence candidate is produced depends on which
dictionaries and local models are installed, so the CI product data
yields none and the presence requirement failed there. Check the
canonical reading of whatever whole-sentence candidates do appear, and
assert the shuangpin-to-quanpin conversion unconditionally instead --
that conversion is the value the fix attaches to those candidates.
2026-09-12 16:01:42 +08:00
fanlusky
e835e09c20
fix(engine): give whole-sentence fallback candidates a canonical pinyin
...
The Google-pinyin whole-sentence candidate is inserted at index 0 in both
quanpin and shuangpin, so it is what Space commits. All four construction
sites built it without a canonical quanpin reading, so when it finished a
word-creation session update_creating_word_progress() had no reading to
join and can_store stayed false: the prefix plus the sentence went to the
host app but were never learned.
Carry the converted quanpin segmentation on those candidates, and extract
the early-return storage condition into a testable predicate.
2026-09-12 15:53:54 +08:00
fanlusky
ad77865f67
fix(server): learn generated-sentence phrases and keep AI context
...
PR #344 restored the selected prefix in the committed text for Generated
candidates, but the special-candidate early-return branch still skips the
rest of the post-commit work in ProcessSelectionKey.
Two consequences remained:
- The composed phrase was never stored. Word creation persists through
EnqueueStoreUserPhraseTask in the creating-word completion block, which
sits after the early return. Committing "西" + the generated sentence
"你好中国" displayed correctly but was never learned, so the same input
had to be composed again every time.
- g_ai_context was not advanced, so text committed through this branch was
missing from the context sent to the AI suggestion provider.
Store the phrase before returning, restricted to Generated candidates in an
active creating-word state. Both pinyin halves are canonical quanpin
(creating_word.pinyin is accumulated by append_canonical_pinyin, and the
lattice candidate carries the whole-sentence key in canonical_pinyin), so a
single "'" joins them. Syllable/han-character agreement is validated by
create_word_from_canonical_pinyin, which rejects a mismatch instead of
writing a bad row.
Append to the AI context as well. The prefix was already appended by its own
ProcessSelectionKey call on the normal path, so only the current segment is
added here. The trim logic is factored into AppendAiContext and shared with
the existing call site rather than duplicated.
Refs #261 .
2026-09-12 15:34:11 +08:00
Lu Fan(SonnyCalcr)
0357eee71b
Merge pull request #344 from ouchihao/codex/fix-261-generated-prefix
...
fix(server): preserve selected prefix when committing generated candidates
2026-09-12 15:13:44 +08:00
Lu Fan(SonnyCalcr)
e6136ddcd2
Merge pull request #337 from Komeiji-Shiki/codex/fix-317-candidate-wrap
...
fix(ui): 修复候选列表溢出与换行后的点击区域
2026-09-12 14:52:52 +08:00
Ouchihao
2cf9cda89e
fix(server): preserve selected prefix when committing generated candidates
2026-09-12 14:01:08 +08:00
Lu Fan(SonnyCalcr)
3745dd8865
Merge pull request #342 from metasequoiaime/dependabot/npm_and_yarn/ui-html/webview2/settings/ime-settings/npm-fa1afdc6a1
...
chore(deps): bump the npm group in /ui-html/webview2/settings/ime-settings with 2 updates
2026-09-12 13:37:58 +08:00
Lu Fan(SonnyCalcr)
6f73441956
Merge pull request #343 from metasequoiaime/dependabot/github_actions/actions-04f1352e55
...
chore(deps): bump the actions group with 3 updates
2026-09-12 13:37:47 +08:00
dependabot[bot]
fecad35baa
chore(deps): bump the actions group with 3 updates
...
Bumps the actions group with 3 updates: [pnpm/action-setup](https://github.com/pnpm/action-setup ), [actions/setup-go](https://github.com/actions/setup-go ) and [actions/dependency-review-action](https://github.com/actions/dependency-review-action ).
Updates `pnpm/action-setup` from 6.0.10 to 6.1.0
- [Release notes](https://github.com/pnpm/action-setup/releases )
- [Commits](https://github.com/pnpm/action-setup/compare/0977fd99725f1db4007ccb2928dbb4e90d06cc86...ea17c68df8912ef543352723c149a84f56e3d413 )
Updates `actions/setup-go` from 6.5.0 to 7.0.0
- [Release notes](https://github.com/actions/setup-go/releases )
- [Commits](https://github.com/actions/setup-go/compare/924ae3a1cded613372ab5595356fb5720e22ba16...b7ad1dad31e06c5925ef5d2fc7ad053ef454303e )
Updates `actions/dependency-review-action` from 4.9.0 to 5.0.0
- [Release notes](https://github.com/actions/dependency-review-action/releases )
- [Commits](https://github.com/actions/dependency-review-action/compare/2031cfc080254a8a887f58cffee85186f0e49e48...a1d282b36b6f3519aa1f3fc636f609c47dddb294 )
---
updated-dependencies:
- dependency-name: pnpm/action-setup
dependency-version: 6.1.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: actions
- dependency-name: actions/setup-go
dependency-version: 7.0.0
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions
- dependency-name: actions/dependency-review-action
dependency-version: 5.0.0
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-09-11 20:01:39 +00:00
dependabot[bot]
4cec8f060f
chore(deps): bump the npm group
...
Bumps the npm group in /ui-html/webview2/settings/ime-settings with 2 updates: [@types/chrome](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chrome ) and [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node ).
Updates `@types/chrome` from 0.2.8 to 0.2.9
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chrome )
Updates `@types/node` from 26.4.1 to 26.5.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node )
---
updated-dependencies:
- dependency-name: "@types/chrome"
dependency-version: 0.2.9
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: npm
- dependency-name: "@types/node"
dependency-version: 26.5.0
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: npm
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-09-11 19:59:30 +00:00
Lu Fan(SonnyCalcr)
04a8df56f8
Merge pull request #341 from fanlusky/feat/vendor-engine-in-tree
...
refactor(engine): 将 engine 从 submodule 内嵌为仓内一等组件
2026-09-12 03:57:52 +08:00
fanlusky
a7779d2b05
refactor(engine): 将 engine 从 submodule 内嵌为仓内一等组件
...
`vendor/MetasequoiaImeEngine` submodule 改为 `engine/` 目录,导入的是
product-lock.json 原本钉住的提交 c810d201,逐文件核对过 blob,因此这是一次
搬迁而不是引擎升级。引擎自己的嵌套 submodule(googlepinyinime-rev、utfcpp、
miniaudio)按各自 gitlink 一并展开,来源与提交见 engine/UPSTREAM.md。
Windows 专门化裁掉了不属于本产品的部分:whisper.cpp 与本地推理 provider、
macOS 示例宿主、整个 dictionary/ 建库流水线、上游 CI 与 release-please 配置。
词库仍按 product-lock.json 在构建时取发布产物。
引擎不再进 product-lock.json:没有 gitlink 就没有可比对的东西,锁里写一个上游
commit 等于宣称这棵树仍等于上游,而第一个 Windows 专门化改动落地时这句话就假了。
verify-contracts / verify-checkout 随之移除,verify-published 保留。
CI 与工具链:引擎源码并入根 scripts/format.sh(删掉引擎自己的那份,避免两套排除
列表分叉);引擎 voice.yml 里的 silero_vad.onnx 摘要校验移到本仓 lock job;
engine-bump-triage 工作流与其测试删除;gitsubmodule 的 dependabot 频率由 daily
改为 monthly。
README、README.en、AGENTS.md、CONTRIBUTING、docs/product-release.md 及各子目录
文档同步说明新的位置与边界。
2026-09-12 03:40:48 +08:00
Lu Fan(SonnyCalcr)
987f404343
Merge pull request #338 from fanlusky/fix/build-warnings
...
refactor(server,windows): clear the /W4 build warnings
2026-09-12 01:18:23 +08:00