Skip to content

feat: add configurable retry cooldown and polish config UX#160

Merged
mxyhi merged 7 commits intomainfrom
feat/config-cooldown-autosave
Mar 8, 2026
Merged

feat: add configurable retry cooldown and polish config UX#160
mxyhi merged 7 commits intomainfrom
feat/config-cooldown-autosave

Conversation

@mxyhi
Copy link
Owner

@mxyhi mxyhi commented Mar 8, 2026

Summary

  • make retryable failure cooldown configurable and reset runtime cooldown state on config reload
  • expose the cooldown setting in the config form and document the updated retry/cooldown policy
  • improve the upstreams table with tighter columns, truncation handling, and hover tooltips
  • auto-save config changes after debounce and avoid retrying the same failed draft forever

Commit Order

  1. feat(core): make retry cooldown configurable
  2. feat(config): expose retry cooldown setting
  3. refactor(config): improve upstreams table readability
  4. refactor(config): auto-save config changes

Testing

  • cargo test -p token_proxy_core
  • pnpm run i18n:compile
  • pnpm exec tsc --noEmit
  • pnpm vitest run src/features/config/form.test.ts src/features/config/AppView.test.tsx src/features/config/ConfigScreen.test.tsx src/features/config/cards/upstreams/constants.test.ts src/features/config/cards/upstreams/table.test.tsx

@mxyhi
Copy link
Owner Author

mxyhi commented Mar 8, 2026

已补充跟进修复,主要覆盖本轮评审关注点:

  • 保存配置后,运行中的代理会按需自动 reload / restart,停止中的代理保持停止
  • retryable_failure_cooldown_secs 增加构建期溢出校验,并在 selector 侧用 checked_add 兜底避免 panic
  • 配置页移除常驻保存按钮,仅在自动保存失败时显示局部“重试保存”入口
  • 同步更新中英文文案与 README,语义对齐为“自动保存 + 自动应用运行时配置”

已复跑验证:

  • pnpm run i18n:compile
  • pnpm exec tsc --noEmit
  • pnpm vitest run src/features/config/form.test.ts src/features/config/AppView.test.tsx src/features/config/ConfigScreen.test.tsx src/features/config/cards/upstreams/constants.test.ts src/features/config/cards/upstreams/table.test.tsx
  • cargo test -p token_proxy_core
  • cargo check --manifest-path src-tauri/Cargo.toml

@mxyhi mxyhi merged commit a51b451 into main Mar 8, 2026
1 check passed
@mxyhi mxyhi deleted the feat/config-cooldown-autosave branch March 8, 2026 04:36
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.

1 participant