Commit Graph

1786 Commits

Author SHA1 Message Date
Cyril
b1a18b2477 (frontend) add missing label to improve a11y and pass axe checks
enhances a11y by adding label to fix axe tool errors on missing attributes

Signed-off-by: Cyril <c.gromoff@gmail.com>
2026-01-12 09:06:19 +01:00
Anthony LC
7823303d03 (frontend) improve export regression test pdf
We improved the export regression test PDF to
better cover edge case emoji.
PDF Binary comparison is different depending on the
browser used, we will only run this test on Chromium
to avoid having to maintain multiple sets of PDF
fixtures.
2026-01-09 15:43:06 +01:00
Anthony LC
f84455728b 📌(dependencies) use @gouvfr-lasuite/cunningham-react
In order to work correctly we the ui-kit dependencies,
we need to use the CunninghamProvider from
@gouvfr-lasuite/cunningham-react.
2026-01-09 15:43:06 +01:00
renovate[bot]
5afc825109 ⬆️(dependencies) update js dependencies 2026-01-09 15:43:06 +01:00
Manuel Raynaud
55fe73d001 (backend) use langfuse to monitor AI actions
We want to monitor AI actions. For this we choose to use langfuse. As
this usage is optional, we load langfuse sdk only if settings are
configured. Also, the openai client from langfuse is a dropin
replacement of openai client, so we only have to change how openai is
imported.
2026-01-09 14:38:56 +00:00
Christopher Spelt
39b9c8b5a9 🐛(backend) fix TRASHBIN_CUTOFF_DAYS type error
Fixes `TRASHBIN_CUTOFF_DAYS` type as described in #1777.

Signed-off-by: ChristopherSpelt <christopherspelt@icloud.com>
2026-01-09 14:00:23 +00:00
Cyril
b56ebf19af ️(frontend) make html export accessible to screen reader users
adjusted structure and semantics to ensure proper sr interpretation

Signed-off-by: Cyril <c.gromoff@gmail.com>
2026-01-09 09:08:12 +01:00
Manuel Raynaud
03d4b2afbe ♻️(backend) stop allowing redirect in cors-proxy endpoint
The cors-proxy endpoint was allowing redirect when fetching the target
url. This can be usefull if an image url has changed but also dangerous
if an attacker wants to hide a SSRF behind a redirect.
2026-01-08 15:58:00 +01:00
Manuel Raynaud
2556823a69 ♻️(backend) stop returning a 415 on cors-proxy endpoint
When the content-type return by the targeted url is not an image, the
endpoint was returning a 415 status code. We don't want to provide this
info anymore avoid disclosing information an attacker can use.
2026-01-08 15:58:00 +01:00
Manuel Raynaud
f28da7c2c2 🔒️(backend) validate more strictly url used by cors-proxy endpoint
The cors-proxy endpoint allow to download images host externally without
being blocked by cors headers. The response is filter on the return
content-type to avoid disclosure and the usage of this endpoint as the
proxy used by attacker. We want to restrict the usage of this endpoint
by filtering on non legit ips used. This filter avoid exploitation of
Server Side Request Forgery (SSRF).
2026-01-08 15:58:00 +01:00
Pierre Ozoux
dd2d2862be 🔒(helm) set default security context
In order to be able to deploy this in a restricted k8s cluster, we set
this default security context.

We set it as default because it doesn't change the way the app runs.

So it is better to be more secured by default.

