Files
xamxam/TODO.md
Pontoporeia da153fc604 Refactor HTMX fragment architecture: DRY split into auth endpoints + shared templates
- Created templates/partials/form/_licence.php (shared HTML, no auth logic)
- Created templates/partials/form/_format-website.php (shared HTML, no auth logic)
- Created src/FragmentRenderer.php helper for clean fragment rendering
- Created public/{admin,partage}/fragments/ subdirectories
- Created thin fragment endpoint files: auth guard + data fetch + render template
- Updated all hx-post references in templates to new fragments/ paths
- Updated partage/index.php routing for new fragments subdirectory
- Kept old fragment files as thin delegates for backward compat
- Updated nginx config: added PHP handler in /partage/ location block
2026-05-19 00:08:06 +02:00

52 lines
3.4 KiB
Markdown

# Current tasks
- [x] Mandatory auto-generated passwords on share links (no custom passwords, regenerate-only in edit, rate limit on password gate)
- [x] .gitignore / .ignore: exclude *.db-wal and *.db-shm
- [x] CSS: FilePond pool file block border yellow → green on upload complete
- [x] Move shared fichiers-fragment.php from partage/ to templates/partials/form/ and update all links
- [x] Remove Écriture and Image format types (migration 035 + schema seed + query filter)
- [x] FilePond image previews: use site light colors (--bg-secondary, --text-secondary, --accent-green, --error)
- [x] Edit mode: remove custom file preview list above FilePond pools; use FilePond pools for preexisting files
- [x] Cover + note_intention: add data-existing-files to their FilePond inputs (per-queue-type JSON arrays)
- [x] Remove upload-progress bar at bottom (FilePond handles its own progress)
- [x] Remove upload-progress.js from edit/add/partage page extraJs arrays
# FilePond Refactor — Merge video/audio into TFE pool
- [x] A. `fichiers-fragment.php` — Remove separate video/audio pools, merge into TFE; include PeerTube in data-existing-files
- [x] B. `file-upload-filepond.js` — Remove peertube_video/peertube_audio/video/audio from QUEUE_CONFIG, remove acceptedFileTypesPeerTube, remove data-peertube-active logic
- [x] C. `process.php` — When queue_type=tfe and video/audio + PeerTube enabled, upload to PeerTube, return peertube:UUID
- [x] D. `load.php` — Handle peertube DB files: return placeholder SVG blob
- [x] E. `form.php` — Include PeerTube files in existingFilesJsonForTfe for edit mode
- [x] F. `ThesisEditController.php` — Remove separate video/audio/peertube_* handleFilePondQueueFiles calls; also legacy $_FILES path
- [x] G. `ThesisCreateController.php` — Same as F
# HTMX Fragment Architecture Reorganization
- [x] Create shared templates `_licence.php` and `_format-website.php` in `templates/partials/form/`
- [x] Create `src/FragmentRenderer.php` helper
- [x] Create `public/admin/fragments/` and `public/partage/fragments/` subdirectories
- [x] Create thin fragment endpoint files (auth + data prep + render shared template)
- [x] Update all hx-post references in templates to point to new `fragments/` paths
- [x] Update `partage/index.php` routing for new fragments
- [x] Keep old fragment files as thin delegates to new `fragments/` for backward compat
- [x] Update nginx config for partage fragment PHP handling
- [ ] Deploy: `just deploy` + `just deploy-nginx`
## Previous items
- [x] Step 1 — Build 4 PHP endpoints (process.php, revert.php, load.php, remove.php)
- [x] Step 2 — Update ThesisFileHandler to accept file_ids instead of $_FILES
- [x] Step 3 — Update file-upload-filepond.js (async server model + all fixes)
- [x] Step 4 — Update templates (data-queue-type on all inputs, data-existing-files in edit)
- [x] Step 5 — Update upload-progress.js (new collectFileNames, pending-uploads guard)
- [ ] Step 6 — QA / integration testing
- [ ] Step 7 — Cleanup: remove transition flags, remove INPUT_ID_TO_TYPE
# CSP & Deploy Fixes (May 2026)
- [x] Track vendor JS files in jj (they were moved to vendor/ but never `jj file track`ed)
- [x] Add `script-src 'self' 'unsafe-inline'` to main CSP header (public pages use inline scripts + onclick handlers)
- [x] Add `storage/tmp/filepond/*` to .gitignore + rsync exclude, with .gitkeep
- [ ] Deploy: `just deploy` to sync vendor JS files + updated CSP + .gitkeep to server