Commit Graph
1051 Commits
Author SHA1 Message Date
Nathan Vasse 3f439a66ad (frontend) update wopi e2e tests for new-tab flow
Follow the WOPI-in-new-tab change: the double-click scenario now
asserts that a new page opens with the office iframe and that the
preview modal stays closed, a new test covers the "Open in editor"
placeholder reached by keyboard navigating onto a WOPI file, and the
copy/paste scenario drives the detached wopiPage. Refresh canvas
snapshots accordingly and drop the obsolete per-spec snapshot copies.
2026-04-20 15:01:33 +02:00
Nathan Vasse 42c34036e4 (frontend) open WOPI files in a new tab
WOPI editors (OnlyOffice / Collabora) work better as a full-page
experience than embedded inside the preview modal. Double-clicking a
WOPI file in the grid or activating one from the search modal now
opens /wopi/:id in a new tab. The preview modal still shows an
"Open in editor" placeholder when a user navigates onto a WOPI file
via keyboard, so the preview flow stays consistent.

The former WopiEditor component is renamed WopiEditorFrame and
hosted on the new page. The inline rename-sync path is removed
because the editor no longer lives inside the items list.
2026-04-20 15:01:33 +02:00
Nathan Vasse f90c5c8b3a 💄(frontend) localize image viewer loading label
The loading spinner label was hardcoded in French. Use the translated
file_preview.image.loading key so other locales render correctly.
2026-04-20 15:01:33 +02:00
Nathan Vasse d3c522058e 🌐(frontend) add wopi open in editor and image loading translations
Add the en/fr/nl entries needed by the upcoming WOPI "open in editor"
placeholder and the image viewer loading label.
2026-04-20 15:01:33 +02:00
Nathan Vasse c288414827 🐛(frontend) clear pdf sidebar timeout on unmount
The effect that toggles the pdf-sidebar class scheduled a setTimeout
without returning a cleanup, so the timer could fire after the file
preview unmounted. Capture the timeout id and clear it on cleanup.
2026-04-20 15:01:33 +02:00
Nathan Vasse 3670cefb30 ♻️(frontend) rename ProgressBar to DurationBar in preview
The component lives in DurationBar.tsx but was exported as ProgressBar,
which was confusing. Rename the export and update the two call sites
in AudioPlayer and VideoPlayer.
2026-04-20 15:01:33 +02:00
Nathan Vasse 30cfcc7f46 📝(doc) update changelog
Add entry about the file preview v2 iteration.
2026-04-20 15:01:33 +02:00
Nathan Vasse 48ea4c0533 (frontend) add unsupported file preview e2e tests
Cover the fallback viewer that kicks in for file types the app
cannot render inline. A minimal .bin fixture exercises the redesign
so the filename, the "Unsupported format." disclaimer and the
secondary download button are all checked end to end.
2026-04-20 15:01:33 +02:00
Nathan Vasse b203aa17de (frontend) add video preview e2e tests
Cover the video viewer with a dedicated spec that uploads a small
mp4 fixture, opens the preview and exercises the player controls.
Keeps the new viewer types consistently covered alongside the audio
and image specs.
2026-04-20 15:01:32 +02:00
Nathan Vasse 07ca57c79b (frontend) add image preview e2e tests
Cover the image viewer with a dedicated spec that uploads a small
png fixture, opens the preview and asserts the image renders and
reacts to the viewer controls. Mirrors the audio/video specs so
each viewer has its own file.
2026-04-20 15:01:32 +02:00
Nathan Vasse 43cb816e5d (frontend) add audio preview e2e tests
Cover the audio viewer with a dedicated spec that uploads a small
mp3 fixture, opens the preview and checks the playback controls.
Ensures the audio branch of the preview rewrite stays covered as we
iterate on the other viewers.
2026-04-20 15:01:32 +02:00
Nathan Vasse a49f4b5dac ♻️(frontend) regroup preview e2e specs under file-preview/
The preview-related specs are now numerous enough to warrant their
own subfolder. Move pdf, heic and preview-actions specs into
__tests__/app-drive/file-preview/ so future preview tests land next
to them rather than at the drive-level root. Import and asset paths
are adjusted to the new depth, the heic row lookup is simplified to
getByRole("cell", ...), and the preview-actions spec gains a small
File Preview Header describe block to exercise the header controls.
2026-04-20 15:01:32 +02:00
Nathan Vasse 6b0ff1a0d1 🐛(frontend) fix className filter in file preview
The predicate in the preview close branch was (className) =>
className !== className, which compared the lambda parameter to
itself and therefore never matched, leaving stale class names on the
preview when the PDF thumbnail sidebar was closed. Rename the inner
parameter so the filter compares against the outer className as
intended.
2026-04-20 15:01:32 +02:00
Nathan Vasse ab0d1897a7 💄(frontend) redesign unsupported file preview
The preview for files that cannot be rendered inline now shows the
filename as the title and folds the "unsupported format" notice into
the description paragraph as a bold disclaimer, so the panel reads as
"<filename> — Unsupported format. Download it to view." The download
CTA is promoted to a secondary neutral button to stand out on the
empty-state panel.

