chore: complete TypeScript migration cleanup
CI / lint (pull_request) Failing after 2s
CI / test (pull_request) Failing after 2s
CI / frontend (pull_request) Failing after 42s
CI / reuse (pull_request) Failing after 2s
CI / lint (push) Failing after 2s
CI / test (push) Failing after 1s
CI / frontend (push) Failing after 44s
CI / reuse (push) Failing after 2s
CI / lint (pull_request) Failing after 2s
CI / test (pull_request) Failing after 2s
CI / frontend (pull_request) Failing after 42s
CI / reuse (pull_request) Failing after 2s
CI / lint (push) Failing after 2s
CI / test (push) Failing after 1s
CI / frontend (push) Failing after 44s
CI / reuse (push) Failing after 2s
This commit was merged in pull request #22.
This commit is contained in:
@@ -8,7 +8,44 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
> **Scope**: `src/trx-client/trx-frontend/trx-frontend-http/`
|
||||
>
|
||||
> **Status**: Proposed
|
||||
> **Status**: Complete (2026-08-01)
|
||||
|
||||
## Implementation result
|
||||
|
||||
The migration was completed on `feat/typescript-frontend-migration`. The
|
||||
baseline and phased sections below are retained as the decision record; their
|
||||
descriptions of JavaScript files and classic loading refer to the pre-migration
|
||||
state.
|
||||
|
||||
Completion evidence:
|
||||
|
||||
- all first-party browser sources are strict `.ts` files, checked by separate
|
||||
DOM and Web Worker TypeScript projects with no JavaScript compatibility mode
|
||||
or suppression directives;
|
||||
- `bootstrap.ts` is the single first-party HTML entry and esbuild represents
|
||||
startup order, lazy feature imports, shared hashed chunks, and the worker in
|
||||
its module graph;
|
||||
- obsolete source and generated compatibility JavaScript was removed;
|
||||
- Rust generates rig, status, capability, decoder, and flattened frontend
|
||||
metadata contracts into `api/generated.ts`; runtime guards validate HTTP,
|
||||
SSE, WebSocket, and worker boundaries;
|
||||
- the generic embedded-asset handler serves a build-generated allowlist with
|
||||
constrained MIME types, compression, ETags, immutable caching, and no file
|
||||
system lookup;
|
||||
- intentional browser host namespaces and transitional lazy-feature properties
|
||||
are documented in `docs/frontend-architecture.md`;
|
||||
- CI uses locked npm dependencies, caches npm downloads rather than
|
||||
`node_modules`, runs strict type checking and linting, unit/DOM/worker tests,
|
||||
Chromium startup coverage, generated-output drift checks, and REUSE after
|
||||
generation;
|
||||
- Cargo continues to consume committed generated assets without invoking Node
|
||||
or requiring network access.
|
||||
|
||||
The final local gate ran `npm ci`, type checking, linting, 30 frontend tests,
|
||||
the Chromium smoke flow (startup, auth gate, audio controls, rig switching, map
|
||||
initialization, and navigation), generated-contract and bundle verification,
|
||||
workspace formatting, Clippy with warnings denied, all-target builds, workspace
|
||||
tests, and REUSE 3.3 validation.
|
||||
|
||||
## 1. Decision
|
||||
|
||||
@@ -20,7 +57,7 @@ the main safety benefits.
|
||||
The migration must be incremental. Every intermediate commit and pull request
|
||||
must leave the frontend buildable and usable.
|
||||
|
||||
## 2. Current State
|
||||
## 2. Baseline State
|
||||
|
||||
The frontend currently contains roughly 21,700 lines of first-party
|
||||
JavaScript. Its largest components include:
|
||||
|
||||
Reference in New Issue
Block a user