refactor(web): migrate to Bun and TypeScript with README screenshots

This commit is contained in:
Loki 2026-10-24 15:34:41 +02:00
parent 87372041dd
commit d6a9745df0
Signed by: boba
GPG key ID: 253067914055423B
28 changed files with 3152 additions and 386 deletions

42
docs/dependencies.md Normal file
View file

@ -0,0 +1,42 @@
# Tool and dependency audit
Checked on 24 October 2026 against the official Bun and TypeScript releases and npm registry package metadata.
| Tool/package | Selected | Latest | License | Scope |
| --- | --- | --- | --- | --- |
| Bun | 1.4.4 | 1.4.4 | MIT | Development runtime, bundler, formatter and test runner |
| `typescript` | 7.0.2 | 7.0.2 | Apache-2.0 | Strict project type checking and editor types |
| `@types/bun` | 1.4.4 | 1.4.4 | MIT | Bun development API definitions |
| `bun-types` | 1.4.4 | 1.4.4 | MIT | Transitive Bun definitions |
| `@types/node` | 26.6.5 | 26.6.5 | MIT | Transitive definitions for compatible system APIs |
| `@typescript/typescript-linux-x64` | 7.0.2 | 7.0.2 | Apache-2.0 | Native checker binary for the tested Linux x64 platform |
| `undici-types` | 8.9.0 | 8.12.3 globally; 8.9.0 within the parent's allowed range | MIT | Transitive fetch definitions |
The latest `@types/node` constrains `undici-types` to `~8.9.0`. The lock uses the newest compatible version; no override bypasses that upstream constraint. Other optional TypeScript platform binaries in the lock are pinned to the same 7.0.2 release and are installed only on matching platforms. None of these packages is imported into browser code or required by Nginx in production.
Bun was verified using the official Linux x64 release archive, SHA-256 `bf8ccbfb2b0b80159e0f9a6d15c55317add8077534dbc6130a3edb52fccb395c`. Project verification used a task-local copy of Bun 1.4.4; it did not change the workstation's global runtime.
## Sources
- [Official Bun 1.4.4 release](https://github.com/oven-sh/bun/releases/tag/bun-v1.4.4)
- [Official TypeScript 7.0.2 release](https://github.com/microsoft/TypeScript/releases/tag/v7.0.2)
- [Bun TypeScript documentation](https://bun.sh/docs/runtime/typescript)
- [Bun bundler documentation](https://bun.sh/docs/bundler)
- [TypeScript package metadata](https://registry.npmjs.org/typescript/latest)
- [Bun definitions metadata](https://registry.npmjs.org/@types/bun/latest)
- [Node definitions metadata and Undici range](https://registry.npmjs.org/@types/node/latest)
- [Undici definitions metadata](https://registry.npmjs.org/undici-types/latest)
## Reproduction
```sh
bun install --frozen-lockfile
bun outdated
bun pm ls --all
bun audit
bun run check
bun test
bun run build
```
The audit reported **no known vulnerabilities** across 25 checked lockfile packages. On Linux x64, six development packages were installed. `bun outdated` reported no outdated direct dependencies. The complete compatible resolution and integrity hashes are committed in `bun.lock`.

View file

@ -0,0 +1,9 @@
# Website screenshots
Captured on 24 October 2026 from `https://central.loki-code.dev` using a new anonymous Chromium context with Russian selected.
- `landing-desktop.png`: project landing page, 1440 × 1000.
- `account-desktop.png`: anonymous account / GitHub sign-in, 1440 × 1000.
- `landing-mobile.png`: landing page, 390 × 844.
No user logged in, no GitHub consent flow was started, and no private profiles, credentials or tokens are shown. These are actual website screenshots, not generated mockups. The labelled client illustration on the page remains illustrative; the native settings image embedded in the page is a real client screenshot.

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View file

@ -1,13 +1,16 @@
# Verification
Verified locally on 24 October 2026:
Verified locally on 24 October 2026 using pinned Bun 1.4.4 and TypeScript 7.0.2:
- `npm test`: 7 Node tests passed, including exact catalog parity, authentication request options, malformed-session checks, avatar-origin validation and encoded preview-path traversal.
- `npm run build`: static build completed; assets normalized to mode 0644, directories 0755.
- `node --check src/app.js`: JavaScript syntax check passed.
- `python3 tests/browser_qa.py`: passed with the workstation's existing Playwright and `/usr/bin/chromium`; no browser or dependency was installed by this project.
- `bun install --frozen-lockfile`: committed resolution accepted without changes.
- `bun run check`: strict TypeScript check passed for frontend, Bun scripts and tests.
- `bun test`: 8 Bun tests passed, including catalog parity, authentication request options, malformed Hub/session checks, avatar-origin validation and encoded preview-path traversal.
- `bun run build`: TypeScript browser bundle and static build completed; assets normalized to mode 0644, directories 0755. Source TypeScript and development dependencies are excluded from the release.
- `bun run format:check`: Bun's built-in formatter passed.
- `bun audit`: no known vulnerabilities across 25 checked lockfile packages; direct dependencies are current.
- `python3 tests/browser_qa.py`: passed against both the Bun development preview and the minified production `dist/` preview with the workstation's existing Playwright and `/usr/bin/chromium`; no browser dependency was installed by this project.
The optional browser script requires the loopback preview from `npm run dev` or `npm run preview`. It replaces API responses with test fixtures and refuses non-loopback origins. It checks:
The optional browser script requires the loopback preview from `bun run dev` or `bun run preview`. It replaces API responses with test fixtures and refuses non-loopback origins. It checks:
- Keyboard-operated illustration tabs and theme selection.
- Runtime RU/EN changes and layouts at 320, 390, 768 and 1440 pixels, including account views.
@ -16,7 +19,7 @@ The optional browser script requires the loopback preview from `npm run dev` or
- CSRF-header/Origin/POST sign-out and expired-session handling.
- Browser storage contains only the UI language; no account tokens are persisted.
Screenshots were visually inspected at `/tmp/vnox-web-qa/desktop-hero.png`, `mobile-full.png`, `account-login-mobile.png` and `account-profile-desktop.png`. Screenshot profile data is explicitly a browser fixture, absent from production assets.
Local QA screenshots were visually inspected in `/tmp/vnox-web-qa/`. Any authenticated profile in those temporary images is explicitly a browser fixture. The repository-hosted [README screenshots](screenshots/README.md) were captured separately from the live production site using a fresh anonymous context and contain no test profile or private data.
## Limits