Commit Graph
2570 Commits
Author SHA1 Message Date
Anthony LC c72b0b180c fixup! 🌐(frontend) add Crowdin translator context 2026-10-06 15:08:32 +02:00
Anthony LC a7d9b00835 🌐(frontend) add Crowdin translator context
We add context for the translator Crowdin,
to do so, we added a context description on
the t function.

Closes #2438
2026-10-06 15:07:19 +02:00
Anthony LC 6e5dee38e9 🐛(frontend) cache hashed next static assets and revalidate html
Files under /_next/static/ carry a content hash in their name but were
served without Cache-Control, so browsers fell back to heuristic freshness
and revalidated each of the ~45 files of a page with a conditional request.
Serve them with a one-year immutable lifetime.

HTML pages, service-worker.js and public files keep a stable name: send
Cache-Control: no-cache so the browser revalidates them and always gets
the chunk list and service worker of the current release. The headers are
repeated in every location, as nginx drops the inherited add_header
directives as soon as a location defines its own.

Closes #2770

Signed-off-by: Anthony LC <anthony.le-courric@mail.numerique.gouv.fr>
2026-10-05 16:34:08 +02:00
Manuel Raynaud 2bd30312cd ⚡️(backend) coalesce and pace the resets of collaboration connections
For big documents, calling yhub for each sub documents can be a big
amount of request at the same time. We decided to group reset by batch
in the path order and call again the reset celery task with a delay to
continue.

Fix #2656
2026-10-05 14:15:07 +02:00
Manuel Raynaud 64338d55d0 🐛(backend) reset the collaboration connections on every access change
Reset to the collaboration server when an access is changed was
partially made. There is still action in the application that does not
cover this like when a document is moved or soft deleted.
Instead of doing the reset in the viewset and searching for every action
it should be made, we are making it now in the model to miss new or
modified path acting on an access. For detecting when a bulk
update/delete is made on the access model, we use existing
signal.
2026-10-05 14:15:06 +02:00
Roee SivanandAnthony LC 1983951843 🐛(frontend) keep login and logout out of the service worker cache
The login and logout navigations (authenticate/, callback/, logout/,
logout-callback/) reach the service worker on the same origin, and the
catch-all api route cached their redirects. When the network step
failed, the worker answered authenticate/ with a cached redirect that
carried an OIDC state already used, so the login failed: a 400 on the
callback before django-lasuite 0.0.30.

Give these urls their own NetworkOnly route, registered before the
catch-all one, so they never read or write the cache. ApiPlugin stays
on it, so the offline mutations are still replayed before a logout
ends the session.

Fixes #2477

Signed-off-by: Roee Sivan <roee.sivan@post.runi.ac.il>
2026-10-05 11:21:37 +02:00
renovate[bot]andGitHub 5d38f95e8d ⬆️(dependencies) update @ai-sdk/openai to v3.0.119 2026-10-05 01:06:19 +00:00
Anthony LC 861065301a ⬆️(dependency) upgrade lib0 from 0.2.114 to 0.2.119
Snyk has created this PR to upgrade lib0 from 0.2.114 to 0.2.119.

See this package in yarn:
lib0
2026-10-02 17:56:16 +02:00
Anthony LC 03838c14d4 ✅(e2e) improve e2e sub-page handling
A test was getting flaky, and was blocking the CI pipeline.
This change improves the handling of sub-pages in
the e2e tests to make them more reliable.
2026-10-02 15:59:13 +02:00
Thomas RaméandAnthony LC 5adfdee0d3 🐛(dev) missing default network for podman compose usage
Some services, like celery-dev, attach to the `default` network
explicitly, next to `lasuite`. Docker compose creates that implicit
network on its own. Podman compose does not when the top-level
`networks` section is declared without it, so `compose up` failed on
the unknown `default` network.

Declare `default: {}` so that the network exists with both tools.
2026-10-02 15:44:34 +02:00
Anthony LC 925ececab6 🐛(frontend) select a single language in the language picker
The language picker marked an option as selected when it matched the
current language, falling back to a match on the language alone. With the
current language zh-tw, the zh-cn option matched too, so several regions
of a language were selected at once, and the legacy picker could show the
label of the wrong one. Now that zh-cn and zh-tw are separate frontend
translations, this shows up for the Chinese locales, and it would for any
language with several regions (en-us/en-gb, pt-pt/pt-br).

