Skip to content

v1.5.3 - Cable Schedule i18n, Tooltip & Telemetry Fixes

Choose a tag to compare

@spyshow spyshow released this 03 Oct 14:10
· 13 commits to master since this release

QA pass over the v1.5.2 cable-schedule rework found and fixed five issues. All browser-verified: 12/12 checks, 0 console errors, health score 92 → 100 on measured categories.

Fixes

i18n regression (high). The building-card subtitle called t('common.buildingLoads') — a key that does not exist. Because I18nProvider only falls back when i18n.exists() fails, a hardcoded English building loads fragment rendered in every locale:

de: 3 Etagen · 0 Techniketagen · 0 Wohnungen / Einheiten · 0 building loads
ar: 3 عدد الطوابق · 0 طوابق الخدمات · 0 شقق · 0 building loads

In Arabic this was worse than wrong text: the Latin fragment rendered LTR inside an RTL line, landing on the wrong side of the sentence. Repointed at cableSchedule.buildingLoads; now renders Gebäudelasten / أحمال المبنى / Carichi Edificio.

Column tooltip (medium). title={t('cableSchedule.load', 'Circuit & Tag identifier')} — the key exists and resolves to Load, so the fallback was silently discarded and the header advertised a different column. Now a literal, matching its 13 siblings.

10 orphaned i18n keys removed from all four locales, left behind when the Full Width and Phase Details toggles were deleted in 6bd935b. Verified unreferenced and unreachable by dynamic key construction.

Dev hygiene. Strict-Transport-Security (2-year preload) and CSP upgrade-insecure-requests were served in development, so Chrome attempted HTTPS navigations against the HTTP dev server — four ERR_CONNECTION_RESET console errors on every /login load. Both are now production-only.

Privacy. Clarity telemetry was running against local dev. layout.tsx carried a second, duplicated inline script with the project ID hardcoded, bypassing NEXT_PUBLIC_CLARITY_PROJECT_ID entirely — so no local configuration could disable it. layout.tsx now renders the existing ClarityAnalytics component, making the component the single source of truth and the env var authoritative. Local telemetry requests went 6 → 0.

Tests

Added src/i18n/locales.regression-1.test.ts (6 tests) pinning the i18n keys these fixes depend on and asserting the two touched pages reference only resolvable keys. Proven non-vacuous: reintroducing the bad key fails the suite with expected [ 'common.buildingLoads' ] to deeply equal [].

A repo-wide "every key resolves" check was deliberately not added — 73 keys are already missing across 960 t() call sites as pre-existing debt, so such a test would ship red. The new test scopes to the two affected pages with an explicit allowlist that should shrink.

Verification

  • tsc --noEmit clean
  • eslint 0 errors (4 pre-existing unused-var warnings in cable-schedule)
  • vitest 795 passed across 68 files
  • next build succeeds

Also confirmed working

Sticky first column (pinned through horizontal scroll), no page overflow at 375/768/1280/1920, per-phase L1/L2/L3/Neutral columns correctly removed, MethodSelector unclipped at 375px, Load-library tab label localized in all four languages, RTL mirroring.

Not covered

No accessibility audit (axe/Lighthouse not run) and no performance measurement. The cable-schedule editing flows — inline size/method/insulation edits, Recalculate All, Apply-to-database, Default Settings — were not exercised; the diff touched the table shell, not the cell editors.