Repository navigation
fix(workbench): 将通知已读迁移和计数规则移入 Core - #54
Merged
Merged
Conversation
Mucheen
marked this pull request as ready for review
November 15, 2026 07:55
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.
关联 Issue / Linked issue
PR 类型 / Type
改动说明 / What changes
背景 / Why
通知工具窗口的已读迁移和未读计数在 Go 中实现,还依赖未读记录连续位于历史列表头部。共享状态规则应由 Rust Core 持有,桌面只保留原生呈现与事件接线。
改动 / Changes
lithe-core-rules::workbench实现workbench.notifications.reduceReadState,接入 Core 命令枚举、解析和 JSON dispatcher。invalid_request。不新增全局状态、I/O、后台任务或依赖。不在本 PR 范围内 / Out of scope
通知历史的呈现、Toast 生命周期和窗口行标识留在宿主;通知持久化和气泡折叠不在此范围。桌面消费者修改在 PR #1948,合入本 Core PR 后更新其固定修订。
类型专属:fix
复现与根因
打开通知工具窗口会执行 Go
notificationCenter.markRead,铃铛由 Gounread计数,没有 Core 命令或共享 fixture。新增 fixture 在实现前因命令不支持而失败;接入后规则层与实际 JSON 分发通过。契约对显示顺序没有未读前缀约束。范围检查 / Scope checks
功能矩阵 / Feature matrix
N/A:本仓库没有桌面功能矩阵;宿主 PR #1948 同步更新
workbench-notifications.json,两端原生验收保持 pending。插件归属 / Plugin ownership
UI 验证 / UI evidence
N/A:Core 不呈现界面。宿主 PR 保留现有通知截图,并验证两个入口和重绘不发 Core 请求。
统一日志系统 / Structured logging
N/A:复用标准 Core 请求分发和错误分类;宿主在读状态调用失败时记录既有后台失败事件,保留上次投影,不递归产生通知。
界面文案 / i18n
N/A:无新界面文案;Core 返回结构化
invalid_request诊断。逻辑归属 / Logic placement
性能与内存 / Performance and memory
设置 / Settings
N/A:无设置变更。
插件契约 / Plugin contract
N/A:新增内部应用 Core 命令,不新增插件宿主方法,不改变插件协议或 SDK。
发行包与资源 / Bundle and resources
N/A:无运行时资源、下载、构建资源路径或发行包写入。
无用代码与重构 / Dead code and refactoring
验证 / Verification
最新完整 Rust Core CI 和 契约/SDK CI 已通过,包括声明的 macOS、Windows 测试与三个 SDK 的端到端验证。初次 Draft 运行在标记 ready 后被替代取消;页面残留的
matrix.name来自该旧运行,job conclusion 为cancelled,最新 Rust Core 汇总门禁为成功。cargo test --manifest-path rust/Cargo.toml -p lithe-core-rulescargo test --manifest-path rust/Cargo.toml --workspace --features lithe-remote/servercargo clippy --manifest-path rust/Cargo.toml --workspace --all-targets --all-features -- -D warnings--target x86_64-pc-windows-msvcclippy(默认 features)verify-rust-core-comments.sh core-rules coreaffected-crates.mjs与verify-platform-tests.mjsWindows 原生窗口验收未执行;Windows 目标编译检查不代表原生交互已验收。