Commit Graph
890 Commits
Author SHA1 Message Date
Nathan Vasse ab9d4e462a 🔧(ci) allow env override in compose for e2e tests
Add an ENV_OVERRIDE variable so docker-compose can load an
extra env file (e.g. common.e2e) on top of common.local.
This lets the e2e runner enable WOPI_CLIENTS=collabora
without touching the default dev config.
2026-02-25 11:37:00 +01:00
Nathan Vasse a42e1a39c4 🔧(frontend) standardize playwright snapshot paths and viewport
Remove platform suffix from snapshot file names by setting a
custom snapshotPathTemplate. This makes snapshots portable
across CI and local environments. Also lock the default
viewport to 1280x720 for consistent visual comparisons.
2026-02-25 11:37:00 +01:00
Nathan Vasse 36b39a62a6 📝(doc) update changelog for clipboard wopi fix
Add the WOPI iframe clipboard fix entry under the
unreleased section.
2026-02-25 11:37:00 +01:00
Nathan Vasse 1b69ef334c (frontend) add wopi editor e2e test
Verify that a docx file opens in the Collabora editor,
the canvas renders correctly via visual regression, and
clipboard copy-paste works within the iframe. The iframe
clipboard policy now uses wildcards to allow cross-origin
clipboard access needed by Collabora.
2026-02-25 11:37:00 +01:00
Nathan Vasse 26c9eac0ac ♻️(frontend) extract shared e2e test utilities
Deduplicate file upload and clipboard permission logic
into reusable helpers. This avoids repeating the same
filechooser and grantPermissions boilerplate across
multiple test files.
2026-02-25 11:37:00 +01:00
Nathan Vasse c4977b8406 🐛(frontend) allow clipboard access in wopi editor iframe
The iframe permissions policy was blocking clipboard operations
in the WOPI editor, preventing users from using copy/paste.
2026-02-25 11:37:00 +01:00
Manuel Raynaud d9f806920a (backend) reject uploaded file higher than DATA_UPLOAD_MAX_MEMORY_SIZE
check in the upload_ended action if the file size is higher than
DATA_UPLOAD_MAX_MEMORY_SIZE and reject it if it's the case.
2026-02-25 10:52:19 +01:00
Manuel Raynaud 4bfff61878 (frontend) stop upload if file higher than DATA_UPLOAD_MAX_MEMORY_SIZE
We want to block the upload before it is started by checking if the file
size is higher than the exposed settings DATA_UPLOAD_MAX_MEMORY_SIZE
2026-02-25 10:52:19 +01:00
Manuel Raynaud 49f39d752f (backend) expose DATA_UPLOAD_MAX_MEMORY_SIZE in the config endpoint
We want to expose the DATA_UPLOAD_MAX_MEMORY_SIZE to the frontend
application in order to use it to check the file size that will be
uploaded.
2026-02-25 10:52:12 +01:00
Nathan Vasse e7139aacd0 📝(doc) update changelog
Based on the recent commits.
2026-02-24 17:39:00 +01:00
Nathan Vasse 4d09beebb2 🔧(conf) disable SupportsRename for Collabora
Collabora does not post messages when a file is renamed
so the frontend cannot reflect the change. Disabling
SupportsRename hides the rename option in the editor.
2026-02-24 17:38:37 +01:00
Nathan Vasse 3f8c7babd0 (backend) add per-client wopi options override
Setting WOPI_<CLIENT>_OPTIONS as a JSON env var to override
CheckFileInfo properties per client.
This is needed because Collabora does not send a
PostMessage on rename, so we disable SupportsRename
for it to hide the rename UI in the editor.
This feature could also be useful for any other uses as
as a open source feature.

Also cleans up leftover commented-out post_message_origin
code that was replaced by this approach.
2026-02-24 17:38:37 +01:00
Nathan Vasse e725c1424e ♻️(backend) store client name in wopi config cache
Add client inside the  WOPI discovery cache among the url.
It allows the possibility to grab the client name from the
CheckFileInfo in order to return customised parameters.
Especially needed for the renaming customization.
2026-02-24 17:38:37 +01:00
Nathan Vasse cbec813a94 (frontend) handle wopi file rename via PostMessage
OnlyOffice sends a File_Rename PostMessage when a file
is renamed in the editor. We listen for it and propagate
the new name through the component tree so the preview
and explorer update without a full refresh.
2026-02-24 17:38:37 +01:00
Nathan Vasse f2730e5edb (front) add e2e tests for posthog share events
Verify that copy link and redirect to parent folder
actions correctly emit posthog events. Introduce a
reusable posthog capture utility for e2e tests that
intercepts the config API and captures emitted events.
2026-02-24 17:13:36 +01:00
Nathan Vasse a7f09b5b19 📈(front) add posthog tracking to share modal
Track copy link and redirect to parent folder actions
in the share modal to measure sharing feature adoption.
Also tweak PostHog provider config for dev environment.
2026-02-24 17:13:36 +01:00
Nathan Vasse aaa5d9e39b 📈(backend) add posthog tracking to item actions
We want visibility on how users interact with items
(move, favorite, share access, invitations) to guide
product decisions. A posthog_capture utility centralizes
the settings guard and item metadata enrichment.
2026-02-24 17:13:36 +01:00
Nathan PanchoutandClaude Opus 4.6 42b24ca9f5 (e2e) add tests for right-click context menus
Cover background right-click (create menu) and item right-click
(action menu) with rename, delete and star flows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 16:48:39 +01:00
Nathan PanchoutandClaude Opus 4.6 6ed33a35ab (frontend) add right-click context menu on explorer
Add ContextMenuProvider in _app.tsx and integrate context menus:
- Right-click on explorer background shows create actions
  (folder, files, import)