The i18n key file_preview.unsupported.title is renamed to disclaimer
in en/fr/nl and the copy shortened accordingly. search.spec.ts
assertions are updated to match the filename via getByRole("heading")
now that the preview wraps the title in a heading element.
2026-04-20 15:01:32 +02:00
Nathan Vasse bceb4aee21 🐛(frontend) fix pdf preview e2e selectors
The preview refactor renamed CSS classes from
pdf-preview__controls / pdf-preview__zoom-controls
to file-preview__controls / file-preview__controls__zoom.
Update the e2e tests to match.
2026-04-20 15:01:32 +02:00
Nathan Vasse 0c84b4683f (frontend) add e2e test for file preview actions
Cover the download/print actions dropdown, keyboard
navigation between files, and the close button in the
new preview chrome.
2026-04-20 15:01:32 +02:00
Nathan Vasse 511ca27b30 ♻️(frontend) rewrite preview viewers and FilesPreview
Reorganize all viewer components under a viewers/ directory
and rewrite FilesPreview as the single orchestrator at the
preview root. Add ZoomControls shared component for image
and PDF viewers. The new layout centralizes the preview
chrome (header, controls bar, navigation) in FilesPreview
while each viewer only handles its own rendering.
2026-04-20 15:01:32 +02:00
Nathan Vasse a776dbd059 🌐(frontend) add download and print translations
These labels are used by the new preview actions dropdown
menu across English, French and Dutch.
2026-04-20 15:01:32 +02:00
Nathan Vasse 9611dfed35 ♻️(frontend) refactor shared preview controls
Rename PreviewControls to PlayerPreviewControls and swap
material icons for ui-kit SVG icons. Move arrow-key seeking
from global keydown to the DurationBar input so it only
activates when the slider is focused, and add a focus-visible
outline for accessibility. Simplify VolumeBar styling by
removing unused btn-mute overrides.
2026-04-20 15:01:32 +02:00
Nathan Panchout 4c6e89611e (front) add e2e tests for upload cancellation on deletion
Test two scenarios: deleting the current folder cancels
its uploads, and deleting one folder does not cancel
uploads targeting a different folder.
2026-04-20 14:43:03 +02:00
Nathan Panchout 7550490767 (front) cancel active uploads when parent folder is deleted
Track each uploading file's drop target folder via a Map.
When a folder is deleted, selectively cancel only the
uploads that were dropped into that folder, leaving other
uploads unaffected.
2026-04-20 14:43:03 +02:00
Nathan Panchout e79c3d1f63 🐛(front) set size and variant on trash navigate modal
A gap had been created because the modal type
was missing.
2026-04-20 14:23:48 +02:00
Nathan Panchout 8bd256a3a8 🐛(front) fix horizontal overflow in search modal inputs and bump ui-kit
Add overflow-x: auto on the search modal inputs container to prevent
layout breakage when filters exceed available width, and upgrade
@gouvfr-lasuite/ui-kit from 0.20.0 to 0.20.1.
2026-04-20 13:58:30 +02:00
Nathan Panchout 52d5ab22b4 🐛(front) show actual selection count in hard delete modal
The trash hard delete confirmation modal always displayed "2 items"
regardless of how many items were selected, because it received a
boolean `multiple` prop and hardcoded `count: 2` for the i18n
interpolation. Replace the boolean with the real selection length so
the plural message reflects the actual count.
2026-04-16 16:04:15 +02:00
Nathan Panchout 37c650fdd3 ♻️(front) replace action menu icons with ui-kit components
Swap SVG imports and material-icons spans for
dedicated ui-kit icon components (Shared, Download,
Copy, Star, Edit, ArrowRight, Info, Trash, etc).
Add dropdown menu icon sizing style.
2026-04-16 15:06:42 +02:00
Nathan Panchout 631252760d (front) add e2e tests for mobile actions menu
Test that My Files shows the more menu with create
folder and import options on mobile viewport.
Test that the more menu button is visible inside
a folder on mobile viewport.
2026-04-16 14:43:36 +02:00
Nathan Panchout 0cc97d65c3 🐛(front) add actions menu on mobile My Files page
The more_vert button was only shown inside folders
on mobile. This adds a dropdown with create folder
and import options on the My Files default route.
Also adds includeCreate option to useCreateMenuItems
to allow excluding document creation items.
2026-04-16 14:43:36 +02:00
Nathan Panchout 51552ac482 🐛(frontend) fix SonarCloud issues on drop traversal
Use String.localeCompare in three test sort() calls to satisfy
the reliability rule S2871, and drop the redundant Event branch
of the Event | unknown parameter type in customGetFilesFromEvent
(S6571).
2026-04-16 14:21:33 +02:00
Nathan Panchout 9f142ab59d (frontend) add unit tests for drop traversal utility
Cover the custom drop traversal helpers: empty-folder marker
creation, batched readEntries() loop, recursive entry walking
for files, nested non-empty folders, and empty directories, plus
the customGetFilesFromEvent entry point for drop events and its
delegation to file-selector for non-drag inputs.
2026-04-16 14:21:33 +02:00
Nathan Panchout 3b58ffd36b (frontend) preserve empty folders on drag & drop upload
React-dropzone's default traversal silently drops empty directories
because webkitGetAsEntry()'s readEntries() yields no entry for them.

