Repository navigation
fix(macos): return to welcome screen when closing project - #46
Merged
Merged
Conversation
This was referenced Nov 14, 2026
xiaoyumuxi
added a commit
that referenced
this pull request
Nov 14, 2026
xiaoyumuxi
added a commit
that referenced
this pull request
Nov 14, 2026
* fix(desktop): 日志写入器显示被拒事件、按 Core 唤醒写入并记录目录回退 - 被 Core 拒绝的事件按事件 ID 和错误码记录(最近 20 种),日志窗口状态栏和 collection-status.txt 显示数量与最近一条;不再算作写入失败。 - 整批编码失败的事件计入 dropped,由下一次写入的 log.dropped 报告;批内的 log.dropped 丢失时转交下一次报告,不重复计数。 - 去掉 500ms 轮询:Core 记录事实时通过 lithe_core_install_log_waker 回调安排一次 100ms 合并写入;详细诊断到期由写入器的一次性定时器关闭 Core 的 DEBUG 开关; 关闭时先移除回调再做最后一次写入。只有应用主进程的日志调用 ObserveCoreFacts。 - 自定义日志目录不可用、回退到默认目录时记录 app.logging.redirect_failed;读不出 logging.json 时记录 app.settings.decode_failed;推送 DEBUG 开关失败记录一次 app.logging.diagnostics_failed。 - 日志窗口不再把所有失败记成 app.logging.diagnostics_failed:用户操作失败记 app.notification.operation_failed,窗口自己的读取和保存失败记 app.background.operation_failed,都带 operation。 - ErrorFields 移到 core.LogErrorFields,供各处共用。 * fix(desktop): 切换 Core 检出时重新编译工作区成员,不再暂存另一个检出的库 固定检出和 LITHE_CORE_RUST_DIR 共用 Cargo 编译目录,而 cargo 按成员在工作区内的相对路径 计算哈希,两个检出把 lithe-diagnostics 等成员编译到同一组文件、同一份指纹,只按修改时间判 新旧。切回原检出时 identity.txt 写着 pinned,链接的却是 override 的事件目录。 构建脚本按 target 和 profile 记录上次编译工作区成员的检出,换了检出先 cargo clean --workspace,registry 依赖仍走缓存;无变化的运行不清理。同步更新 ci-builds.md 和 worktree-resources.json 的说明。 * fix(desktop): 日志调用按真实内核目录校验,操作来源改为封闭常量集 新增 internal/core 的站点测试:从源码读出每个生产日志调用的级别、事件 id 和字段,交给当前 链接的内核按目录编码,拼错的 id、与目录不同的级别、缺少或多出的字段都在测试里失败,而不是 运行时被写入器拒绝。用户操作的 surface 改为 actionSurface 常量,测试要求常量集合与目录描述 完全一致、每个调用解析出的 surface 都在集合内,并禁止把字符串转换成该类型。 按入口修正 surface:右键菜单、拖放、工具栏、按钮分别记录;Find Action 与快捷键运行同一命令时 由命令自己带上来源(runFrom),打开设置、项目、查找等不再一律记成 menu;构建、运行、调试的 共享启动路径不再直接 emit,由按钮、菜单和插件请求各自记录。草稿恢复改记 editor.recovery.applied,后台失败、启动残留处理、VCS 提供者跳过等改用目录中声明的事件。 * fix(desktop): 日志按操作串联,补齐插件日志接线和宿主代记的插件操作 操作链(#1927 第 1–4 项): - 每个用户动作分配一个 op(action-N),后台工作通过 a.background 继承 origin, Core 请求带 origin(source、trigger、operation),宿主记录和失败提示都带同一个 op。 - 失败提示带“查看日志”按钮,按 op 打开日志窗口并过滤到这次动作的记录。 - 补齐缺失的失败记录;app.notification.operation_failed 只用于用户动作失败, 后台失败改记 app.background.operation_failed,被取代的模型加载记为 plugin_model_superseded。 插件日志(#1927 第 5–9 项): - 插件 ${logDir} 改为会话内的 PluginFilesPath,不再推导安装目录。 - 插件后端的 lithe/log 引擎事实转发给 Core;按设置开关 lsp.setDetailedDiagnostics,诊断详情不再只停在宿主内存。 - languageServer/start 启动前失败由宿主代记,之后通过 startupOperation 交给 Core。 宿主代记的声明式贡献(diagnostics.recordPluginOperation): - debugAdapter/start:stdio 和 hosted 适配器从解析到应答 initialize 的结果, 按 resolve/launch/timeout/exit/initialize 记录;用户停止和 Core 拒绝不记录; 写入超时记为 timeout,stdio 适配器停止读取输入记为 exit。 - lithe/build/model、lithe/build/dependencies:命令式来源按 plan/resolve/launch/exit/decode/timeout 记录;provider 请求由插件 SDK 自己记录; 项目关闭取消的加载不记录。 - Core 拒绝记录时改记 app.background.operation_failed(plugin_operation_record)。 测试用真实 Core 和复制的测试二进制端到端验证各阶段,录制内核放到 plugin_operation_record_test.go 供调试和构建测试共用。 * docs(develop-lithe): 日志接入改写为 Viva 桌面端;修复空编辑区提示的界面文案检查 - references/logging.md 整体改写为 Go/Viva 桌面端的记录规则、入口和校验 - SKILL.md 规则 7 与显式处理失败改为 Go 写法 - build-desktop-core.sh 固定到 Core #46 分支提交并说明合入后迁移 - 补齐 log-exempt 标记,webpreview 去掉 slog - 空编辑区快捷键提示改为结构体表,避免 i18n 检查把命令 ID 误判为界面文案 * docs(matrix): 诊断与日志条目记录 Viva 桌面端的日志接入现状 diagnostics-export 的证据补上唤醒回调、origin、插件代记、引擎事实转发、操作串联和目录校验测试, 说明改为 #1927 之后的实现;整机与 Windows 实机验收仍为 pending。 * build(desktop): Core 固定到 main 上 #46 的合入提交 e811068
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing
swift test --disable-sandbox(109 tests passed)Closes #43