Add getClosestLocale, which returns the one available locale closest to
the current language (the exact match first, then the first region of the
language), and use it in both pickers to select the option and to display
the current label.
2026-10-02 12:12:53 +02:00
Anthony LC c39c51a756 🌐(i18n) update translated strings
Pull the translations from Crowdin with the new locale-based export, so
that the frontend translations reflect the new taxonomy: zh-CN and zh-TW
are now two distinct entries (zh-cn and zh-tw) in translations.json
instead of a single "zh" one, and the backend .po files are refreshed.
2026-10-02 12:12:52 +02:00
Anthony LC da95cce985 🌐(i18n) key crowdin frontend exports by locale
Crowdin exported the frontend translations to a folder named after
%two_letters_code%, so every regional variant of a language landed in the
same folder: zh-CN and zh-TW both gave "zh", and the last one downloaded
overwrote the other. Mapping the Chinese locales apart would have fixed
only that pair, and each new variant (pt-BR, es-MX, en-GB...) would have
needed its own entry.

Use %locale% instead, which is unique per locale, like the backend already
does with %locale_with_underscore%. format-deploy keeps the keys of
translations.json as they are today (fr, de...) and only keeps the region
(zh-cn, zh-tw) when several locales of the same language are translated.
The language detection and the language picker already match a locale
exactly before falling back to its language, so they need no change.

The export pattern is stored by Crowdin with the source file: the sources
must be uploaded again before the next download, and the zh-CN data that
was polluted with Traditional Chinese still needs to be re-uploaded.

Fixes #2749
2026-10-02 12:12:52 +02:00
Ovgodd 8a7416cb3e 💄(frontend) redesign 401 error standalone page
Reuse the 404 standalone layout and keep the existing sign-in flow.
2026-10-02 11:42:23 +02:00
Ovgodd 2a4131a188 🐛(frontend) keep caption and alignment when replacing an image
The antivirus loader rebuilt the image block with an empty caption and
left alignment, so both were lost after a replace.

Signed-off-by: Ovgodd <c.gromoff@gmail.com>
2026-10-02 11:02:29 +02:00
Gene WoodandAnthony LC 6a3fd49348 📝(docs) fix markdown typo in installation README
Signed-off-by: Gene Wood <gene_wood@cementhorizon.com>
2026-10-02 10:25:35 +02:00
Manuel RaynaudandAnthony LC 9de17b3f82 👷(ci) cancel the superseded runs of a pull request
adding a concurrency group will now stop running CI if a new push is
made on the same branch.
2026-10-01 16:29:43 +02:00
Manuel RaynaudandAnthony LC 670cbe4beb 👷(ci) check the load-test tooling: swarm, canary, k6 and dashboards
Add missing jobs to run the tests in swarm and canary projects. For k6
the project is inspected using k6 docker image and for the grafana
dashboard we check if the generated dashboard equals the one existing.
2026-10-01 16:29:43 +02:00
Manuel RaynaudandAnthony LC d11d911c77 👷(ci) lint, typecheck, build and test the collaboration server
The CI was not setup for yhub, we added the missing jobs: lint, test and
typecheck
2026-10-01 16:29:42 +02:00
Anthony LC a2e7f4118c ⬆️(Dockerfile) bump Playwright base image to v1.63.0
The Playwright base image in the Dockerfile has been
updated from v1.62.1 to v1.63.0, in order to follow the
version of the `playwright` package in package.json.
2026-10-01 11:25:19 +02:00
Anthony LC 978a8205ea 🔒️(js) fix security warning
High:
- @xmldom/xmldom (13 advisories, CVE-2026-83612…)
- fast-uri GHSA-f65p-4m7j-42xc and 5 more
- js-yaml CVE-2026-84375
- browserslist CVE-2026-73089, CVE-2026-73088
- svgo CVE-2026-84370
- ws CVE-2026-48779

Moderate:
- vitest CVE-2026-84373
- qs CVE-2026-82562, CVE-2026-82417
- fflate CVE-2026-45820
- baseline-browser-mapping CVE-2026-45819
- colord GHSA-2wm5-q62r-hmrv