Signed-off-by: Pierre Ozoux Krebber <pierre@ozoux.net>
2026-01-08 14:53:16 +00:00
Manuel Raynaud
c2387fcb02 📌(backend) ping django<6.0.0
We want to wait before migrating to django 6. For now we require all
versions less than version 6 and we add a rule in renovate configuration
2026-01-08 15:01:42 +01:00
Manuel Raynaud
80fdc72182 🔥(backend) remove tests related to django-lasuite
When all the backend authentication has been moved in the django-lasuite
library, we kept the tests to ensure that the mirgration was successful
and we didn't miss something during the transition. Now this tests are
managed in the django-lasuite library and should be maintained in it,
not in docs.
2026-01-08 15:01:42 +01:00
Manuel Raynaud
3636168a77 (backend) fix test related to django-treebeard 4.8.0 upgrade
In one test related to the Document::restore function, one more query is
made. Probably a cache issue fixed in django-treebeard 4.8.0. When
updating the numchild parent, one more query is made to fetch in
database the parent document, this was not made before.
2026-01-08 15:01:42 +01:00
renovate[bot]
1034545b7c ⬆️(dependencies) update python dependencies 2026-01-08 15:01:41 +01:00
Anthony LC
8901c6ee33 📝(docs) Add language configuration documentation
Add comprehensive guide explaining how to override LANGUAGES settings
using the DJANGO_LANGUAGES environment variable. Documentation includes:

- Default language configuration
- Environment variable format and examples
- Configuration for development, production, and Docker Compose
- Complete list of 15 available languages with translation files
- Language code formatting guidelines
- Testing and troubleshooting sections
2026-01-08 12:55:49 +01:00
Antonin
f7d697d9bd (backend) fix flaky test in user search api
Make sure the full is never John for the first user in order to make
sure we always have only 2 users (as the search is performed on both the
email and the full name).
    
Fixes #1765
    
Signed-off-by: Anto59290 <antonin59290@hotmail.com>
2026-01-08 11:50:07 +00:00
Anthony LC
f9c9e444c9 🐛(export) fix heading 4 5 6 in PDF
Heading 4 5 6 in PDF were not correctly
mapped to their corresponding styles in the
exported document.
The new export is now different than the regression
pdf, we need to update the regression PDF to match
the new correct export.
2026-01-08 11:32:58 +01:00
Anthony LC
e1d2d9e5c8 (export) simplify export testing
The regression test is asserting most of the
blocks of the editor, we can remove some redundant
tests.
We improved as well the odt and docx tests by
overriding as well the document content like for pdf,
it will assert more blocks and have less code
to maintain.
2026-01-08 11:32:58 +01:00
Anthony LC
ab92fc43d6 (export) add PDF regression tests
To avoid regression issues in PDF export
functionality, this commit introduces end-to-end
tests that compare exported PDFs against
known good reference files.
We compare the PDF on most of the blocks
that the editor supports.
If during a Blocknote release or pull request
there are intentional changes, the reference
files would need to be updated accordingly.
It can be done by uncommenting the line
in the test that saves the newly generated
PDF to the assets folder.
2026-01-08 11:32:58 +01:00
Anthony LC
3a3ed0453b ️(export) improve svg width when undefined
We improved the svg width calculation when the
width attribute is undefined by trying to use
the style attribute before falling back to a
default value.
2026-01-08 11:32:27 +01:00
Christopher Spelt
43a1a76a2f (backend) add documents/all endpoint with descendants
External dashboards need to find the latest updated documents across
the entire hierarchy. Currently this requires many API calls to
/documents/ and /documents/{id}/children for each level.
   
This endpoint allows retrieving all accessible documents in a single
request, enabling dashboards to efficiently display recently changed
documents regardless of their position in the hierarchy.
    
Signed-off-by: ChristopherSpelt <christopherspelt@icloud.com>
2026-01-08 09:33:55 +00:00
Cyril
62213812ee 🐛(frontend) fix clickable main content regression
removes accidental clickable area introduced by the skip-to-content feature
2026-01-08 09:32:21 +01:00
Anthony LC
3d2b018927 🔖(minor) release 4.3.0
Added:
- (helm) redirecting system
- 📱(frontend) add comments for smaller device
- (project) add custom js support via config

Changed:
- 🥅(frontend) intercept 401 error on GET threads
- 🦺(frontend) check content type pdf on PdfBlock
- ✈️(frontend) pause Posthog when offline

Fixed:
- 🐛(frontend) fix tables deletion
- 🐛(frontend) fix children not display when first resize
2026-01-06 10:29:35 +01:00
Anthony LC
bb0502b49b 🚸(frontend) set cursor after create comments
We have some issues with mobiles and the formatting
toolbar reopening after adding a comment, so we
restore the cursor position.
By restoring the cursor position at the head of
the selection, it will automatically close the
formatting toolbar.
2026-01-06 10:29:34 +01:00
AntoLC
9893558c74 🌐(i18n) update translated strings
Update translated files with new translations
2026-01-05 15:28:31 +01:00
Anthony LC
ea3a4a6da3 (project) add custom js support via config
From the config, we can add custom JS file URL
to be included in the frontend.
2026-01-05 15:06:53 +01:00
Anthony LC
b78ad27a71 🐛(frontend) fix children not display when first resize
When we resize the window for the first time, then
open the panel, the children were not displayed.
This fix this issue.
2026-01-05 13:21:54 +01:00
Anthony LC
e4b8ffb304 ✈️(frontend) pause Posthog when offline
Posthog keeps trying to send events when the user
is offline, causing the network request queue to fill up
and slowing down the app. This commit pauses Posthog
when the user is offline and resumes it when back online.
2026-01-05 12:07:47 +01:00
Anthony LC
78c7ab247b 🦺(frontend) check content type pdf on PdfBlock
Pdfblock was quite permissive on the content type
it was accepting. Now it checks that the content
type is exactly 'application/pdf' before rendering
the PDF viewer.
2026-01-05 11:47:55 +01:00
Anthony LC
b0bd6e2c01 🥅(frontend) intercept 401 error on GET threads
We intercept 401 errors on GET /threads to avoid
spamming Sentry with authentication errors
when users are not logged in.
2026-01-05 11:23:43 +01:00
Anthony LC
37527416f2 🩹(frontend) small ui improvement
- center initial loader before app load
- add name on input to remove warning
- fix hover on interlinking link
2026-01-05 11:02:30 +01:00
Anthony LC
30bc959340 ⬆️(dependency) fix CVE by bumping qs dependency
Fix CVE by bumping qs from 6.14.0 to 6.14.1
2026-01-05 10:20:17 +01:00
Anthony LC
a73d9c1c78 📱(frontend) add comments for smaller device
Add comments support for mobile devices by
removing the desktop-only restriction and
ensuring the UI adapts well to smaller screens.
2026-01-05 10:04:37 +01:00
Anthony LC
a920daf05b ⬆️(dependencies) bump to blocknote 0.45.0
Bump to BlockNote 0.45.0 to get the latest
features and fixes.
This release includes the fix for the table
deletion that breaks the editor when
deleting tables.
2025-12-22 10:53:12 +01:00
Anthony LC
ff88465398 ⬇️(dependencies) downgrade next from 16.0.10 to 15.5.9
Passing the Next 16 will need more work to be compatible
with our application. We will do this upgrade later
in a dedicated PR.
We add it in the renovate.json to avoid having Renovate
trying to upgrade it again.
2025-12-22 10:52:03 +01:00
renovate[bot]
3617e4f7b8 ⬆️(dependencies) update js dependencies 2025-12-22 10:52:02 +01:00
Anthony LC
efaec45bfd (helm) create ingress-redirects template
Create a new Helm template for ingress redirects
and update the values.yaml file accordingly.
We will be able to manage ingress redirects
through Helm charts easily.
2025-12-22 10:11:54 +01:00
Anthony LC
715d88ba3c ♻️(frontend) replace auth redirect logic for home
To be intercepted by ingress redirects, we need
to redirect using window.location instead of
using Next.js router. The Next.js router does not
trigger a full page reload, so the ingress
redirect logic is not executed.
2025-12-22 10:09:13 +01:00
Anthony LC
7d64d79eeb 🐛(helm) fix OIDC authentication with standard scopes
"usual_name" does not seem to be standard,
it gives error during login.
We replace "usual_name" by "family_name".
2025-12-22 09:24:44 +01:00
Anthony LC
2e66b87dab 🔧(helm) add OIDC_REDIRECT_ALLOWED_HOSTS to fix authentication flow
Add OIDC_REDIRECT_ALLOWED_HOSTS setting to dev and
feature environments to properly allow Keycloak
redirect callbacks after authentication.
2025-12-22 09:24:44 +01:00
Anthony LC
fb368ef86f 🔖(minor) release 4.2.0
Added:
- (backend) allow to create a new user in a marketing system
- (backend) add async indexation of documents on save
  (or access save)
- (backend) add debounce mechanism to limit indexation jobs
- (api) add API route to search for indexed documents in Find
- 🥅(frontend) add boundary error page

Changed:
- 🛂(backend) stop throttling collaboration servers
- 🚸(backend) use unaccented full name for user search
- 🌐(backend) internationalize demo
- (frontend) improve accessibility:
  - ️Improve keyboard accessibility for the document tree

Fixed:
- 🐛(frontend) paste content with comments from another document
- 🐛(frontend) Select text + Go back one page crash the app
2025-12-17 17:03:27 +01:00
Anthony LC
e340463d35 🐛(frontend) fix versioning conflict
We switching from one version to the other, depending on
the blocks inside, the version editor could
crash due to conflicts between the different versions.
We now reset the previous content
when switching version to avoid these conflicts.
2025-12-17 17:03:27 +01:00
Anthony LC
344e9a83e4 🥅(frontend) add boundary error page
Add a custom error page to handle unexpected errors
gracefully. This page provides users with options
to navigate back to the home page or refresh
the current page, enhancing the overall user
experience during error scenarios.
It is quite hard to test this page, it cannot
be trigger in development mode, we have to build
the app and have a real error in production to
see it.
2025-12-17 09:26:15 +01:00
Cyril
48aa4971ec (frontend) keyboard support in sub-documents with f2 options access
adds f2 shortcut to open options menu in sub-documents

Signed-off-by: Cyril <c.gromoff@gmail.com>

(frontend) adds f2 shortcut using a fakenode since it's outside the treeview

Signed-off-by: Cyril <c.gromoff@gmail.com>

(frontend) add sr-only instructions with aria-describedby links

improves screen reader support with contextual accessibility guidance

Signed-off-by: Cyril <c.gromoff@gmail.com>

(frontend) add e2e test to check focus behavior with F2 shortcut

ensures F2 correctly focuses the expected UI element

Signed-off-by: Cyril <c.gromoff@gmail.com>
2025-12-17 08:26:48 +01:00
Fabre Florian
d47b5e6a90 🩹(backend) fix oidc token storage configuration
Disable OIDC_STORE_ACCESS_TOKEN & OIDC_STORE_REFRESH_TOKEN as default
to prevent authentication issues when the Find service is not used.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-12-16 22:10:03 +01:00
Fabre Florian
c24f46067b (backend) adapt to Find new search pagination
Use nb_results instead of page/page_size argument for /search API.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-12-16 22:10:03 +01:00
Fabre Florian
f5a9ef2643 🩹(backend) fix empty indexation batch
As we filter the empty documents from the batch during indexing some batches
can be empty and cause an error. Now they are ignored.
Add --batch-size argument to the index command.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-12-16 22:10:03 +01:00
Fabre Florian
780bcb360a (backend) use batches in indexing task
Reduce the number of Find API calls by grouping all the latest changes
for indexation : send all the documents updated or deleted since the
triggering of the task.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-12-16 22:10:03 +01:00
Fabre Florian
65d572ccd6 📝(backend) add fulltext search documentation
Add documentation for env & Find+Docs configuration in dev mode

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-12-16 22:10:03 +01:00