Commit Graph

1798 Commits

Author SHA1 Message Date
Anthony LC
c9f42e7924 🩹(frontend) improve minor ux/ui
- Better logo resolution (x4)
- Remove floating bar when printing a doc
- Add loader during doc import
2026-03-02 11:49:21 +01:00
Anthony LC
a30384573e 🔇(frontend) remove ads console i18next
i18next was adding ads to the console. We remove it from
the console thanks to "showSupportNotice" option.
We upgraded to have less noisy console as well
during development.
2026-03-02 11:12:49 +01:00
Anthony LC
54dc72209c 🩺(trivy) add minimatch CVE to trivyignore
We added CVE-2026-27903 and CVE-2026-27904 to
the .trivyignore file
We need to wait for the community to update the
docker image with a fix for these CVEs before we
can remove them from the .trivyignore file.
2026-02-27 09:58:57 +01:00
Anthony LC
9cf30a0d5f 🔒️(secu) fix CVE warning
Fix CVE warning about:
- CVE-2026-27606 about rollup
- CVE-2026-26996 about minimatch
2026-02-27 09:55:36 +01:00
Anthony LC
f24b047a7c 🛂(frontend) add access request modal on move modal
If a user tries to move a document for which they
don't have the right to move, we now display a
modal to request access to the owners of the
document.
2026-02-27 09:13:29 +01:00
Anthony LC
3411df09ae 🛂(frontend) add confirmation modal on move modal
If the document has more than 1 direct access,we want to
display a confirmation modal before moving the document.
This is to prevent users from accidentally moving a document
that is shared with multiple people.
The accesses and invitations will be removed from the
document.
2026-02-27 09:12:04 +01:00
Anthony LC
2718321fbe (frontend) Move doc modal
We can now move a doc to another doc from a search
modal. It will make it easier to move a doc
without having to scroll through the doc grid to
find the destination doc.
We kept most of the logic implemented in the
doc grid dnd.
2026-02-27 09:09:25 +01:00
Anthony LC
217af2e2a8 🐛(frontend) disable DND grid item when dialog open
We could drag and drop the items even if the
modal was opened, which could cause some unexpected
behaviors. This commit disables the DND
functionality when a dialog box is open.
2026-02-27 09:08:51 +01:00
Anthony LC
53985f77f3 🚚(frontend) move modal Share directly to concern component
To keep consistency with the other modals, we move
the share modal directly to the
DocsGridActions component. This way, we avoid
having to pass down the openShareModal function
from parent components and keep the logic related
to sharing a doc encapsulated within the
concern component.
2026-02-27 09:08:51 +01:00
Anthony LC
a51ceeb409 🚩(frontend) add Analytics feature flag on Blocknote AI
We want to have a fine grained control over the
Blocknote AI feature.
By adding the feature Analytics feature flag,
we can enable or disable this feature for specific
users or groups without deploying new code.
This allows us to test the feature in a controlled
environment and gather feedback before a full rollout.
2026-02-26 13:50:17 +01:00
Anthony LC
1070b91d2f 🚩(project) add more backend AI feature flags
The Blocknote AI feature is a bit flaky, we want
to be able to disable it if to much issues arise,
without having to do a new release.
We add a bunch of feature flags to be able to
disable the AI features if needed:
- add AI_FEATURE_BLOCKNOTE_ENABLED, to display
or not the feature powered by blocknote
- add AI_FEATURE_LEGACY_ENABLED, to display or not
the legacy AI features
2026-02-26 13:50:17 +01:00
Manuel Raynaud
24ec1fa70e 🔥(backend) remove settings AI_STREAM
We don't need anymore the AI_STREAM settings, we use the stream all the
time.
2026-02-26 09:52:34 +01:00
Manuel Raynaud
0ba6f02d1a (backend) force usage of system prompt along when using tools
When the tool applyDocumentOperations is used, we have to force the
usage of a system prompt in order to force the model to use it the right
without inventing different actions. The pydantic Agent class can use a
system prompt but this noe is ignoried when a UI adapter is used like
the VercelAiAdapter.
2026-02-26 09:52:34 +01:00
Manuel Raynaud
8ce216f6e8 (backend) use pydantic AI to manage vercel data stream protocol
The frontend application is using Vercel AI SDK and it's data stream
protocol. We decided to use the pydantic AI library to use it's vercel
ai adapter. It will make the payload validation, use AsyncIterator and
deal with vercel specification.
2026-02-26 09:52:33 +01:00
Manuel Raynaud
050b106a8f ️(asgi) use uvicorn to serve backend
This is a naive first switch from sync to async.
This enables the backend to still answer to incomming requests
while streaming LLM results to the user.