- Right-click on grid items shows item actions
  (share, rename, move, etc.)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 16:48:15 +01:00
Nathan PanchoutandClaude Opus 4.6 b091482763 ♻️(frontend) extract useItemActionMenuItems hook from ItemActionDropdown
Move item action menu items (share, rename, move, download, delete,
favorite) and their modals into a shared useItemActionMenuItems hook,
enabling reuse for the upcoming context menu feature.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 16:48:15 +01:00
Nathan PanchoutandClaude Opus 4.6 8d5e00b1f4 ♻️(frontend) extract useCreateMenuItems hook from tree components
Move create folder/file menu items and modals into a shared
useCreateMenuItems hook, simplifying ExplorerTreeActions and
ExplorerTree by removing duplicated state and modal management.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 16:48:15 +01:00
Nathan PanchoutandClaude Opus 4.6 31454e2fd6 ⬆️(frontend) bump @gouvfr-lasuite/ui-kit to 0.19.9
Upgrade ui-kit to get ContextMenu and ContextMenuProvider components
needed for the right-click context menu feature.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 16:48:15 +01:00
Manuel Raynaud eb7da4fe9f (backend) expose a url_permalink property in the Item serializer
To not have to compute the download url, we decided to add a new
property url_permalink, this property will have the download action url
set in it when available.
2026-02-24 15:30:52 +01:00
Manuel Raynaud 4e5aefce27 (backend) add a download action returning the media url
The media url is subject to change if the file is renamed. If someone is
using it as a permalink, it will lose the ability to download the file.
We created a new download action, always returning a redirection to the
media url.
2026-02-24 15:30:51 +01:00
Manuel Raynaud d9a05cb948 🔧(helm) allow to configure more probes for every deployment
In the probes some parameters like periodSeconds or failureThreshold
were not configurable. We want allow their configuration
2026-02-24 08:52:25 +01:00
Nathan Vasse a9948b56a0 📝(doc) update changelog customization
Add entries for the previous commits about customization.
2026-02-23 16:35:07 +01:00
Nathan Vasse c89aa81d71 📝(doc) replace theming doc with customization guide
The new CSS and JS injection features needed documentation.
We merged the old theming doc into a broader customization
guide covering runtime CSS, JS injection, and footer config.
2026-02-23 16:35:07 +01:00
Nathan Vasse fc59720586 (front) add e2e tests for custom CSS and JS injection
Verify that <link> and <script> tags are injected in the
DOM when FRONTEND_CSS_URL and FRONTEND_JS_URL config values
are set, and absent when they are not.
2026-02-23 16:35:07 +01:00
Nathan Vasse abe4ca1dbb (front) inject custom CSS and JS from config
Use next/head to conditionally inject a <link> stylesheet
and an async <script> tag when the corresponding config
URLs are provided by the backend.
2026-02-23 16:35:07 +01:00
Nathan Vasse 898b3ffeb8 (backend) add FRONTEND_CSS_URL and FRONTEND_JS_URL settings
Allow runtime injection of custom CSS and JS assets via
environment variables. The config API endpoint exposes both
values so the frontend can use them to inject <link> and
<script> tags dynamically.
2026-02-23 16:35:07 +01:00
Manuel Raynaud c922102ed9 ♻️(backend) set item read only in the mirror item admin detail
There is no readon to change the item in the mirror item task in the
detail view. So we set it in the readonly_fields
2026-02-23 16:20:24 +01:00
Nathan Vasse 4866bcbb6a 📝(doc) update changelog for 401 redirect loop fix
Add entries to the changelog concerning the 401 redirect
loop.
2026-02-23 15:45:24 +01:00
Nathan Vasse c2dcff5445 (e2e) add test for 401 redirect and re-login flow
Ensures that when a user's session expires, they are
redirected to /401, can log back in, and are then sent
back to the page they were originally trying to access.
2026-02-23 15:44:26 +01:00
Nathan Vasse a78b017f06 🐛(backend) remove scheme from OIDC redirect allowed hosts
The OIDC_REDIRECT_ALLOWED_HOSTS setting expects host:port
values without the http:// scheme prefix. Including the
scheme caused redirect validation to fail silently.
2026-02-23 15:44:26 +01:00
Nathan Vasse 188d40687d 🐛(frontend) redirect to home after login on 401 page
The login button on the 401 page was redirecting back to /401
after authentication, causing an infinite redirect loop. We
now explicitly redirect to / so the home page can handle the
post-login navigation properly.
2026-02-23 15:44:26 +01:00
Nathan Vasse 3e0f6cf871 ♻️(frontend) extract useRedirectAfterLogin hook
The redirect-after-login logic was inlined in the home page.
Extracting it into a dedicated hook improves reusability and
keeps the page component focused on rendering.
2026-02-23 15:44:26 +01:00
Nathan Vasse 939a6e4d3e (backend) allow root item creation on the external API
The external API resource server needs to create items
at root level (not only as children). We enable the
"create" action on the items endpoint so that external
clients can upload files to the root.
2026-02-23 15:16:08 +01:00
Nathan Vasse 50c876affd (front) add e2e tests for create file from template
Test creating odt, ods and odp files both at root level and
inside a folder to ensure the full flow works end-to-end.
2026-02-23 14:57:55 +01:00
Nathan Vasse 488842ccc3 (front) add create file from template feature
Add a "New" dropdown with options to create text documents,
spreadsheets and presentations from ODF templates. A modal
lets users name the file before creation. Also register ODF
mimetypes so icons display correctly for these file types.
2026-02-23 14:57:55 +01:00
Nathan Vasse 45c91e729b (backend) add tests for create from template endpoint
Cover permission checks, valid/invalid extensions, missing title,
storage errors, duplicate title handling and correct mimetype
assignment for all three template types (odt, ods, odp).
2026-02-23 14:57:55 +01:00
Nathan Vasse 508534b0ed (backend) add create file from template endpoint
Allow creating files from template (odt, ods, odp) through the
existing children/create endpoints. An optional `extension` field
on CreateItemSerializer triggers template-based file creation
instead of requiring a file upload. This avoids a separate
endpoint and keeps the API surface minimal.
2026-02-23 14:57:55 +01:00
Nathan Vasse e4d06905e4 🐛(backend) fix WOPI PutFile to check stored file size
When a file is created from a template, it has content from the start.
The PutFile operation needs to check the stored file size rather than
the request content length to correctly handle lock-free updates.
This ensures the empty file check works correctly for template-created
files.
2026-02-23 14:57:55 +01:00
Stephan Meijer f43c8a49bd 👷(docker) add arm64 platform support for image builds
Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
2026-02-19 17:38:18 +01:00
Nathan Vasse a2a2e7b034 (e2e) handle leaf nodes gracefully in openTreeNode
When a tree node has no children, the expand arrow is absent.
Without this change, the test fails instead of silently
returning. The new failIfLeaf option lets callers choose
whether a leaf should throw. We had an issue with webkit that
was slower than the other navs failing to find the right arrow
after erasing all the starred items. The other navs should have
failed too on this, but were quicker to pick the right arrow
before it dissapears.
2026-02-19 15:53:10 +01:00
Nathan Vasse e032e6ed01 ♻️(e2e) remove unused createWorkspace helper
The function is no longer used in the e2e tests since
workspaces are replaced purely by folders.
2026-02-19 15:52:56 +01:00
Nathan Vasse d51bc758cb 🔧(e2e) retain trace on failure instead of first retry
This makes debugging easier by keeping the trace for every
failed test, not just the first retry attempt.
2026-02-19 11:59:46 +01:00
Nathan Vasse 7d37ec8eb5 📝(doc) update changelog for language sync feature
Update the changelog to include the last commits.
2026-02-19 11:59:46 +01:00
Nathan Vasse 1f9edce7fb (e2e) add language sync e2e tests
We verify that the useSyncUserLanguage hook correctly syncs
language in both directions: backend→frontend (user with a
language set gets the UI in that language) and
frontend→backend (new user with no language gets the browser
locale synced to the backend).
2026-02-19 11:59:46 +01:00
Nathan Vasse 35c6c191de (frontend) sync backend user language to browser on load
When the user already has a language set in the backend, we
now apply it to the browser on first load. This ensures the
frontend and WOPI editors use the same language as the one
stored in the user profile.
2026-02-19 10:44:39 +01:00
Nathan Vasse c3a88e89d8 🐛(front) remove WebKit skip from breadcrumbs test
The Playwright upgrade to 1.58.2 resolves the WebKit
hanging issue on page.goto(), so the skip and related
workaround comments are no longer needed.
2026-02-18 19:45:48 +01:00