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:
@@ -64,7 +64,7 @@ use crate::interfaces::api::handlers::file_handler::{
|
||||
};
|
||||
#[allow(deprecated)]
|
||||
use crate::interfaces::api::handlers::folder_handler::{
|
||||
create_folder, delete_folder_with_trash, download_folder_zip, get_folder, list_folder_listing,
|
||||
create_folder, delete_folder_with_trash, download_folder_zip, get_folder,
|
||||
list_folder_resources, list_root_folders, list_root_folders_paginated, move_folder,
|
||||
rename_folder,
|
||||
};
|
||||
@@ -208,21 +208,13 @@ pub fn create_api_routes(app_state: &Arc<AppState>) -> Router<Arc<AppState>> {
|
||||
.route("/{id}/download", get(download_folder_zip))
|
||||
.with_state(app_state.clone());
|
||||
|
||||
// Combined listing endpoint: returns both sub-folders AND files in one
|
||||
// response. Needs full AppState because it calls both FolderService
|
||||
// and FileRetrievalService concurrently.
|
||||
let folder_listing_router = Router::new()
|
||||
.route("/{id}/listing", get(list_folder_listing))
|
||||
.with_state(app_state.clone());
|
||||
|
||||
// Create folder operations that use trash (requires full AppState)
|
||||
let folders_ops_router = Router::new().route("/{id}", delete(delete_folder_with_trash));
|
||||
|
||||
// Merge the routers
|
||||
let folders_router = folders_basic_router
|
||||
.merge(folders_ops_router)
|
||||
.merge(folder_zip_router)
|
||||
.merge(folder_listing_router);
|
||||
.merge(folder_zip_router);
|
||||
|
||||
// Create file routes for basic operations and trash-enabled delete
|
||||
let basic_file_router = Router::new()
|
||||
|
||||
Reference in New Issue
Block a user