-
chore(release): v2.2.0 (#1334)
Publish Container Image / Build and publish container image (push) Has been cancelled发布于
2026-07-19 01:31:29 +00:00 | 637 次提交 在此版本后已推送到 main-
chore(release): v2.2.0
-
docs(release): bump homepage project status to v2.2
-
Address Claude review feedback
- i18n: hoist the language-switch race guard from a per-hook-instance ref to a
module-scope token via a new setActiveLanguage(). The old useRef only guarded
races within one mounted useLanguage() instance, so it would silently break if
a second call site (or a remount) were added. setActiveLanguage loads the
target catalog, applies "latest request wins" across all callers, resolves
true only when it actually switched (callers persist only then), and rejects
only for the latest request's genuine fetch failure. - useLanguage: use setActiveLanguage; drop the now-redundant ref/guard.
- Address Claude review feedback
- i18n: apply the "reject only for the latest request" contract to
setActiveLanguage's changeLanguage step too, not just loadCatalog. If
changeLanguage rejects (rare) for a request a newer switch has already
superseded, swallow it instead of logging a misleading "Failed to change
language" — matching the catalog-fetch guard above.
- Address Claude review feedback
- i18n: serialize setActiveLanguage's changeLanguage calls through a module-scope
queue so overlapping switches apply in issue order, not resolution order. The
token guard already prevented persisting a superseded selection, but two
in-flight changeLanguage calls could still resolve out of order and flip the
visible i18next language back to a stale one. Queued switches now run one at a
time and skip themselves once superseded, so the newest request always wins
the final active language.
下载附件
-