Add a custom getFilesFromEvent that walks the drop tree ourselves
and emits a zero-byte marker file for every empty folder. The marker
carries an isEmptyFolder flag and a path so useUpload can materialize
the folder chain via getFolderByPath, then skip the marker before any
size validation or backend upload.

When a drop contains only empty-folder markers, the file upload toast
is suppressed and a dedicated success toast is shown once the folders
have been created. Input change events (folder/file buttons) are
delegated to file-selector, matching the Google Drive / Proton Drive
limitation around <input webkitdirectory>.
2026-04-16 14:21:29 +02:00
Nathan Vasse 832725d217 ⬆️(dependencies) pin pillow to v12.2.0 [SECURITY]
Pillow 12.1.1 is vulnerable to CVE-2026-40192 (FITS GZIP decompression
bomb). easy_thumbnails pulls pillow transitively with no upper bound,
so enforce the floor via a uv constraint rather than a direct
dependency bump.
2026-04-14 16:10:12 +02:00
Samuel Paccoud - DINUMandManuel Raynaud 18ad3ac5ff 🔧(helm) configure a daily cron job to purge deleted items
Run the cronjob at 0:45AM everyday.
2026-04-10 12:32:47 +02:00
Samuel Paccoud - DINUMandManuel Raynaud ea811ca269 (commands) add command to purge deleted items
This command loops over long deleted and hard deleted
items to purge them from storage and database.
2026-04-10 12:32:47 +02:00
Samuel Paccoud - DINUMandManuel Raynaud 573499efc4 (backend) allow purging items after trashbin cutoff and grace period
An item is considered hard deleted in two cases:
- hard deletion was forced by the user while sitting in the trashbin
- the item was only soft deleted but the trashbin retention period
  has expired

Thus, a hard deleted item still exists in database with an associated
file in S3. What the asynchronous task is doing is another action:
permanently removing the item from database and its associated file
from S3. I propose to rename this action "purge".

We refactor the task to improve its resilience:
- don't recursively generate asynchronous tasks. We are already
  outside of a request cycle so we don't need to spawn new
  asynchronous tasks.
- purge the subtree from the bottom to the top: leaves first,
  root last.
- fail fast if something goes wrong and make sure the task will
  continue when we retry it.
2026-04-10 12:32:46 +02:00
Nathan Panchout 8029d4f91d (front) rewrite upload e2e tests for new toast behavior
Cover success, file-too-large errors, mixed uploads, cancel individual file,
cancel all via confirmation modal, toggle file list, and hover cancel overlay.
2026-04-10 10:28:36 +02:00
Nathan Panchout 399c1a7d16 (front) enhance upload toast with progress, errors and cancel support
- Add per-file status tracking (uploading/done/error/cancelled)
- Show error details inline with tooltips for failed uploads
- Display overall progress percentage during upload
- Add cancel overlay on hover for individual files
- Add confirmation modal when cancelling all uploads
- Handle too-large files as inline errors instead of separate toasts
- Add translations for error messages and cancel modal (en/fr/nl)
2026-04-10 10:28:36 +02:00
Nathan Panchout 6c8e399262 (front) add ErrorIcon component and support numeric icon sizes
Add a reusable ErrorIcon SVG component and allow IconSvg to accept
a raw numeric size in addition to named IconSize values.
2026-04-10 09:55:54 +02:00
Nathan Panchout bdb5fcdad3 (front) make file upload abortable in driver layer
Refactor createFile to return { promise, abort } instead of a plain Promise,
enabling individual upload cancellation from the UI.
2026-04-10 09:55:54 +02:00
Manuel Raynaud 504b58f2a5 🔖(minor) bump release version 0.16.0
Added

- (frontend) add PDF viewer with thumbnail sidebar, zoom and page navigation
- (frontend) integrate PDF viewer into file preview modal
- 📝(doc) add local network setup documentation
- (global) add custom columns feature with configurable grid columns
- 🔒️(frontend) prevent search engine indexing
- (backend) allow ordering items by creator full name
- (frontend) add item duplication with polling and visual feedback
- (ci) shard e2e tests and cache playwright browsers
- ⬆️(frontend) upgrade cunningham-react and ui-kit to 0.20.0
- (frontend) improve custom columns with sortable config and i18n

Changed

- 🏷️(sdk) update Item interface by adding url_permalink
- 🔧(backend) allow extra CSRF origins via env variable
- 🔧(nginx) serve .mjs files with correct MIME type

Fixed

- 🐛(backend) fix hard delete of files created by other users
- 🐛(backend) handle race condition on concurrent LinkTrace creation
- 🐛(frontend) fix React SVG attributes in AddFolderButton
- 🔧(scalingo) compile translation files at deploy time
- 🐛(frontend) fix trash items not refreshing after hard delete
- 🐛(frontend) show modal when clicking files in trash
- 🐛(frontend) fix toasts appearing above modals
v0.16.0-preprod v0.16.0
2026-04-09 11:49:27 +02:00
Nathan Vasse 884116b696 (frontend) add v0.16.0 release note
Introduce the 0.16.0 release note highlighting customizable columns,
column sorting, document duplication and the new built-in PDF viewer,
with translations for en, fr and nl.
2026-04-09 11:22:02 +02:00
Nathan Vasse 0b600a145d ♻️(frontend) make release note step icons optional
Some release notes do not need step icons. Allowing icon and
activeIcon to be undefined lets versions opt out without providing
placeholder values.
2026-04-09 10:59:07 +02:00
renovate[bot]andGitHub d4a83b6f02 ⬆️(dependencies) update django to v5.2.13 [SECURITY] 2026-04-09 08:12:21 +00:00
Nathan Vasse 768f616859 🔒️(ci) restrict drive-frontend workflow token to contents:read
CodeQL flagged the workflow for running with default GITHUB_TOKEN
permissions. None of the jobs need write scopes, so pin to the
minimum to contain blast radius if a third-party action is
compromised.
2026-04-08 17:27:58 +02:00
Nathan Vasse bdfade5d10 ️(ci) prebuild drive frontend and serve via nginx for e2e
Replace the per-shard \`yarn dev\` with a single static build
job whose output is shared as an artifact and served by stock
nginx using the production vhost. Cuts e2e startup cost and
exercises the same bundle we ship.
2026-04-08 16:58:27 +02:00
Nathan Vasse 49e0ec6402 (frontend) use a valid uuid for the 404 preview test
The static export router only matches valid uuid patterns, so
"not_a_uuid" never reaches the preview page. Use a well-formed
but non-existent uuid to actually exercise the 404 path.
2026-04-08 16:58:26 +02:00
Nathan Vasse e1321079fd ♻️(frontend) gate PostHog dev behavior on explicit env flag
NODE_ENV no longer reliably signals a test/dev runtime once the
e2e build is produced as a production static export. Switch to
NEXT_PUBLIC_POSTHOG_TEST_MODE so we can opt in explicitly when
running under Playwright.
2026-04-08 16:58:26 +02:00
Nathan Vasse d194b51312 ️(ci) cache Playwright browsers by version
Key the Playwright browser cache by the installed @playwright/test
version instead of yarn.lock so cache hits actually match the binaries
Playwright expects, avoiding redundant browser downloads on every CI
run. On cache hit we still install system deps to keep headless runs
working.
2026-04-08 14:37:53 +02:00
Nathan PanchoutandManuel Raynaud c72bdefaaa (frontend) update e2e for item duplication with state interception
Added interception for list endpoints in the duplicate item e2e tests to
override the state of duplicated items, ensuring accurate testing of
upload states during the duplication process.
2026-04-08 13:57:33 +02:00
Nathan PanchoutandManuel Raynaud 29da771258 (compose) add dynamic PostgreSQL environment configuration
Added a new environment variable reference for PostgreSQL configuration
in the compose file to support dynamic environment overrides.
2026-04-08 13:57:33 +02:00
Manuel Raynaud b6275a4278 (backend) prefix duplicated item with Copy of
We want to prefix a duplicated item with the string Copy of.
2026-04-08 13:57:33 +02:00