Skip to content

fix: 练习时长配置迁移及 Google 翻译限流恢复 - #126

Merged
Talljack merged 4 commits into
mainfrom
codex/practice-time-settings
Oct 7, 2026
Merged

Talljack merged 4 commits into
mainfrom
codex/practice-time-settings

Conversation

@Talljack

@Talljack Talljack commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Changes

Daily practice time and learning-day preferences now live in Settings → Practice schedule. The dashboard keeps the task queue and time summary, with a link to the settings section instead of an inline time picker. Existing preferences remain stored in the same account-scoped dailyTasks record.

Google free translation returning 429 previously stopped selection translation immediately. Successful translations are now cached for one hour with a bounded cache, identical in-flight requests are coalesced, and Google requests share a concurrency limit across API calls. The endpoint respects Retry-After and resumes when the delay expires, while cached results remain available during the cooldown.

Selection translation falls back to the existing AI translation endpoint when Google fails. If neither service works, the popup shows localized guidance and a Retry button. The AI fallback requires a usable browser-configured or server-provided AI service.

Validation

  • Final revision unit suite: 1102 passed, 3 opt-in tests skipped.
  • Production build, lint, typecheck and diff checks passed.
  • Practice schedule: Chromium/WebKit × English/Chinese, 4/4 passed; mobile layout and reload persistence covered.
  • Existing daily queue interaction regression: both engines passed. Its timeout was increased to 60s to include the added Settings navigation; the first WebKit run exceeded the previous 30s timeout.
  • Selection translation fallback and retry: both engines, 4/4 passed using mocked upstream responses.
  • Actual Google request and actual application /api/translate/free request for the reported sentence returned HTTP 200 and Chinese translation. This confirms current connectivity; upstream availability remains external.
  • Earlier mistaken language-notice change was reverted; the final diff does not move the language notice.

@vercel

vercel Bot commented Oct 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
echo-type Ready Ready Preview Oct 7, 2026 12:19pm UTC

@Talljack
Talljack merged commit b481fbe into main Oct 7, 2026
10 of 12 checks passed
@Talljack
Talljack deleted the codex/practice-time-settings branch October 7, 2026 12:20

This branch was successfully deployed

1 active deployment
Preview — 91f05de5 Deployed Oct 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant