feat: file browser + relink for orphaned files + htmx fix + header cleanup + fix relinked FilePond integration + resolve acces.php conflict markers

This commit is contained in:
Pontoporeia
2026-05-18 17:39:01 +02:00
parent 79eddf5d5a
commit 27e6abc7e4
10 changed files with 268 additions and 205866 deletions

12
TODO.md
View File

@@ -1,5 +1,9 @@
# Current tasks
## acces.php conflict marker cleanup
- [x] Remove 206k lines of nested jj conflict markers from acces.php (resolved from clean nzllwsxo base)
- [x] Restore missing features: create-result dialog, locked_year field, auto-generated password UI, file restrictions section, admin TOC wrapper
## Save fixes (files disappearing on edit/terminer)
- [x] Fix: note_intention deleted on save — handleFilePondSingleFile treats existing DB id as new upload, deletes existing, then can't re-process (integer vs hex mismatch)
- [x] Fix: cover removal now uses trash, same hex-vs-integer guard as note_intention
@@ -16,6 +20,8 @@
- [x] Frontend: modal with folder browser, triggered by a "Relier" button next to each FilePond pool
- [x] JS: integrate relink button into FilePond UI (XamxamOpenFileBrowser + XamxamRelinkFile)
- [x] CSS: .relink-modal + .file-browser styles in form.css
- [x] Fix: relinked file not appearing in FilePond pool — add file metadata to addFile() options and extensive diag logging
- [ ] Migration: rename existing theses/ directories to documents/ on disk and update DB paths
## Trash policy
- [x] FilePond remove moves to tmp/_trash (already implemented in handleRemove)
@@ -71,6 +77,12 @@
- [x] `partage/index.php`: fix fragment routing — `$slug` was `'fragments'` but check used `str_starts_with($slug, 'fragments/')`, causing HTMX fragments to redirect to / (main page)
- [x] Deploy: `just deploy` + `just deploy-nginx`
## File browser fixes
- [x] Fix: top-folder navigation regex doesn't match bare `documents`/`theses` (requires trailing slash)
- [x] Replace emoji icons (📁📄) with proper SVG icons (folder, pdf, file-archive, text-file)
- [x] Fix relink endpoint: always return JSON (even on errors), guard finfo class, add diagnostic logging
- [x] Fix JS relink error handler to parse JSON error responses
## Previous items
- [x] Step 1 — Build 4 PHP endpoints (process.php, revert.php, load.php, remove.php)