Low:
- @ai-sdk/provider-utils CVE-2026-8769
- postcss-selector-parser CVE-2026-9358
2026-10-01 11:25:18 +02:00
Anthony LC 3be8a858f2 ⬇️(frontend) downgrade blocknote dependencies to 0.54.0
The export feature is not working correctly with
the newer version, so we are downgrading to 0.54.0.
We need to refactorize the code to be compatible
with typst in order to work correctly.
2026-10-01 11:06:33 +02:00
Anthony LC 30dc14f78d ✅(dependency) add vite dependency
Recent upgrade of Vitest dependency needed
Vite dependency in order to work with the latest
Vitest features.
2026-10-01 11:06:33 +02:00
Anthony LC 77ea3b2c8e 🚨(dependency) update ui-kit tokens
We bumped the UI-kit dependency, we need to update
the UI-kit tokens accordingly.
2026-10-01 11:06:33 +02:00
renovate[bot]andAnthony LC 7e219dd8e4 ⬆️(dependencies) update js dependencies 2026-10-01 10:05:46 +02:00
renovate[bot]andGitHub bd71ed87e1 ⬆️(dependencies) update dompurify to v3.4.16 [SECURITY] 2026-09-30 19:59:40 +00:00
renovate[bot]andGitHub 976cd6c09b ⬆️(dependencies) update PyJWT to v2.15.0 [SECURITY] 2026-09-30 21:27:45 +02:00
renovate[bot]andGitHub b59abd5420 ⬆️(dependencies) update PyJWT to v2.14.0 [SECURITY] 2026-09-30 16:47:15 +00:00
Manuel RaynaudandGitHub af4c363c2a ⬆️(backend) upgrade django-lasuite to version 0.0.30
Upgrade django-lasuite to version 0.0.30 and add the new settings
OIDC_OP_LOGOUT_USE_POST in our settings.
2026-09-30 12:57:40 +00:00
MarrrrrrrrryandGitHub ad2908a693 🐛(backend) compensate document duplication failures
Duplicating a document tree made two calls to the collaboration server
per node, all inside the database transaction: it held locks for the
duration of every call, and a failure midway left the documents already
created on the collaboration server behind, as orphans nothing can
reach anymore.
    
The duplication now runs in two phases. The structure is first
replicated in a transaction that makes no call to the collaboration
server, then each duplicate is seeded with the content of its source.
A failure while seeding deletes what was seeded - the deletion of the
collaboration server is idempotent and never refused - and removes the
replicated documents, so neither side keeps an orphan.
    
Signed-off-by: Marrrrrrrrry <34876935+Marrrrrrrrry@users.noreply.github.com>
2026-09-30 10:09:53 +00:00
MarrrrrrrrryandGitHub 1794650e6d 🐛(yhub) bound the calls the server makes to the backend
`backendFetch` had no timeout: a backend that hangs hangs every
websocket
upgrade and fallback poll with it, piling up under load. The three
auth-path
calls it serves (`users/me`, `documents/{id}`, `accesses/me`) waited
forever,
so a slow backend took the whole collaboration service down with it.

Signed-off-by: Marrrrrrrrry <34876935+Marrrrrrrrry@users.noreply.github.com>
2026-09-30 08:24:32 +00:00
Lewis Bertin 4a627b2a26 📝(documentation) align keycloak realm and client in the k8s guide
The guide showed the impress realm and client, while keycloak.values.yaml
creates the docs realm and impress.values.yaml uses the docs client.
Copying the endpoints from the guide led to a 404.

Signed-off-by: Lewis Bertin <lewis@tactiqual.tech>
2026-09-29 22:44:19 +02:00
Lewis Bertin ad8d90fbf1 🐛(documentation) fix the minio port in the kubernetes helm example
Since helm-dev-backend 0.0.13 (silo image) the server always listens
on 9000. The example still set api.port to 80, so the service pointed
to a closed port, the bucket job waited forever and helm install timed
out. Dropping it keeps the chart default, which impress.values.yaml
and the dev values already expect.

Signed-off-by: Lewis Bertin <lewis@tactiqual.tech>
2026-09-29 22:44:19 +02:00
BOUKERFA Mohamed El AmineandManuel Raynaud 1fe52db894 🐛(backend) skip notification on self mention
Users mentioning themselves got an email about something they just
did, which is noise. Keep recording the mention, skip the email.

Signed-off-by: BOUKERFA Mohamed El Amine <boukerfa.ma@gmail.com>
2026-09-29 17:40:43 +02:00
BOUKERFA Mohamed El AmineandManuel Raynaud 4217f7c077 🐛(backend) release mention guard when notification fails
The cache key claimed before sending outlived a failed notification,
so the next mention in the same context was silently dropped until the
key expired although nobody had been notified. Delete it unless the
email went out and `notified_at` was saved.

Signed-off-by: BOUKERFA Mohamed El Amine <boukerfa.ma@gmail.com>
2026-09-29 17:40:43 +02:00
BOUKERFA Mohamed El AmineandManuel Raynaud 2af6606078 🔒️(backend) require explicit access to mention
Gate the ability to mention to users with explicit
access so only collaborators can mention collaborators.

Signed-off-by: BOUKERFA Mohamed El Amine <boukerfa.ma@gmail.com>
2026-09-29 17:40:42 +02:00
BOUKERFA Mohamed El AmineandManuel Raynaud 1a0edf194a 🛂(backend) exclude readers from mentions and access list
A reader cannot see comments, so a mention would lead them nowhere.
Reject readers as mention targets. while users allowed to comment
see each other so they can pick who to mention.

