Commit Graph
784 Commits
Author SHA1 Message Date
Manuel Raynaud f714c7fae3 (backend) profile api using django-silk
We have performance issue with the media_auth endpoint. We need to
monitor and profile this endpoint to understand what is happening. We
decided to install and configure django-silk. By default django-silk is
not enabled and not accessible, once enabled migration must be run and
the /silk/ endpoint will be accessible only using a super user.
To have relecant profiles and monitor we must have a database comparable
to a production one because we are facing a scaling issue. Unless a
million documents probably nothing is happening, for this we added
several management commands to help us. A first one to anonymize a
database than can be reused without any risk to leak PII data, can be
called using python manage.py anonymize_database with some mandatory
options. An other command to generate a database profile, this command
should be run on a production database, this profile can then be used by
the generate_volumetry to populate a development database with same
volumetry than describe in the profile.
2026-08-20 16:21:36 +02:00
risk-altandAnthony LC fb984abab3 🐛(backend) handle object storage metadata keys case-insensitively
Object storage metadata keys are case insensitive per the S3
specification, but implementations don't agree on the case they give
back. When head_object returns a capitalized "Status", updating the
attachment status added a second, lowercase entry instead of replacing
it, and the copy request ended up carrying two x-amz-meta-status
headers. Ceph RadosGW loses one of them behind a proxy, which
invalidates the request signature.

The same assumption was made when reading the status back in media-auth
and media-check, where an attachment stored on such a backend stayed in
"processing" forever.

Metadata read from the storage is now normalized to lowercase keys
before being consumed or copied over.

Signed-off-by: risk-alt <aldu6974@gmail.com>
2026-08-14 11:30:52 +02:00
risk-altandAnthony LC 0b933ed3a2 🐛(keycloak) fix database env variables in the self-hosting example
The Keycloak container ignored KC_DB_HOST, KC_DB_NAME and KC_DB_USER:
the Quarkus distribution expects KC_DB_URL_HOST, KC_DB_URL_DATABASE and
KC_DB_USERNAME instead. Keycloak silently fell back to its default JDBC
URL on localhost:5432 and could not reach the database container.

The host value also pointed to "postgresql" while the service is named
kc_postgresql in the example compose file, so it is fixed as well.

These names already match the ones used in env.d/development/kc_auth.

Signed-off-by: risk-alt <aldu6974@gmail.com>
2026-08-14 10:54:47 +02:00
fch-aaandAnthony LC 2da4ae2298 🐛(frontend) refresh pins after document deletion and restoration
Favorite relationships persist across soft deletion, while the sidebar keeps
a stale cached list until reload. Invalidate the favorites query after deletion
and restoration so deleted documents disappear immediately and their pins
return when restored.

Signed-off-by: fch-aa <21101725+fch-aa@users.noreply.github.com>
2026-08-13 10:00:42 +02:00
risk-alt 87e59e78fa 🐛(helm) show the database error while jobs wait for it to be ready
The migrate and createsuperuser jobs polled `manage.py check` with its
output sent to /dev/null, then printed "Database not ready" whatever
the reason. Any failure the check reports, a missing setting or a bad
credential for instance, looked like a database that had not started
yet, and the job looped forever without a single clue in its logs.

The check output is now captured and printed on each failed attempt,
along with the attempt number, so the reason the job is still waiting
is readable with kubectl logs. The retry behaviour is unchanged.

Applied to both jobs in the chart values and in the dev and feature
helmfile environments. The chart README table is regenerated
accordingly.

Signed-off-by: risk-alt <aldu6974@gmail.com>
2026-08-11 22:49:37 +02:00
risk-altandAnthony LC 44c51ff7bf 💄(frontend) use the same highlight color for cells and moves
Blocknote highlights the selected table cells with #c8c8ff66 and draws
the drop cursor of a moved block with #ddeeff: two different colors,
both out of the palette.

Use --c--contextuals--background--semantic--brand--tertiary for both, and
for the drop indicator of a moved table row or column which was #adf.
The cell overlay is blended with multiply because it is drawn on top of
the cell content while the token is opaque.

Signed-off-by: risk-alt <aldu6974@gmail.com>
2026-08-11 17:19:00 +02:00
Anthony LC c389a3c83d 🐛(y-provider) fix sentry init
Sentry should actually be initialized
before the app is created. We now start sentry
before starting the app server.
2026-08-11 15:29:06 +02:00
risk-altandAnthony LC 28438fdd92 🐛(frontend) export images embedded with a relative url
Images embedded with a relative url such as /assets/logo.png were routed
through the CORS proxy: the same origin check used a substring match on
window.location.hostname, which a relative url never contains. The
backend rejects those urls with a 400 as it only validates absolute
http(s) urls.

Resolve the url against the current origin instead, so relative and
absolute same origin urls are fetched directly. This also stops matching
unrelated external urls that merely contain the hostname, and replaces
the "base64" substring check by an explicit data: scheme check.

exportResolveFileUrl now checks response.ok as well: fetch() only
rejects on network errors, so the 400 payload was returned as a blob and
embedded in the export instead of falling back to the url.

Signed-off-by: risk-alt <aldu6974@gmail.com>
2026-08-10 12:12:39 +02:00
Julien Maupetit b297d79c32 🐛(backend) ignore CSPs for API docs in development
With Content Security Policies activated, swagger (and redoc)
auto-generated API documentation is no longer accessible even locally.
To restore this feature, we've excluded CSP for related URLs only in
the `Development` configuration.
2026-08-05 10:39:48 +02:00
Florent Chehab edf26d6321 (backend) conditional email notification in server to server api
Add send_notification_email flag (defaults to True) on
the ServerCreateDocumentSerializer so that we can bypass
sending the email notification when creating a document
with the server to server API.

Signed-off-by: Florent Chehab <flo@nextmile.fr>
2026-08-03 10:54:31 +02:00
Cyril 1258ae2e04 ️(frontend) use semantic <p> elements in document info card
Wrap role and last-update text in DocHeaderInfo with <p>.
2026-07-21 11:42:14 +02:00
5217dd4fca 🐛(frontend) redirect homepage to login when homepage feat is disabled
FRONTEND_HOMEPAGE_FEATURE_ENABLED=false makes the Auth guard send
anonymous visitors on / straight to login instead of /home, but the
/home page itself still rendered the full homepage when reached via a
direct link. Redirect it to login too, so disabling the feature really
disables the page.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PhqB4SHsHCuMfprwLEN3rR
Signed-off-by: Maarten Draijer <maarten@madra.nl>
2026-07-21 10:56:07 +02:00
exyoneandAnthony LC 126818fc15 🌐(i18n) rename cn_CN to zh_CN, add eo_PL and zh_TW locales
We have renamed the Chinese locale from `cn_CN`
to `zh_CN` to align with standard locale naming
conventions.
Additionally, we have added support for two new
locales: Esperanto (`eo_PL`) and
Traditional Chinese (`zh_TW`).
2026-07-21 10:19:01 +02:00
Cyril 8d2dd5b565 (frontend) restore skip to content link after header redesign
Re-add skip link with responsive positioning and document title focus.
2026-07-13 09:41:42 +02:00
Anthony LCandManuel Raynaud 57ad4f4be8 🔖(release) patch 5.4.1
Changed:
- ♻️(backend) reset collaboration connection in cascade for all children

Fixed:
- 💄(frontend) fix some UI/UX in the left panel
- 🐛(frontend) fix tree dnd firefox
2026-07-09 18:22:20 +02:00
Anthony LC 5a705b045b 💄(frontend) fix some UI/UX in the left panel
- Collapse panel button is now:
  - fully clickable,
  - the title is hidden
  - when the doc title is visible
  - when small mobile the title is hidden
- Add button login when logout whatever the device
- Fix flickering logo
- New icon name to avoid cache
2026-07-09 17:46:12 +02:00
Anthony LC 8f53e4b068 🐛(frontend) fix tree dnd firefox
With Firefox, the DND was not working properly anymore.
From a previous refacto, a item is now a link,
by default a link has a draggable attribute set
to true, it was conflicting with the DND library,
so we need to set it to false.
2026-07-09 17:45:47 +02:00
Manuel Raynaud d35b81a6ed ♻️(backend) reset collaboration connection in cascade for all children
When an access is updated or deleted, or a link_configuration is
changed, the collaration_service is used to reset the connection in the
collaboration server. As accesses and link_configuration are inherited
in a Docs tree, if the user is connected to a child, the connection is
not reset. This commit fix this issue by calling the reset on every
children in the tree.
2026-07-09 14:46:11 +02:00
Anthony LC 0659cc5247 🔖(minor) release 5.4.0
Added:
- (y-provider) preserve callouts, PDFs, page breaks, interlinking
  links and commented text on HTML/markdown export
- (frontend) add a user menu
- (frontend) new header and responsive harmonization
- (backend) add management command to reset a Document

Changed:
- ️(frontend) hide mobile left panel from screen readers when collapsed
- ️(frontend) enable blocknote heading ids for toc anchors
- ️(frontend) focus export modal on format select
- ️(frontend) configurable legal submenu in HelpMenu, remove Crisp
- ♻️(frontend) new create button for docs
- ️(frontend) align search modal field label with placeholder
- 🚚(frontend) move Waffle to bottom left
- ️(frontend) remove redundant aria-label on table of contents links
- ♻️(core) fix typo in settings COLLABORATION_WS_NOT_CONNECTED_READY_ONLY
- ♻️(backend) scope document search by document id instead of path

Fixed:
- 🐛(backend) prevent owner from leaving a soft-deleted document
- 🐛(frontend) fix removed item in the tree
- 🐛(frontend) fix service worker causing reload on tab focus
- 🐛(backend) update restore ability for inherited deletion
- 🔧(dev) make the dev stack domain-agnostic
- 🐛(frontend) stop force index redirect when delete doc
- 🐛(frontend) fix CTA on move modal on mobile

Removed:
- 🔥(backend) remove unused default authentication backend
2026-07-08 10:55:43 +02:00
Manuel Raynaud 9ef4a15f5e ♻️(backend) scope document search by document id instead of path
The search in a document tree was triggered by the usage of the document
path. The path is something guessable by incrementing it you can
discover public documents. We decided to change this to use the document
id which is not guessable and prevent discovering public documents.
Thanks to @maboukerfa for discovering it.
2026-07-07 11:21:47 +02:00
Anthony LC c2864378ed 🐛(frontend) fix CTA on move modal on mobile
On some mobile devices, the CTA button on the
move modal was not visible due to a CSS issue.
This commit fixes the issue by adjusting the modal's
layout and ensuring that the CTA buttons are visible.
2026-07-07 10:20:02 +02:00
Anthony LC 6a84430a4f 🔧(dev) make the dev stack domain-agnostic
Keycloak's hostname, its client's redirect/web
origins, and Django's CSRF trusted origins were
hardcoded to localhost, so the dev stack was
only reachable from that exact origin.
It is now possible to run the dev stack depending
what is configured in the env files.
2026-07-06 17:10:55 +02:00
Anthony LC 151d3a8135 🐛(frontend) stop force index redirect when delete doc
Depends the state, after deleted a doc, we were
automatically redirecting to the index page, which is
not always the desired behavior. This change stops
the automatic redirect after deleting a document,
allowing for more flexible navigation based on user
context.
2026-07-06 14:55:03 +02:00
Manuel Raynaud b01e6d58fd ♻️(core) fix typo in settings COLLABORATION_WS_NOT_CONNECTED_READY_ONLY
The settings COLLABORATION_WS_NOT_CONNECTED_READY_ONLY contains a typo.
We don't want to see READY_ONLY but READ_ONLY. This commit fix the typo
and change everywhere in the codebase the settings name.
2026-07-06 08:55:21 +02:00
Anthony LC c82ff199f1 ♻️(frontend) replace header by floating header
We replace the header by a floating header, to have more
space for the content and in fine to have more
harmony between the doc and the doc-grid, in mobile view
or not.
The layout have to be adapted, as well the legacy home
page.
2026-07-03 17:42:19 +02:00
Manuel RaynaudandGitHub debb253fa5 (backend) add management command to reset a Document
We need a management command to reset a Document to an initial state and
deletes everything related to it. This command can be usefull to reset a
demo for example.
2026-07-03 15:10:04 +00:00
Manuel RaynaudandGitHub 336d530014 🛂(backend) remove unused default authentication backend
The authentication backend
mozilla_django_oidc.contrib.drf.OIDCAuthentication
is present in the default authentication classes for the REST_FRAMEWORK
settings. This backend should not be used by our application and can
lead to the usage of our main api with an access_token instead of the
cookie session.
We need to override the drf SessionAuthentication backend to implement
the authenticate_header method. Without this, a 403 status code is
returned, but it is not valid. It must a be 401
2026-07-03 13:18:51 +00:00
Anthony LC 50b696cba1 (frontend) add a user menu
We are now using the UserMenu component from
the ui-kit. It is a dropdown displaying the user's
name and email, along with a logout button and a
language picker. To fit the design of the user menu,
we adapted the LanguagePicker adn are now using the
ui-kit language picker component.
2026-07-01 17:56:46 +02:00
Dakshesh JainandGitHub 6ec541f5cb 🐛(backend) update restore ability for inherited deletion
Updated the restore ability so that only directly deleted documents can
be restored. This prevents the restore action from being exposed for
child documents whose parent is deleted. This PR addresses #2127.
2026-06-30 10:01:07 +00:00
Amine BOUKERFAandGitHub 36dced1e56 🐛(backend) prevent owner from leaving a soft-deleted document
Owners could leave trashed documents via the leave endpoint, deleting
their `DocumentAccess` and all subtree access. When the last owner
leaves a document it creates an orphan as no owners remains in the doc.

Signed-off-by: BOUKERFA Mohamed El Amine <boukerfa.ma@gmail.com>
2026-06-29 13:04:04 +00:00
Cyril a64b5cb447 ️(frontend) remove redundant aria-label on table of contents links
Removed redundant aria-label to fix double SR announce.
2026-06-29 11:14:28 +02:00
Anthony LC cb19a6ee71 🚚(frontend) move Waffle to bottom left
We moved the waffle button to the bottom left inside
the left panel.
This change is part of the new header design.
2026-06-24 16:21:13 +02:00
Anthony LC 9605dc7c90 🐛(frontend) fix service worker causing reload on tab focus
During rolling deploys, multiple replicas serve
different builds of service-worker.js
(each build has a random buildId baked in).
This causes a controllerchange loop: the new SW
activates via skipWaiting, the page reloads, then the
next request may hit an older replica,triggering another
update and another reload — surfacing as a reload
every time the tab becomes visible.

We added a sessionStorage guard so a controllerchange
triggers at most one automatic reload per session; subsequent
flaps between versions are silently ignored, while legitimate
updates still cause a single reload automatically.
2026-06-24 15:40:29 +02:00
Anthony LC 25d47966c0 ♻️(frontend) new create button for docs
New create button for docs.
It is now a link button instead of a pure button,
meaning we can navigate to this new created doc
and open it in another tab by doing ctrl + click.
This new button has a dropdown menu that allows
users to import a docx file or a markdown file.
We removed the old import button.
2026-06-23 14:26:16 +02:00
Cyril f6de499ff4 ️(frontend) align search modal field label with placeholder
Remove redundant aria-label on QuickSearch input, align DocSearchModal labels.
2026-06-23 14:02:29 +02:00
Cyril b9e4df7bd6 🔥(frontend) remove Crisp from the project
Remove Crisp chat SDK, provider, analytics, session management
and all related references across the codebase.
2026-06-23 13:37:50 +02:00
Cyril ddb864608a ️(frontend) focus export modal on format select
Focus export modal on format select for ARIA dialog compliance
2026-06-23 13:01:41 +02:00
Cyril 09f95681ef ️(frontend) enable blocknote heading ids for toc anchors
Use setIdAttribute and link TOC entries to native block ids.
2026-06-23 11:46:31 +02:00
Cyril 5843d5ab2f ️(frontend) hide mobile left panel from screen readers when collapsed
Hide closed mobile left panel from screen readers with inert
2026-06-23 10:54:07 +02:00
Sylvain ZimmerandAnthony LC 635f1cf7a4 (y-provider) preserve commented text on HTML/markdown conversion
The "comment" mark must exist in the conversion editor schema, otherwise
y-prosemirror silently drops every commented run of text when reading the
Yjs document, turning any block holding a comment into an empty block.
Register the CommentsExtension on the conversion editor so commented text
round-trips like the other custom blocks.
2026-06-23 09:43:27 +02:00
Sylvain ZimmerandAnthony LC 46fc08a538 (y-provider) preserve custom blocks on HTML/markdown conversion
Wire the docs BlockNote schema (callout, pdf, uploadLoader, interlinking
link, page break) into the conversion editor so /api/convert no longer
drops or mangles these blocks.
2026-06-23 09:42:43 +02:00
Anthony LC a63fa17e20 🐛(frontend) fix removed item in the tree
react-arborist's scrollTo calls react-window's scrollToItem, which mutates
the internal scrollOffset state. When navigating to a deep item in a large
tree, this causes all items above the target to be removed from the DOM
(virtualized away), making the tree appear empty above the selected node.
We no-op it to prevent that — the panel's own overflow-y handles scrolling.
2026-06-22 17:09:41 +02:00
Manuel Raynaud a8d67f34c4 🔖(minor) release 5.3.0
Added

- (backend) add limit on distinct reactions per comment #1978
- (frontend) leave a document #2410
- (frontend) add top parent on sub docs search #1952
- (frontend) unauthenticated users can search #2407
- (backend) specific user delete method to delete its relations #2437

Changed

- 👷(CI) remove test-e2e-other-browser job #2404
- ️(frontend) use heading element for pinned documents section title #2380
- ️(frontend) use anchor links for table of contents entries #2390
- ️(frontend) improve presenter mode screen reader and keyboard support #2383
- ️(frontend) link export modal name to its heading #2422

Fixed

- 🐛(frontend) overlap of block menu dropdown #2406
- ️(backend) fix N+1 queries when serializing thread comments #2415
2026-06-19 15:57:23 +02:00
Manuel Raynaud ed0dce66c5 (backend) specific user delete method to delete its relations
Deleting a user is not possible when it has created docs because the
on_delete on the Document class id RESTRICT and we don't want to change
it. We decided to have a specific workflow for correctly delete a user.
The document where the user is the sole owner must be deleted, the other
only the owner access must be deleted. For the remaining Documents where
the user is the creator, we set it to `null`, then the user can be
delete, remaining relations are deleted in cascade.
2026-06-19 11:53:32 +02:00
Mohamed El Amine BOUKERFAandManuel Raynaud 867583a52a (backend) add limit on distinct reactions per comment
Implement a configurable limit (default: 15) on the number of distinct
emoji reactions per comment.

  - Backend validation ensures the limit cannot be exceeded via API

Signed-off-by: Mohamed El Amine BOUKERFA <boukerfa.ma@gmail.com>
2026-06-15 08:56:45 +02:00
Cyril 0f984d6832 ️(frontend) link export modal name to its heading
Link aria-describedby to modal description, not title
2026-06-12 11:03:00 +02:00
Anthony LC 4c3b17a541 (frontend) leave a document feature
When we were visiting a public document, it was part of
our list of documents, and we couldn't leave it.
Now, we can leave a public document, and it will
be removed from our list of documents.
We coupled it with remove access to a document if
you had access to it, and you can also leave a
document without having to pass through the share
modal, which is a better user experience.
2026-06-11 16:49:09 +02:00
Amine BOUKERFAandGitHub 5aa1402aa3 ️(backend) prefetch thread comments tree to fix N+1 queries
Retrieving a thread serialized its nested comments, reactions and
reaction users without prefetching, issuing one query per comment for
its author and reactions and one query per reaction for its users.
    
Signed-off-by: Mohamed El Amine BOUKERFA <boukerfa.ma@gmail.com>
2026-06-11 13:25:12 +00:00
Anthony LC 359fb42605 (frontend) add top parent on sub docs search
In the search modal, under the sub docs,
we now display the top parent of the doc, to give
more context to the user about the doc they are
looking for.
We refactorize the filters to get more flexibility
and avoid too much props drilling.
2026-06-10 16:44:49 +02:00
Cyril 69c3303c1a ️(frontend) restore focus after presenter close
Restore focus to menu trigger after closing presenter mode.
2026-06-10 14:27:06 +02:00