Repository navigation
fix(ui): recover locale imports after source errors - #143776
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 6:24 AM ET / 10:24 UTC (Revision 4). ClawSweeper reviewWhat this changesThe PR lets Control UI locale imports recover after a source error without waiting for a watched-file change and adds regression coverage. Merge readiness✅ Ready for maintainer review The repair remains necessary on current main. The focused change preserves error propagation, successful caching, and generation isolation; no actionable patch defects were found. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI’s Vite plugin combines English source catalogs with translation memory to generate locale modules. Its shared import cache feeds both ordinary translations and configuration hints. flowchart TD
A[Locale module request] --> B[Shared source import]
C[English source catalogs] --> B
B --> D{Import succeeds?}
D -->|Yes| E[Combine translation memory]
E --> F[Locale and configuration hint modules]
D -->|No| G[Clear failed promise and return error]
G -->|Later request| B
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +4, Tests +11. Total +15 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep failed-import recovery in the existing cache producer while preserving shared successful loads and generation isolation. Do we have a high-confidence way to reproduce the issue? Yes, from source: reject the source import, correct it, then request the locale again without invalidation; current main reuses the rejected promise. This review did not execute that path. Is this the best way to solve the issue? Yes. Clearing the failure at its producer repairs the cache lifecycle without adding another owner, fallback catalog, or retry loop. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 92464dc49e91. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
Observe the same reduced-motion style endpoint after its asynchronous reveal settles. Preserve the reveal-delay bounds, content checks, exact CSS values and existing timeout; no UI or animation behavior changes. Related: #143776.
771cdc9 to
1bdd51a
Compare
Clear a rejected source-catalog promise at its producer and preserve the original failure. Later locale requests can load corrected source while successful sharing and generation fencing stay intact. Related: #143376.
1bdd51a to
7afa62f
Compare
|
Merged via squash.
|
Observe the same reduced-motion style endpoint after its asynchronous reveal settles. Preserve the reveal-delay bounds, content checks, exact CSS values and existing timeout; no UI or animation behavior changes. Related: openclaw#143776.
Clear a rejected source-catalog promise at its producer and preserve the original failure. Later locale requests can load corrected source while successful sharing and generation fencing stay intact. Related: openclaw#143376.
Related: #143376
What Problem This Solves
A failed locale source-catalog import stays cached. If it fails before its source files are watched, correcting the source and requesting the locale module again still returns the old error until an unrelated watched-file change clears the cache.
Why This Change Was Made
Clear a rejected source promise once at its producer and rethrow the original error. A later request can then load corrected source. Successful imports still share one promise, and an obsolete generation only clears its own cache. Partition caching and watcher behavior stay unchanged.
The repair adds four production lines and extends an existing regression table with one case.
User Impact
Locale module requests can recover after source corrections without an unrelated file edit. The original failure still reaches the caller; the change adds no automatic retry loop or fallback catalog.
Evidence
The real-plugin fixture uses synthetic catalog input, middleware mode, and no network listener. A paired callback control confirmed that its initial missing source watches came from the fixture’s outer TypeScript loader; removing that loader restored source watches without a product change. Full default ui:dev/HMR behavior remains outside this proof.