chore(frontend): remove the legacy vanilla-JS frontend and its tooling

The SvelteKit app under /frontend has fully superseded the legacy
vanilla-JS/CSS frontend in /static, which was only ever served by a
debug `cargo run` / `PROFILE=dev` and never shipped to production.
Remove it together with the whole subsystem that existed only to
support it (~54k lines).

Frontend & assets:
- Delete /static (js/, css/, *.html, sw.js, basemaps/, locales symlink).
- Relocate the brand/PWA assets (logo/, favicon.ico, manifest.webmanifest)
  to frontend/static/ so they ship with the SPA. This also fixes the
  favicon, which app.html referenced but was missing from the prod bundle.
- Migrate the Nextcloud login-flow redirects from /nextcloud-error.html
  to the SvelteKit /nextcloud/error route.

Web layer:
- Simplify resolve_static_path: drop the PROFILE=dev branch; always prefer
  the Vite static-dist/ build, fall back to the configured path.
- Resolve i18n locales from the served SPA dir with a frontend/static
  fallback so `just dev` works without a prior build.

Build:
- Prune build.rs from 1262 to ~70 lines (git metadata only); the Rust asset
  pipeline and the OXICLOUD_RUST_ASSETS rollback flag are gone.
- Drop the now-unused build-dependencies (oxc_*, lightningcss).
- Remove the COPY static lines from the Dockerfile (cacher + builder).

Tooling & docs:
- Delete biome.json, jsconfig.json, tools/check-*.py, identifier.sh.
- Remove the legacy front-* justfile recipes; repoint the design-system
  scripts (locales, dead-tokens, brand-drift, token-docs) at the frontend,
  and drop check-contrast/check-headings (coupled to the old token
  taxonomy / multi-page HTML).
- Repoint docs/DESIGN-SYSTEM.md links; remove 5 superseded docs/plan/*.

Backend dead code:
- Remove the dead `folder_repo` field from FileBlobWriteRepository.
- Remove the deprecated GET /api/folders/{id}/listing endpoint
  (superseded by /resources).

Verified: cargo clippy (all-features/all-targets) clean, cargo test
--workspace 448 passed, cargo fmt clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
DioCrafts
2026-06-21 03:17:34 +02:00
parent 6be3c99580
commit 54639d466a
211 changed files with 171 additions and 53965 deletions
+8 -38
View File
@@ -100,36 +100,10 @@ db:
db-down:
docker compose down
# start OxiCloud with static assets in no-cache mode
front-dev:
PROFILE=dev cargo run
# front: check all (linter, format, type, icons, translations...)
front-check: front-fmt front-lint front-type front-rules front-check-icons front-check-i18n frontend-check
# kept for compatibility
# Frontend design-system / a11y guardrails (pure Node, no deps). The entry
# point the UI/UX workflow uses; delegates to `front-design`.
frontend-check: front-design
front-fmt:
biome format static/
front-lint:
biome lint static/
# test types (JSDOC), using typescript
front-type:
tsc -p jsconfig.json --noEmit
# check CSS rules
front-rules:
stylelint static/css/
front-check-icons:
tools/check-icons.py --check-only
front-check-i18n:
tools/check-missing-translations.py --check-only
# end-to-end Playwright tests
front-test:
cd tests/e2e && npm test
@@ -138,14 +112,11 @@ front-test:
front-test-update-snapshot:
cd tests/e2e && npm test -- --update-snapshots=all
# Frontend design-system / a11y guardrails — pure Node, no extra deps.
# Single gate: WCAG contrast, heading order, locale completeness, dead tokens,
# brand-mark drift.
# (Also run `stylelint static/css/**/*.css`, `biome check`, `tsc -p jsconfig.json
# --noEmit` once node_modules is installed — those need devDependencies.)
# Frontend design-system guardrails — pure Node, no extra deps, run against the
# SvelteKit frontend (frontend/). Locale completeness, dead-token report, and
# brand-mark drift. For the full svelte-check/eslint/stylelint/prettier gate use
# `just fe-check` (needs the frontend devDependencies installed).
front-design:
node scripts/check-contrast.mjs
node scripts/check-headings.mjs
node scripts/check-locales.mjs
node scripts/check-dead-tokens.mjs
node scripts/check-brand-drift.mjs
@@ -157,9 +128,8 @@ api-test:
bash tests/webdav/run.sh
# ---------------------------------------------------------------------------
# New SvelteKit frontend (frontend/). The original vanilla frontend (static/)
# and its `front-*` recipes remain until the Phase 5 cutover; these `fe-*`
# recipes drive the rewrite in the meantime.
# SvelteKit frontend (frontend/) — the only frontend. These `fe-*` recipes
# drive its dev server, build, lint and tests.
# ---------------------------------------------------------------------------
# install frontend dependencies