# Building and reconstructing the modified Web Configurator

## Source supplied

The archival Web Configurator `2.1.0` browser distribution and its production source maps are stored in:

```text
upstream-web-configurator/distribution/
```

The maps embed the original Vue/TypeScript application source. A normalized extraction is already present in:

```text
upstream-web-configurator/source-map-extracted/
```

Re-run the extraction with:

```bash
node build-tools/extract-upstream-source-maps.cjs       upstream-web-configurator/distribution/assets/js       upstream-web-configurator/source-map-extracted
```

`modified-web-configurator/src/` is produced by copying the recovered upstream `src/` tree and applying the Unfolded.Tools overlay from `src/`.

## Original upstream build files not present

The supplied official archive does not contain the original:

- package manifest and package-manager lockfile;
- Vite and TypeScript configuration;
- JSON translation source files;
- type-only modules removed from the JavaScript bundle;
- global `src/assets/main.scss` source.

The exact compiled global CSS is preserved as `modified-web-configurator/src/assets/main.compiled-reference.css`. It is a reference artifact, not a claim that the original SCSS has been reconstructed.

Because those build inputs are absent, do not claim byte-for-byte reproducibility from this disclosure tree alone. The publication instead provides the archival official object code after publication sanitization, its source maps, the source embedded by those maps, all readable Unfolded.Tools modifications and the deployment preparation tools.

## Simulator integration procedure

1. Start with the recovered source in `modified-web-configurator/src/`, or an exact upstream `2.1.0` repository checkout if one becomes available.
2. Apply the standalone overlay from `src/` over the upstream `src/` directory.
3. Add the files from `public/` to the Web Configurator's public/build-input directory.
4. Preserve the `__UCVR_SESSION_BASE__` placeholders in the supplied `public/index.html` during deployment preparation.
5. Set the build metadata to `2.1.0-unfoldedtools.1`, developer `Unfolded.Tools`, and license `GPL-3.0-only`.
6. Build using the upstream release's package manifest, lockfile and Vite configuration when available.
7. Copy the generated distribution into `remote-simulator/web-configurator/`.
8. Run:

```bash
node remote-simulator/tools/validate-licensing.cjs
node --check app4.cjs
node --check remote-simulator/web-configurator/assets/unfolded-simulator-bootstrap.js
```

## Deployment-specific preparation

The Unfolded.Tools backend resolves `__UCVR_SESSION_BASE__` at request time and serves the configurator through:

```text
/remote-simulator/core/:token/configurator/
```

Settings → About must retain links to the legal overview, licenses, published source and modification notice.

## Material Symbols post-processing

The deployed build intentionally contains no Font Awesome font files or Font Awesome runtime stylesheet. During deployment preparation:

1. Remove Font Awesome font directories and Font Awesome-specific CSS rules from the compiled stylesheet.
2. Copy the existing local `material-symbols-sharp.woff2` asset into `fonts/material-symbols/`.
3. Load `assets/material-symbols-compat.css` after the main compiled stylesheet.
4. Keep the legacy icon identifiers in compiled Vue templates; the compatibility stylesheet maps them to Material Symbols ligatures.
5. Validate or regenerate the checked-in compatibility CSS with `python build-tools/generate-material-symbols-map.py`. The tool verifies all 3,298 mappings against the local font and rejects the former generic `category` fallback.
5. Verify that Thin, Light, Regular and Solid resolve to `wght` 100, 300, 400 and 400 respectively, with `FILL=1` only for Solid.
6. Run `node remote-simulator/tools/validate-licensing.cjs`.

## Deployed build comparison

After deployment, `/remote-simulator/licensing/diff` compares `remote-simulator/web-configurator/` with `upstream-web-configurator/distribution/`. The page reports identical, modified, deployed-only and source-only files and provides a bounded textual diff for suitable changed text files.