For sure there is room for code cleaning and improvements, but
this provides a nice improvement out of the box.
2026-02-26 09:52:33 +01:00
Cyril
5011db9bd7 ️(frontend) announce ai status with aria-live
notify screen readers about ai thinking, writing, ready, or error
2026-02-26 09:52:33 +01:00
Anthony LC
e1e0e5ebd8 🛂(frontend) bind ai_proxy abilities with AI feature
Bind ai_proxy abilities to the AI feature.
If ai_proxy is false, the AI feature will
not be available.
2026-02-26 09:52:33 +01:00
Anthony LC
5c8fff01a5 📄(frontend) remove AI feature when MIT
AI feature is under AGPL license, so it is removed
when the project is under MIT license.
NEXT_PUBLIC_PUBLISH_AS_MIT manage this.
2026-02-26 09:52:33 +01:00
Anthony LC
1a022450c6 (frontend) integrate new Blocknote AI feature
We integrate the new Blocknote AI feature
into Docs, enhancing the document editing experience
with AI capabilities.
2026-02-26 09:52:33 +01:00
Anthony LC
09438a8941 🛂(backend) harden payload proxy ai
Standard can vary depending on the AI service used.
To work with Albert API:
- a description field is required in the payload
  for every tools call.
- if stream is set to false, stream_options must
  be omitted from the payload.
- the response from Albert sometimes didn't respect
  the format expected by Blocknote, so we added a
  system prompt to enforce it.
2026-02-26 09:48:03 +01:00
Manuel Raynaud
6f0dac4f48 (back) manage streaming with the ai service
We want to handle both streaming or not when interacting with the AI
backend service.
2026-02-26 09:48:03 +01:00
Anthony LC
9d6fe5da8f 🔧(backend) make frontend ai bot configurable
We make the AI bot configurable with settings.
We will be able to have different AI bot name
per instance.
2026-02-26 09:48:03 +01:00
Anthony LC
1ee313efb1 (backend) add ai_proxy
Add AI proxy to handle AI related requests
to the AI service.
2026-02-26 09:48:02 +01:00
Anthony LC
1ac6b42ae3 ️(frontend) fetch document without content when not needed
To improve performance, especially for documents
with large content, an optional query parameter
`without_content` has been added to the document
fetching API endpoint. When this parameter is set
to true, the API will return the document
metadata without the content, allowing the frontend
to load faster and reduce unnecessary data transfer.
2026-02-25 21:18:01 +01:00
Manuel Raynaud
ffae927c93 ️(backend) remove content from Document serializer when asked
The frontend can fetch the retrieve endpoint just for having the title.
Everytime, the content is added and to get the content, a request is
made to the s3 bucket. A query string `without_content` can be used, if
the value is `true` then the content is not added (and not also not
fetch).
2026-02-25 21:18:01 +01:00
Anthony LC
0d335105a1 🔒️(secu) fix CVE warning
Fix CVE warning about:
- CVE-2026-22036 about undici
- CVE-2025-13465 about lodash
- CVE-2026-2327 about markdown-it
- CVE-2025-64756 about glob
- CVE-2026-2391 about qs
- CVE-2026-24001 about diff
2026-02-25 15:25:30 +01:00
Anthony LC
dc23883a9c ⬆️(frontend) update dependencies to fit eslint v10
Update dependencies and code to fit eslint v10.
2026-02-25 14:59:13 +01:00
renovate[bot]
a8ce9eabf8 ⬆️(dependencies) update js dependencies 2026-02-25 14:59:13 +01:00
Anthony LC
21217be587 ️(CI) optimize Docker Hub workflow
We use the Docker Hub Workflow to build and push
our images to Docker Hub, but to check if we
have vulnerabilities in our images as well.
When we are just checking for vulnerabilities,
we don't need to do all the builing steps.
This commit optimizes the workflow by only doing the
necessary steps when we are just checking for
vulnerabilities, so during pull requests
without label "preview" we skip the build steps,
and we do not activate QEMU.
2026-02-25 14:40:38 +01:00
Anthony LC
a8212753aa 🩺(trivy) add trivyignore file and add minimatch CVE
We added a .trivyignore file to ignore the
CVE-2026-26996 vulnerability coming from the y-provider
image.
We also updated the docker-hub.yml workflow to
use this .trivyignore file when scanning our
Docker images with Trivy.
2026-02-25 11:14:02 +01:00
Anthony LC
c37dc8dd34 🐛(frontend) fix callout block spacing for old browsers
On the old Firefox versions, the spacing of the
callout block was not applied correctly.
We changed the "white-space" property to "pre-wrap"
to ensure that the spacing is applied correctly on
all browsers.
2026-02-24 15:45:49 +01:00
Anthony LC
e323af2cdb 🐛(y-provider) use CONVERSION_FILE_MAX_SIZE settings
The settings CONVERSION_FILE_MAX_SIZE was not used
in the y-provider, which caused a 413 Payload
Too Large error when trying to convert a file larger
than 500kb.
This commit updates the y-provider to use the
CONVERSION_FILE_MAX_SIZE settings, allowing it to
handle larger files without throwing an error.
CONVERSION_FILE_MAX_SIZE should follow the same
value as the one defined in the backend settings,
which is 20mb by default.
2026-02-24 14:26:08 +01:00
Sylvain Boissel
9f9f26974c 🚸(backend) update missing doc management in onboarding sandbox feature
Update _duplicate_onboarding_sandbox_document() to return immediately
if the doc defined in settings can't be found.
2026-02-23 16:29:08 +01:00
Sylvain Boissel
c80e7d05bb 🚸(backend) add onboarding docs for new users
Adds two methods to allow new users to start with some docs.

