Skip to content

v0.1.14

Latest

Choose a tag to compare

@github-actions github-actions released this 19 Oct 05:32

cell 0.1.14

修复:cellui 窗口在 4–5 秒后消失

  • 窗口归宿主所有:页面不再能关闭原生窗口。with_webui_bridge() 在 webui.js 之前注入 window.close = no-op;应用退出仍由 webui_wait() / 进程退出结束窗口。
  • WebUI 服务器不再把「已连接过又断开」当作启动失败(移除 stop = true):刷新页面、渲染器挂起、慢恢复都不会再关掉窗口;服务器继续监听,桥接层可重连。
  • WEBUI_RELOAD_TIMEOUT 1500ms → 15000ms:原值短于繁忙桌面上 WebView2 渲染器的挂起/恢复时间。
  • _webui_wv_show() 的 WebView2 冷启动等待 500ms → 5000ms:500ms 会输掉竞态,show_wv() 返回 false 并回退浏览器。
  • webui_new_window_id() 清零窗口结构:_webui_malloc 不清零,transparent / frameless 曾是堆垃圾。
  • WebView2 控制器 put_Bounds 后显式 put_IsVisible(TRUE)。

测试

  • 实机:窗口存活 ≥20s(修复前 4.5s);几何仍持久化/恢复 (60,50,1160,880)。
  • tests/cellui_geometry.py 新增 6s 存活守卫:客户端断开后窗口必须仍在。
  • 全量 ctest 5/5。

已知

  • 本机 WebView2 156 的某些会话中,控制器创建成功、页面加载(窗口标题正确),但合成面不出像素(内容区白色)。这是该环境的 WebView2 渲染问题,与窗口生命周期 / 几何无关;窗口与几何修复不受影响。

提交

  • 6f216bd fix: keep the desktop window alive when the WebView2 client drops
  • db14051 test: guard the window lifetime in the real-machine geometry test