Commit graph

5 commits

Author SHA1 Message Date
Hüseyin Durna
ea75d12e21
fix(ui): localize core configuration labels and help (#137192)
Closes #137190

## What Problem This Solves

Fixes an issue where users selecting a non-English Control UI language would still see core Settings labels and help in English when matching translations were available.

## Why This Change Was Made

The shared hint resolver now uses active-locale copy and retains current Gateway text when a translation is missing. The existing source catalog includes core hint labels and help under path-, field-, and source-specific keys. Catalog value operations stay separate from core imports so ordinary Vite configuration loading works. Development reloads use a fresh loader namespace and watch imported source files. Check and locale-refresh inputs cover the catalog owner and core metadata producers.

## User Impact

Available core translations reach Settings forms and search. Direct and wildcard lookup, non-copy metadata, and dynamic plugin text retain their existing behavior. No generated locale data or settings changes ship in this PR.

## Evidence

Verified with production-built Control UI and an isolated real Gateway: Turkish label/help and Settings search fail on pinned main, then pass on the candidate. English restoration, missing translations, dynamic Telegram metadata, and refresh controls pass. Matching build-only Turkish fixtures establish the conditional translation. A same-process Vite reload replaces the source key and drops stale translated copy after the English source changes.

Focused UI, browser, hint-resolution, catalog, sync-plan, and CI-scope tests pass. The corrected scope selector passes all 253 tests across six scope suites, including the existing negative control for unrelated configuration defaults. Keyless locale verification, targeted lint, and workflow checks pass. Independent browser acceptance exercised the user flows; source/catalog properties have separate evidence. The two Playwright-driving server suites now explicitly use Node: their prior jsdom setup failures were reproduced, then all 125 unchanged browser tests passed. An ordered follow-up reproduced fake timers leaking from an earlier tool-stream test into composer setup; producer-owned cleanup then passed the same four selected tests without changing assertions or timeouts.

The scripts typecheck now includes the existing virtual-locale declaration, which is needed by the shared form helper’s translation import. The prior hosted UI shard passed, including composer. Full compiler validation runs in CI.

## Compatibility

Existing translation-memory fields and the generated locale format stay unchanged. The new catalog-values module moves existing readers and materialization logic. New core entries use the same generated format; missing entries fall back to current Gateway text until the existing locale publisher fills them. The full Gateway schema and hint metadata match the baseline. No runtime-state migration is needed.

Thanks @husodrn46 for the original implementation and reproduction.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-09-09 06:59:59 +05:30
Peter Steinberger
c70aee247e
refactor(scripts): migrate JavaScript tools to TypeScript (#121005)
* refactor(scripts): migrate JavaScript tools to TypeScript

* fix(ci): keep changed-scope preflight zero-install

* fix(ci): preserve zero-install script owners

* fix(ci): complete script migration follow-through

* fix(release): keep stable closeout zero-install

* fix(scripts): preserve standalone execution boundaries

* fix(scripts): repair standalone loader boundaries

* fix(scripts): normalize gateway observation ids

* fix(scripts): keep Docker packager standalone

* test(scripts): preserve rebase cleanup helpers

* test(sessions): use tracked temp directory
2026-08-09 07:21:35 -07:00
Peter Steinberger
566043eb54
feat(tooling): enforce noUncheckedIndexedAccess from the base tsconfig (NUIA endgame) (#105239)
* feat(tooling): enforce noUncheckedIndexedAccess from the base tsconfig

Completes #104600: the flag moves to tsconfig.json, the five per-lane
copies are removed, and test lanes carry one documented opt-out at their
shared parent (the ~4,400 fixture-indexing sites are a tracked
lane-by-lane follow-up). Any future lane inherits the flag by default.
Synthetic probes verify src rejects unchecked reads while test files
compile; all nine lane commands green.

* fix(memory-core): give the batch-call sort a defined element type

Type-aware lint analyzes test files under the base flag (its tsconfig
extends the root, not the test parent), so the widened call[0] made the
bare toSorted() fire require-array-sort-compare.
2026-07-12 10:57:26 +01:00
Peter Steinberger
e580275464
feat(tooling): enforce noUncheckedIndexedAccess in the scripts lane (NUIA phase 5) (#105180)
* feat(tooling): enforce noUncheckedIndexedAccess in the scripts lane

Burns down all 153 scripts-lane errors (bench aggregation, release
checks, i18n inventories, argv indexing) and flips the flag in
tsconfig.scripts.json. Direct-Node-executed release harness scripts use
local narrowing instead of workspace imports, which do not resolve
under plain node execution. Benchmark measured loops untouched.

* fix(scripts): import expect helpers via relative package sources

tsconfig path aliases resolve from cwd under tsx, so release wrapper
scripts running against old release target cwds could not resolve
@openclaw/normalization-core (not a linked root dependency). Relative
package-source imports match the established pattern on the adjacent
lines and are cwd-independent; old-target planning verified directly.
2026-07-12 10:17:00 +01:00
Peter Steinberger
2e2366b6d3
chore(tooling): typecheck scripts/** with a dedicated tsgo lane (#104348)
* feat(tooling): add tsgo typecheck lane for scripts/**

* fix(scripts): burn down scripts type debt surfaced by the new lane

Typing-only except bugs the lane surfaced: gh-read timeout race,
Discord Headers spread dropping entries, undefined allowedHeadBranches
match, plugin-boundary matchAll crash. Deletes retired config keys from
fixtures/benches (prompt snapshots regenerated, config dump only) and
the orphaned non-runnable sync-moonshot-docs script. Adds full-surface
.d.mts declarations for existing .mjs boundaries.
2026-07-11 02:31:17 -07:00