feat: 扩展匿名使用统计覆盖核心功能#38
Merged
Merged
Conversation
问题描述:现有统计只能覆盖少量启动、供应商切换、代理启停和更新事件,无法在匿名边界内观察主要功能的使用量与结果。 修复思路:统一使用固定事件域及 action/result/app/source/enabled 枚举,在真实业务成功或失败回调中上报,并由前后端双重白名单过滤敏感字段。 更新代码架构:新增统一前端统计入口和 Rust 上报命令,接入供应商、代理、OAuth、配置、WebDAV、更新与设置模块,同时补充默认开启可关闭的设置、Docs/QA 和安全测试。
问题描述:develop 合入 CC 3.17 底座、S3、Profile、Usage 和新更新链路后,PR #38 与设置、供应商、更新等入口产生代码冲突。 修复思路:以最新 develop 架构为准逐项迁移匿名统计埋点,删除已废弃的旧 build 工作流,不回退底座新增功能;更新检查适配新原生与 GitHub 兜底链路。 更新代码架构:保留统一 analytics 前端入口与 Rust 严格白名单,把供应商、代理、OAuth、同步、设置和更新事件接入 CC 3.17 对应的新 Hook、Context 与后端设置模型。
chenpingan666
approved these changes
Jul 22, 2026
chenpingan666
left a comment
Collaborator
There was a problem hiding this comment.
已完成代码审查并验证通过。
重点确认:
- 匿名统计采用固定事件名与字段白名单,后端拒绝未知字段,不上传 Provider 名称、ID、URL、路径、错误正文、账号或密钥等敏感信息;
- Release 构建才发送,用户关闭后前后端双重熔断,3 秒超时且不重试、不落盘;
- 已补齐 Web 热更新 requiredCapabilities 契约和 invariant 检查;
- 已区分 Profile、托盘与故障转移切换来源,避免统计污染。
本地验证:check:tuzi、format:check、typecheck、451 项前端单测、Rust 定向测试、cargo check --locked、git diff --check 全部通过;远端四平台 CI 全绿。
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.
问题描述
现有匿名统计仅覆盖少量启动、供应商切换、代理启停和更新事件,无法观察主要功能的实际使用量、成功率与故障分布。
修复思路
action/result/app/source/enabled枚举。覆盖范围
更新代码架构
src/lib/analytics.ts。验证
pnpm exec tsc --noEmitcargo fmt --manifest-path src-tauri/Cargo.toml -- --checkcargo test --manifest-path src-tauri/Cargo.toml commands::analytics::tests --lib:8 passedcargo test --manifest-path src-tauri/Cargo.toml analytics_defaults_on_but_preserves_explicit_opt_out --lib:1 passedgit diff --check未执行完整 App/DMG 构建。