fix(usage): 持久化统计页自动刷新间隔#5057
Merged
farion1231 merged 1 commit intoJul 9, 2026
Merged
Conversation
Owner
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Collaborator
|
lgtm! |
allenxu09
approved these changes
Jul 9, 2026
farion1231
approved these changes
Jul 9, 2026
farion1231
left a comment
Owner
There was a problem hiding this comment.
Thank you for your contribution!
gavinwang668
added a commit
to gavinwang668/cc-switch
that referenced
this pull request
Jul 12, 2026
Merges upstream farion1231/cc-switch up to 99e11e0 (40 commits) to bring in farion1231#5071 (Codex native Anthropic Messages protocol) and the proxy-layer commits it depends on. Manual port was infeasible: the proxy files (forwarder/handlers/codex.rs) diverged by 300-665 lines from upstream's base, and farion1231#5071's new modules reference upstream-only APIs. Conflict resolution: - Files already manually ported (11c/94f/farion1231#5128/profiles): kept ours (crates-adapted, tested); took upstream for the 3 new farion1231#5071 modules (transform_codex_anthropic / streaming_codex_anthropic / codex_responses_sse) and let auto-merge handle the rest of the proxy changes. - i18n: took upstream (has farion1231#5071 keys) + re-added profiles.clearFailed. - Deduplicated auto-merge artifacts: `mod profile` / `mod profiles` declared twice in commands/mod.rs, dao/mod.rs, services/mod.rs. - Brought missing codex_state_db module (rename-detection miss) and declared it in cc-switch-core lib.rs. - Adapted src-tauri-style `crate::services` ref in config.rs to `cc_switch_core::services`; wrapped query_codex_quota call in Ok to match the merged signature. - UsageDashboard: merged budget features (ours) with farion1231#5057 refresh- interval persistence (upstream). - Removed spurious src-tauri/src/commands/{coding_plan,mcp}.rs rename duplicates (real files live in crates/). cargo check -p cc-switch-app passes.
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 / 概述
Fixes #4939
修复使用统计页的自动刷新间隔只保存在组件内存中,切换设置页或重新打开设置后会回到 30s 的问题。
settings.json。UsageDashboard测试覆盖初始化、保存和失败回滚。Related Issue / 关联 Issue
Fixes #4939
Screenshots / 截图
行为修复,无视觉变化。
Validation / 验证
./node_modules/.bin/tsc --noEmit./node_modules/.bin/vitest run tests/components/UsageDashboard.test.tsx./node_modules/.bin/prettier --check src/components/settings/SettingsPage.tsx src/components/usage/UsageDashboard.tsx src/lib/schemas/settings.ts src/types.ts tests/components/UsageDashboard.test.tsxcargo fmt --manifest-path src-tauri/Cargo.toml -- --checkcargo clippy --manifest-path src-tauri/Cargo.toml -- -D warningsgit diff --check说明:本地
pnpm typecheck/pnpm format:check在脚本执行前被 pnpm 11 的approve-builds校验阻塞(esbuild/mswbuild scripts 未审批)。上面的等价底层命令已通过。Checklist / 检查清单
pnpm typecheckpasses / 通过 TypeScript 类型检查pnpm format:checkpasses / 通过代码格式检查cargo clippypasses (if Rust code changed) / 通过 Clippy 检查(如修改了 Rust 代码)