Skip to content

fix(ui): fix windows tray reset order - #462

Open
Jack251970 wants to merge 2 commits into
qxcnm:mainfrom
Jack251970:fix/windows-tray-reset-order
Open

fix(ui): fix windows tray reset order#462
Jack251970 wants to merge 2 commits into
qxcnm:mainfrom
Jack251970:fix/windows-tray-reset-order

Conversation

@Jack251970

@Jack251970 Jack251970 commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

变更摘要

  • Fix reset order in Windows tray
  • Add test to check this order

改动范围

  • Frontend
  • Desktop / Tauri
  • Service
  • Gateway / Protocol Adapter
  • Docs / Governance
  • Workflow / Release

主要文件

验证

  • pnpm -C apps run test
  • pnpm -C apps run build
  • pnpm -C apps run test:ui
  • cargo test --workspace
  • 其他本地验证已说明

已执行的实际验证:


未执行的验证与原因:


风险与影响面

备注

  • 提交前请确认未包含敏感 token、cookie、API key

Copilot AI lite review requested due to automatic review settings September 5, 2026 09:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is narrowly scoped, updates all identified call sites, and includes regression tests covering the swapped-field scenario.

Pull request overview

This PR fixes the Windows tray “reset” label ordering by making the tray summary explicitly track 5-hour vs 7-day reset windows (instead of “primary/secondary”), and by classifying reset windows based on their duration to tolerate swapped fields. It also adds targeted Rust unit tests to prevent regressions.

Changes:

  • Update the service-side tray summary to classify reset windows by window_minutes and expose them as five_hour_* / seven_day_*.
  • Update the Tauri tray menu label wiring to use the new explicit summary fields so 5-hour and 7-day labels are no longer swapped.
  • Add unit tests covering the swapped-field scenario and correct classification.
File summaries
File Description
crates/service/src/usage/usage_tray_summary.rs Classifies usage reset windows by duration and exposes explicit 5-hour/7-day fields; adds regression tests.
apps/src-tauri/src/app_shell/tray.rs Uses the explicit 5-hour/7-day summary fields to render correct tray reset labels; updates related test.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Jack251970 Jack251970 changed the title fix: fix windows tray reset order fix(ui): fix windows tray reset order Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants