Repository navigation
v1.2.1
🐛 问题修复
- 关闭游戏窗口导致程序闪退:内置窗口开启抓包时,会在页面加载之前同步等待网络域就绪,窗口因此可能一直白屏;在这种「调试器已附加但从未导航」的状态下关闭窗口会让主进程崩溃(退出码
0xFFFF7003)。现在网络域异步开启,抓包拆除改在窗口真正关闭之前完成 - 在线推理的 HUD 与本地不一致:在线服务只用「吃 / 碰 / 杠」这样的类别名回应,卡片上因此只有动作名。现在会还原出具体的牌——吃、碰、杠显示要鸣的牌组合(杠还会区分大明杠 / 暗杠 / 加杠),自摸与荣和按决策点判定(自己摸到的是自摸,他家打出或抢杠的是荣和)
- 在线立直没有宣言牌:在线建议里的「立直」现在会带出宣言牌候选及各自的置信度,取自在线模型自己的排序,不会拿本地前瞻的结果顶替
- 内置窗口模式下埋点仍会出网:雀魂登录时上报到阿里云 SLS 的证书信息,此前只在 MITM 模式被拦截;现在浏览器层直接取消,普通请求、跨域预检、
sendBeacon、图片与 Worker 内的请求都不会出网 - 标题栏与下拉框文案没有跟随语言:最小化 / 最大化 / 还原 / 关闭窗口、打开设置、切换 HUD 的读屏标签,以及语言与日志级别的占位文案,此前固定为英文
🎨 UI/UX 增强
- 清除密钥前先确认:密钥加密保存、无法还原,误点「清除密钥」现在会先弹出确认框,说明后果
- 悬浮窗提示不再随窗口缩放:居中的「待机中」「HUD 模式已启用」改为固定字号与图标尺寸,窗口拉大拉小时不再一起放大
- 设置页不再跳动:服务状态的结果移到按钮左侧的固定槽位并在过长时截断;密钥状态行从第一次渲染就占位、未知值显示
—,异步结果到达时面板高度不变
🚀 性能提升
- 悬浮窗置信度环的扫描光束改由 CSS 关键帧驱动,不再用
requestAnimationFrame循环更新组件状态——此前只要 HUD 挂在那里,就每秒触发 60 次重渲染
🛠️ 维护与重构
- 在线模型设置拆分为取数 hook(
useOnlineAccount)、密钥行与在线专属字段三个部分,区块自身只负责组合 - 类型检查收紧到
noUncheckedIndexedAccess、noImplicitOverride、noImplicitReturns、noFallthroughCasesInSwitch、isolatedModules、verbatimModuleSyntax,ESLint 接入类型感知规则;根tsconfig.json兼作项目配置 sync-version现在同时同步Cargo.lock里的引擎版本,避免版本号变更后cargo --locked直接失败
🧪 测试与质量
- CI 现在会构建原生引擎,此前 20 个依赖引擎的测试在 CI 上被静默跳过
- 新增手牌台账(哪一张离手,含赤五优先)与对局状态的测试;在线链路覆盖到吃碰杠的牌组合、荣和座位判定与立直宣言牌
- 全仓共 469 个单元测试、19 个集成测试、58 个 Rust 测试(含 2 个决策一致性测试)
🐛 Bug Fixes
- Closing the game window crashed the app: with capture enabled, the built-in window awaited the network domain before loading the page, so it could stay white forever; closing it in that state — a debugger attached but never navigated — crashed the main process (exit
0xFFFF7003). The network domain now starts asynchronously and capture is torn down before the window closes - An online decision looked different from a local one: the service names a call only by its kind, so the card showed bare labels. The concrete tiles are now restored — chi, pon and kan show the tiles being called (a kan also distinguishes open, closed and added), and a win is judged from the decision point (your own draw is a tsumo; a discard or a robbed kan is a ron)
- An online reach carried no declaration tile: the riichi row now lists the declaration-tile candidates with their own confidence, ranked by the online model itself — a local lookahead is never substituted
- Telemetry still left the app in the built-in window mode: the certificate details Majsoul reports to Aliyun SLS were only blocked under MITM; the browser layer now cancels them, covering plain requests, CORS preflights,
sendBeacon, images and requests inside workers - Title-bar and select labels were not translated: the screen-reader labels for minimize / maximize / restore / close, open settings and toggle HUD, plus the language and log-level placeholders, were hardcoded in English
🎨 UI/UX Enhancements
- Clearing the key asks first: the key is stored encrypted and cannot be recovered, so the action now opens a confirmation that spells out the consequence
- The HUD's hints no longer scale with the window: "Standby" and "HUD Mode Active" use a fixed font and icon size instead of growing with the board
- The settings panel stopped jumping: the service-status answer moved into a fixed slot left of the buttons and truncates when long; the key status line is rendered from the first paint with
—for values that have not arrived, so the panel keeps its height
🚀 Performance
- The confidence ring's beam is driven by CSS keyframes rather than a
requestAnimationFrameloop that calledsetState, which re-rendered the ring sixty times a second for as long as the HUD was open
🛠️ Maintenance & Refactoring
- The online model settings are split into a data hook (
useOnlineAccount), the key row and the online-only fields; the section itself only composes them - Type checking tightened to
noUncheckedIndexedAccess,noImplicitOverride,noImplicitReturns,noFallthroughCasesInSwitch,isolatedModulesandverbatimModuleSyntax, ESLint gained type-aware rules, and the roottsconfig.jsondoubles as a project sync-versionnow also writes the engine version intoCargo.lock, which otherwise made everycargo --lockedbuild fail right after a bump
🧪 Testing & Quality
- CI now builds the native engine; the 20 engine-backed tests it silently skipped run again
- New suites for the hand ledger (which copy leaves the hand, red fives first) and the round state; the online path is covered for call tile combinations, win-seat classification and riichi declaration tiles
- 469 unit tests, 19 integration tests and 58 Rust tests in total, including the two decision-parity tests
Full Changelog: v1.2.0...v1.2.1