Signed-off-by: BOUKERFA Mohamed El Amine <boukerfa.ma@gmail.com>
2026-09-29 17:40:41 +02:00
BOUKERFA Mohamed El AmineandManuel Raynaud 0673072bc7 ✏️(backend) rework mention notification email copy
Signed-off-by: BOUKERFA Mohamed El Amine <boukerfa.ma@gmail.com>
2026-09-29 17:40:41 +02:00
BOUKERFA Mohamed El AmineandManuel Raynaud 530a883aad 🔒️(backend) validate mention anchor_id as a UUID
Anchors are block or comment ids, which are UUIDs, so we only
accept that.

Signed-off-by: BOUKERFA Mohamed El Amine <boukerfa.ma@gmail.com>
2026-09-29 17:40:40 +02:00
BOUKERFA Mohamed El AmineandManuel Raynaud 108c24eefb ♻️(backend) annotate mentioned user roles in mention validation
Signed-off-by: BOUKERFA Mohamed El Amine <boukerfa.ma@gmail.com>
2026-09-29 17:40:39 +02:00
BOUKERFA Mohamed El AmineandManuel Raynaud b9d41e6a6d 🐛(backend) guard mention notifications against concurrent duplicates
Use cache.add as a distributed lock keyed by document/user/thread to
ensure only the first concurrent mention sends the notification

Signed-off-by: BOUKERFA Mohamed El Amine <boukerfa.ma@gmail.com>
2026-09-29 17:40:38 +02:00
BOUKERFA Mohamed El AmineandManuel Raynaud c16a5887bd 🔒️(backend) throttle the document mention endpoint
Add a dedicated "mention" throttle scope limiting calls
to the document mention endpoint to 30 requests per minute.

Signed-off-by: BOUKERFA Mohamed El Amine <boukerfa.ma@gmail.com>
2026-09-29 17:40:38 +02:00
BOUKERFA Mohamed El AmineandManuel Raynaud 28cb6b7251 ⚡️(backend) send mention notification email asynchronously
Move the mention email off the request/response cycle into a Celery task
so the SMTP round-trip no longer delays the API response.

Signed-off-by: BOUKERFA Mohamed El Amine <boukerfa.ma@gmail.com>
2026-09-29 17:40:37 +02:00
Mohamed El Amine BOUKERFAandManuel Raynaud f18b6c0e5d ✨(backend) add mention endpoint with email notification
Allow users with at least the commenter role on a document to mention
other collaborators in the document body or in a comment thread via
POST /documents/{id}/mention/. The mentioned user must already have
access to the document.

The mention record is always created, and the mentioned user is
notified by email with a link to the anchor, unless a notification
was already sent in the same context (document body or specific
thread) within a configurable cooldown period (15 minutes by default).

Signed-off-by: Mohamed El Amine BOUKERFA <boukerfa.ma@gmail.com>
2026-09-29 17:40:36 +02:00
Mohamed El Amine BOUKERFAandManuel Raynaud 4436b2a9f8 ♻️(backend) let callers override document email context defaults
We need this so mention notification emails can replace the default
share link with a link to the anchor of the mention.
2026-09-29 17:40:35 +02:00
Mohamed El Amine BOUKERFAandManuel Raynaud dc75d5493b 🛂(backend) make document access list visible to all collaborators
Return all accesses on the document and its ancestors to any
user with access, keeping the limited user details serializer
and adding the user id to it, so that collaborators allowed
to comment can identify and mention each other.

Signed-off-by: Mohamed El Amine BOUKERFA <boukerfa.ma@gmail.com>
2026-09-29 17:40:35 +02:00
Manuel RaynaudandGitHub a73decba48 ⚡️(backend) remove throttle on content-update action
The content-update action is an internal call made by yhub. No throttle
should be apply on it.
2026-09-28 11:29:54 +00:00
Anthony LC 81b51ee578 📸(export) adapt export interlinking to get titles
We can now paste docs url that will become interlinking.
So we don't want to pass titles through the inline content itself
anymore, to not leak any titles. The problem is that inline content
Inline content mappers are not async, so titles must be
resolved upfront.
We adapted the export interlinking to get titles from
a pre-resolved map instead of relying on inline content.
2026-09-28 08:56:59 +02:00
Anthony LC 170c7b06f0 ✨(frontend) turn pasted doc links into interlinks
Pasting a bare link to another doc on the same domain now inserts an
interlink instead of a plain hyperlink, so it benefits from the same
title-sync and navigation behaviour as links added through the `/` or
`@` menu. Pasting over a selection, inside a code block, or a link the
current user can't resolve will display the doc id instead.
2026-09-28 08:56:59 +02:00
Manuel RaynaudandGitHub cf7be5b484 🐛(backend) retry the duplicate of a document on a tree path collision
The duplicate was not using create_tree_node_with_retry helper managing
duplicate path. We will have collision on this action if we don't use
it.
2026-09-26 07:05:31 +00:00