GareArc
d2e1177478
fix: use UnauthorizedAndForceLogout to trigger frontend logout on license expiry
...
Change license check to raise UnauthorizedAndForceLogout exception instead
of returning generic JSON response. This ensures proper frontend handling:
Frontend behavior (service/base.ts line 588):
- Checks if code === 'unauthorized_and_force_logout'
- Executes globalThis.location.reload()
- Forces user logout and redirect to login page
- Login page displays license expiration UI (already exists)
Response format:
- HTTP 401 (not 403)
- code: "unauthorized_and_force_logout"
- Triggers frontend reload which clears auth state
This completes the license enforcement flow:
1. Backend blocks all business APIs when license expires
2. Backend returns proper error code to trigger logout
3. Frontend reloads and redirects to login
4. Login page shows license expiration message
2026-03-04 20:40:29 -08:00
GareArc
8a21fd88fd
feat: add global license check middleware to block API access on expiry
...
Add before_request middleware that validates enterprise license status
for all /console/api endpoints when ENTERPRISE_ENABLED is true.
Behavior:
- Checks license status before each console API request
- Returns 403 with clear error message when license is expired/inactive/lost
- Exempts auth endpoints (login, oauth, forgot-password, etc.)
- Exempts /console/api/features so frontend can fetch license status
- Gracefully handles errors to avoid service disruption
This ensures all business APIs are blocked when license expires,
addressing the issue where APIs remained callable after expiry.
2026-03-04 20:40:29 -08:00
GareArc
1c1bcc67da
fix: handle enterprise API errors properly to prevent KeyError crashes
...
When enterprise API returns 403/404, the response contains error JSON
instead of expected data structure. Code was accessing fields directly
causing KeyError → 500 Internal Server Error.
Changes:
- Add enterprise-specific error classes (EnterpriseAPIError, etc.)
- Implement centralized error validation in EnterpriseRequest.send_request()
- Extract error messages from API responses (message/error/detail fields)
- Raise domain-specific errors based on HTTP status codes
- Preserve backward compatibility with raise_for_status parameter
This prevents KeyError crashes and returns proper HTTP error codes
(403/404) instead of 500 errors.
2026-03-04 19:55:03 -08:00
Stephen Zhou
a4373d8b7b
chore: i18n hmr support, fix hmr for app context ( #32997 )
2026-03-05 10:45:16 +08:00
Eric Cao
164ccb7c48
chore: add TypedDict related prompt to AGENTS.md ( #32995 )
...
Co-authored-by: caoergou <caogou123@163.com>
2026-03-05 10:08:18 +09:00
木之本澪
2b5ce196ad
test: migrate test_document_service_rename_document SQL tests to testcontainers ( #32542 )
...
Co-authored-by: KinomotoMio <200703522+KinomotoMio@users.noreply.github.com>
2026-03-05 10:07:29 +09:00
dependabot[bot]
2977a4d2a4
chore(deps): bump immutable from 5.1.4 to 5.1.5 in /web ( #33000 )
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-05 09:50:52 +09:00
dependabot[bot]
a0331b8b45
chore(deps): bump authlib from 1.6.6 to 1.6.7 in /api ( #32998 )
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-05 09:50:12 +09:00
dependabot[bot]
914bd4d00d
chore(deps): bump fickling from 0.1.8 to 0.1.9 in /api ( #32999 )
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-05 09:49:43 +09:00
yyh
9c9cb50981
chore: expand overlay migration ESLint rules to popover, dropdown, dialog ( #33001 )
2026-03-05 08:47:54 +08:00
木之本澪
df3c66a8ac
test: migrate duplicate_document_indexing_task SQL tests to testcontainers ( #32540 )
...
Co-authored-by: KinomotoMio <200703522+KinomotoMio@users.noreply.github.com>
2026-03-05 02:35:24 +09:00
Stephen Zhou
7252ce6f26
chore: add react refresh plugin for vinext ( #32996 )
2026-03-05 01:09:32 +08:00
Stephen Zhou
110063871c
chore: clean up sw file ( #32973 )
2026-03-04 18:18:20 +08:00
Stephen Zhou
336957b4be
chore: drop pwa with serwist ( #32838 )
2026-03-04 17:35:35 +08:00
Coding On Star
5385ec3023
test(workflow): add comprehensive hooks unit tests and refactor test infrastructure (Part 3) ( #32958 )
...
Co-authored-by: CodingOnStar <hanxujiang@dify.com>
2026-03-04 17:24:50 +08:00
yyh
5a3348ec8d
chore: refine oRPC contract-first skill guidance ( #32955 )
...
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-03-04 16:45:37 +08:00
wangxiaolei
882b4c9ef6
refactor: document extract node decouple ssrf_proxy ( #32949 )
2026-03-04 16:01:43 +08:00
Stephen Zhou
b8a4e0c13b
refactor: do not import i18n resource json to split chunk ( #32947 )
2026-03-04 14:28:06 +08:00
L1nSn0w
3aed24c507
fix(api): decouple enterprise default-workspace join from personal workspace creation ( #32938 )
2026-03-04 14:16:23 +08:00
QuantumGhost
e1e1f81bde
perf(api): utilize the message_workflow_run_id_idx while querying messages ( #32944 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-04 14:11:14 +08:00
yyh
84dca83ecd
feat(web): add base AlertDialog with app-card migration example ( #32933 )
...
Signed-off-by: yyh <yuanyouhuilyz@gmail.com>
2026-03-04 13:56:27 +08:00
yyh
dfc6de69c3
refactor(web): migrate Button to Base UI with focus-visible ( #32941 )
...
Signed-off-by: yyh <yuanyouhuilyz@gmail.com>
2026-03-04 13:55:13 +08:00
Renzo
ad000c42b7
feat: replace db.session with db_session_with_containers ( #32942 )
2026-03-04 14:50:41 +09:00
wangxiaolei
2f4c740d46
feat: support redis xstream ( #32586 )
2026-03-04 13:18:55 +08:00
wangxiaolei
e14b09d4db
refactor: human input node decouple db ( #32900 )
2026-03-04 13:18:32 +08:00
wangxiaolei
b584434e28
feat: redis connection support max connections ( #32935 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-04 11:52:43 +08:00
yyh
b68ee600c1
refactor: migrate workflow onboarding modal to base dialog ( #32915 )
2026-03-04 11:13:43 +08:00
Coding On Star
3398962bfa
test(workflow): add unit tests for workflow store slices ( #32932 )
...
Co-authored-by: CodingOnStar <hanxujiang@dify.com>
2026-03-04 10:59:31 +08:00
Stephen Zhou
3bf7bb1781
chore: fix load env and treeshaking for vinext ( #32928 )
2026-03-04 10:07:29 +08:00
yyh
1c1edb4a22
fix: keep account dropdown open when switching theme ( #32918 )
2026-03-04 09:53:36 +08:00
yyh
477bf6e075
fix(web): align dropdown-menu styles with Figma design ( #32922 )
2026-03-04 09:53:15 +08:00
木之本澪
6002fd09b4
test: migrate test_dataset_service_create_dataset SQL tests to testcontainers ( #32538 )
...
Co-authored-by: KinomotoMio <200703522+KinomotoMio@users.noreply.github.com>
2026-03-04 03:40:18 +09:00
Br1an
2b47db0462
fix(api): resolve OpenTelemetry histogram type mismatch ( #32771 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-04 00:01:16 +09:00
nightcityblade
664ab123c3
chore: add dependency groups to Dependabot config ( #32721 )
2026-03-03 23:30:36 +09:00
Stephen Zhou
d7e399872d
fix: get i18n lazy, make vinext build works ( #32917 )
2026-03-03 21:42:47 +08:00
木之本澪
65bf632ec0
test: migrate test_dataset_service_batch_update_document_status SQL tests to testcontainers ( #32537 )
...
Co-authored-by: KinomotoMio <200703522+KinomotoMio@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-03 20:29:58 +09:00
yyh
1a90c4d81b
refactor(web): migrate document list query state to nuqs ( #32339 )
2026-03-03 18:29:23 +08:00
yyh
3a8ff301fc
test(web): add high-quality unit tests for Base UI wrapper primitives ( #32904 )
2026-03-03 18:21:33 +08:00
yyh
7f67e1a2fc
feat(web): overlay migration guardrails + Base UI primitives ( #32824 )
...
Signed-off-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-03 16:56:13 +08:00
Stephen Zhou
5e79d35881
fix: downgrade node version to 22 ( #32897 )
...
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-03-03 16:00:56 +08:00
FFXN
2068640a4b
fix: Add the missing validation of doc_form in the service API. ( #32892 )
2026-03-03 15:54:43 +08:00
99
c8688ec371
refactor(dify_graph): unify invoke and user enums source in workflow ( #32873 )
2026-03-03 15:05:20 +08:00
dependabot[bot]
48c8aac092
chore(deps): bump @orpc/client from 1.13.4 to 1.13.6 in /web ( #32883 )
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
2026-03-03 13:50:13 +08:00
dependabot[bot]
56f460e290
chore(deps): bump pypdf from 6.7.4 to 6.7.5 in /api ( #32882 )
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 14:42:05 +09:00
wangxiaolei
1b2234a19f
refactor: TemplateTransformNode decouple code executor ( #32879 )
2026-03-03 13:36:17 +08:00
Coding On Star
4c07bc99f7
refactor(web): restructure app-sidebar with component decomposition and folder organization ( #32887 )
...
Co-authored-by: CodingOnStar <hanxujiang@dify.com>
2026-03-03 13:32:52 +08:00
Stephen Zhou
d6ab36ff1e
chore: update vinext, add workaround ( #32878 )
2026-03-03 11:21:04 +08:00
-LAN-
4fd6b52808
refactor(api): move model_runtime into dify_graph ( #32858 )
2026-03-02 20:15:32 +08:00
wangxiaolei
e985e73bdc
perf: optimize dataset api query speed ( #32847 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-02 18:49:21 +08:00
-LAN-
c917838f9c
refactor: move workflow package to dify_graph ( #32844 )
2026-03-02 18:42:30 +08:00