User._handle_onboarding_documents_access() gives READER access to
each document listed in settings.USER_ONBOARDING_DOCUMENTS.

User._duplicate_onboarding_sandbox_document() creates a local copy
of the sandbox document specified in
settings.USER_ONBOARDING_SANDBOX_DOCUMENT.
2026-02-23 16:29:08 +01:00
Sylvain Boissel
5d5ac0c1c8 (backend) allow the duplication of subpages
Adds a new with_descendants parameter to the doc duplication API.
The logic of the duplicate() method has been moved to a new
internal _duplicate_document() method to allow for recursion.
Adds unit tests for the new feature.
2026-02-23 15:31:19 +01:00
Stephan Meijer
d0b756550b 👷(docker) add arm64 platform support for image builds
Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
2026-02-19 17:38:18 +01:00
Cyril
010ed4618a (frontend) add floating bar with collapse button
Add sticky floating bar at top of document with leftpanelcollapse btn
2026-02-19 13:10:48 +01:00
Chaïb Martinez
c0994d7d1f (tracking) add UTM parameters to shared document links
Add utm_source=docssharelink and utm_campaign={docId} query parameters
to shared document links (copy link and invitation emails).

Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2026-02-19 10:43:48 +01:00
Manuel Raynaud
fa0c3847e4 🐛(hub) fix mistake in docker user
Remove :-1000 after docker user in github workflows
2026-02-16 11:43:24 +01:00
Manuel Raynaud
49871c45b1 🐛(helm) reverse liveness and readiness for backend deployment
The liveness and readiness are reversed. The liveness was using the
heartbeat process that is cheking all django checks and the database
connection.
2026-02-13 09:51:41 +01:00
Manuel Raynaud
2cc0d71b89 🐛(helm) use celery resources instead of backend resources
In the celery deployment, the backend resources are used and not the one
from the celery values.
2026-02-13 09:31:51 +01:00
dtinth-ampere-devbox
33785440c6 👷(CI) add GHCR workflow for forked repo testing
Add workflow_dispatch-triggered workflow that builds and pushes images
to GitHub Container Registry (ghcr.io). This allows forked repositories
to build their own images for testing without requiring Docker Hub
credentials.

Images are tagged with branch names, semver tags, and commit SHA for
easy testing of specific builds.

Signed-off-by: dtinth on MBP M1 <dtinth@spacet.me>
2026-02-12 14:08:24 +01:00
Anthony LC
75c7811755 💄(frontend) align colors with theme from figma
Some colors were not exactly the same as the ones
in figma, this commit aligns them with the theme
tokens.
2026-02-12 12:53:51 +01:00
Anthony LC
f4cb66d6b6 💄(frontend) Title header optional
On the DSFR instance the title will not
be displayed anymore in favor of
a icon that include the title.
So we make the title optional, it
will be configurable from the
theme configuration.
2026-02-12 12:53:30 +01:00
Anthony LC
57dc56f83e 🎨(frontend) improve overriding from configuration theme
We were partially overriding the frontend with the
cunningham theme meaning at build time. We stop to
do this way to do it only from the configuration
theme. This way it will be easier to maintain and
to update.
We improve as well the typing with more global types
like Image type from logo and icons, and HTMLLinkElement
type for the favicon, meaning you can really
override compoments from the configuration theme.
2026-02-12 12:53:30 +01:00
Cyril
de1a0e4a73 ️(frontend) prevent dates from being focusable
Keep date links clickable with mouse while removing keyboard focus.
2026-02-12 11:40:29 +01:00
BEY Quentin
17cb213ecd 🚸(oidc) ignore case when fallback on email
Some identity providers might change the case, but in our products we
don't consider case variation to be consider as different email
addresses.

Next step would be to normalize the DB value of email to be lower-case.
2026-02-11 18:48:51 +00:00
Sylvain Boissel
3ab0a47c3a (backend) manage reconciliation requests for user accounts (#1878)
For now, the reconciliation requests are imported through CSV in the
Django admin, which sends confirmation email to both addresses. When
both are checked, the actual reconciliation is processed, and all
user-related content is updated.

## Purpose

Fix #1616 // Replaces #1708

For now, the reconciliation requests are imported through CSV in the
Django admin, which sends confirmation email to both addresses. When
both are checked, the actual reconciliation is processed, and all
user-related content is updated.


## Proposal
- [x] New `UserReconciliationCsvImport` model to manage the import of
reconciliation requests through a task
(`user_reconciliation_csv_import_job`)
- [x] New `UserReconciliation` model to store the user reconciliation
requests themselves (a row = a `active_user`/`inactive_user` pair)
  - [x] On save, a confirmation email is sent to the users
- [x] A `process_reconciliation` admin action process the action on the
requested entries, if both emails have been checked.
- [x] Bulk update the `DocumentAccess` items, while managing the case
where both users have access to the document (keeping the higher role)
- [x] Bulk update the `LinkTrace` items, while managing the case where
both users have link traces to the document
- [x] Bulk update the `DocumentFavorite` items, while managing the case
where both users have put the document in their favorites
- [x] Bulk update the comment system items (`Thread`, `Comment` and
`Reaction` items)
  - [x] Bulk update the `is_active` status on both users
- [x] New `USER_RECONCILIATION_FORM_URL` env variable for the "make a
new request" URL in an email.
- [x] Write unit tests
- [x] Remove the unused `email_user()` method on `User`, replaced with
`send_email()` similar to the one on the `Document` model


## Demo page reconciliation success

<img width="1149" height="746" alt="image"
src="https://github.com/user-attachments/assets/09ba2b38-7af3-41fa-a64f-ce3c4fd8548d"
/>

---------

Co-authored-by: Anthony LC <anthony.le-courric@mail.numerique.gouv.fr>
2026-02-11 18:09:20 +00:00
Sylvain Boissel
685464f2d7 🚸(backend) sort user search results by proximity with the active user (#1802)
## Purpose
Allows a user to find more easily the other users they search, with the
following order of priority:
- users they already share documents with (more recent first)
- users that share the same full email domain
- ~~users that share the same partial email domain (last two parts)~~
- ~~other users~~

Edit: We need to ilter out other users in order to not reveal email
addresses from members of other organisations. It's still possible to
invite them by email.

Solves #1521

## Proposal
- [x] Add a new function in `core/utils.py`:
`users_sharing_documents_with()`
- [x] Use it as a key to sort the results of a basic user search
- [x] Filter user results to avoid reveal of users (and email addresses)
of other orgs or that have not been interacted with.
- [x] User research through "full" email address (contains the '@') is
left unaffected.

---------

Co-authored-by: Anthony LC <anthony.le-courric@mail.numerique.gouv.fr>
2026-02-11 18:51:45 +01:00
virgile-dev
9af540de35 📝(readme) replace demo link (#1875)
so that the sandbox is not a public gov one

Signed-off-by: virgile-deville <virgile.deville@beta.gouv.fr>
2026-02-11 16:48:24 +00:00