Commit Graph
156 Commits
Author SHA1 Message Date
yyh 625163705b Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox 2026-02-04 16:59:23 +08:00
Stephen ZhouandGitHub 468990cc39 fix: remove api reference doc link en prefix (#31910) 2026-02-04 14:58:26 +08:00
yyh f1c15e0a17 Revert "refactor!: migrate commonLayout to SSR prefetch with TanStack Query hydration"
This reverts commit 2833965815.
2026-02-01 19:06:45 +08:00
yyh e2913d9ee1 Revert "refactor!: replace Zustand global store with TanStack Query for systemFeatures"
This reverts commit 806ece9a67.
2026-02-01 19:06:45 +08:00
yyh 806ece9a67 refactor!: replace Zustand global store with TanStack Query for systemFeatures
Follow-up to SSR prefetch migration (2833965). Eliminates the Zustand
middleman that was syncing TanStack Query data into a separate store.

- Remove useGlobalPublicStore Zustand store entirely
- Create hooks/use-global-public.ts with useSystemFeatures,
  useSystemFeaturesQuery, useIsSystemFeaturesPending, useSetupStatusQuery
- Migrate all 93 consumers to import from @/hooks/use-global-public
- Simplify global-public-context.tsx to a thin provider component
- Update 18 test files to mock the new hook interface
- Fix SetupStatusResponse.setup_at type from Date to string (JSON)
- Fix setup-status.spec.ts mock target to match consoleClient

BREAKING CHANGE: useGlobalPublicStore is removed. Use useSystemFeatures()
from @/hooks/use-global-public instead.
2026-02-01 19:06:08 +08:00
yyh 2833965815 refactor!: migrate commonLayout to SSR prefetch with TanStack Query hydration
BREAKING CHANGE: commonLayout is now an async Server Component that
prefetches user-profile and current-workspace on the server via
TanStack Query's prefetchQuery + HydrationBoundary pattern. This
replaces the previous purely client-side data fetching approach.

Key changes:

- **SSR data prefetch (root layout)**: prefetch systemFeatures and
  setupStatus in the root layout server component, wrap children with
  HydrationBoundary to hydrate TanStack Query cache on the client.

- **SSR data prefetch (commonLayout)**: convert commonLayout from a
  client component to an async server component that prefetches
  user-profile (with x-version/x-env response headers) and
  current-workspace. Client-side providers/UI extracted to a new
  layout-client.tsx component.

- **Add loading.tsx (Next.js convention)**: add a Next.js loading.tsx
  file in commonLayout that shows a centered spinner. This replaces the
  deleted Splash component but works via Next.js built-in Suspense
  boundary for route segments, not a client-side overlay.

- **Extract shared SSR fetch utilities (utils/ssr-fetch.ts)**: create
  serverFetch (unauthenticated) and serverFetchWithAuth (with cookie
  forwarding + CSRF token). getAuthHeaders is wrapped with React.cache()
  for per-request deduplication across multiple SSR fetches.

- **Refactor AppInitializer**: split single monolithic async IIFE effect
  into three independent useEffects (oauth tracking, education verify,
  setup status check). Use useReducer for init flag, useRef to prevent
  duplicate tracking in StrictMode. Now reads setupStatus from TanStack
  Query cache (useSetupStatusQuery) instead of fetching independently.

- **Refactor global-public-context**: move Zustand store sync from
  queryFn side-effect to a dedicated useEffect, keeping queryFn pure.
  fetchSystemFeatures now simply returns the API response.

- **Fix usePSInfo SSR crash**: defer globalThis.location access from
  hook top-level to callback execution time via getDomain() helper,
  preventing "Cannot read properties of undefined" during server render.

- **Remove Splash component**: delete the client-side loading overlay
  that relied on useIsLogin polling, replaced by Next.js loading.tsx.

- **Remove staleTime/gcTime overrides in useUserProfile**: allow the
  SSR-prefetched data to be reused via default cache policy instead of
  forcing refetch on every mount.

- **Revert middleware auth guard**: remove the cookie-based session
  check in proxy.ts that caused false redirects to /signin for
  authenticated users (Dify's auth uses token refresh, not simple
  cookie presence).
2026-02-01 18:29:41 +08:00
zhsamaandSisyphus 473262d70e refactor: type event emitter payloads
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <[email protected]>
2026-01-31 00:04:57 +08:00
QuantumGhostGitHubautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
90fe9abab7 revert: revert human input relevant code (#31766)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-30 19:18:49 +08:00
Stephen ZhouandGitHub b7e752078c fix: trigger doc link (#31754) 2026-01-30 17:30:24 +08:00
fedd097f63 feat: Human Input node (Frontend Part) (#31631)
Co-authored-by: JzoNg <[email protected]>
Co-authored-by: Joel <[email protected]>
Co-authored-by: yessenia <[email protected]>
Co-authored-by: QuantumGhost <[email protected]>
2026-01-30 10:16:46 +08:00
b9f718005c feat: frontend part of support try apps (#31287)
Co-authored-by: CodingOnStar <[email protected]>
Co-authored-by: yyh <[email protected]>
2026-01-22 18:16:37 +08:00
036f6ef5ab fix: following docs link fix (#31390)
Co-authored-by: Riskey <[email protected]>
2026-01-22 15:02:37 +08:00
061feebd87 fix: check and update doc links (#30849)
Co-authored-by: Riskey <[email protected]>
2026-01-21 16:31:48 +08:00
91da784f84 refactor: init orpc contract (#30885)
Co-authored-by: yyh <[email protected]>
2026-01-13 23:38:28 +09:00
yyhandGitHub 1fbdf6b465 refactor(web): setup status caching (#30798) 2026-01-13 16:59:49 +08:00
9161936f41 refactor(web): extract isServer/isClient utility & upgrade Node.js to 22.12.0 (#30803)
Co-authored-by: Stephen Zhou <[email protected]>
2026-01-12 12:57:43 +08:00
d4432ed80f refactor: marketplace state management (#30702)
Co-authored-by: Claude Opus 4.5 <[email protected]>
2026-01-09 14:31:24 +08:00
cd1af04dee feat: model total credits (#30727)
Co-authored-by: CodingOnStar <[email protected]>
Co-authored-by: Stephen Zhou <[email protected]>
2026-01-08 14:11:44 +08:00
e335cd0ef4 refactor(web): remove useMixedTranslation, better resource loading (#30630)
Co-authored-by: Claude Opus 4.5 <[email protected]>
2026-01-07 13:20:09 +08:00
Coding On StarandGitHub c29cfd18f3 feat: revert model total credits (#30518) 2026-01-04 18:29:19 +08:00
84cbf0526d feat: model total credits (#26942)
Co-authored-by: CodingOnStar <[email protected]>
Co-authored-by: Stephen Zhou <[email protected]>
2026-01-04 15:26:37 +08:00
yyhandGitHub f28a08a696 fix: correct useEducationStatus query cache configuration (#30416) 2025-12-31 13:51:05 +08:00
yyhandGitHub 2aaaa4bd34 feat(web): migrate from es-toolkit/compat to native es-toolkit (#30244) (#30246) 2025-12-31 11:13:22 +08:00
Stephen ZhouandGitHub 1873b5a766 chore: remove useless __esModule (#30366) 2025-12-30 15:37:16 +08:00
2399d00d86 refactor(i18n): about locales (#30336)
Co-authored-by: yyh <[email protected]>
2025-12-30 14:38:23 +08:00
yyhandGitHub 673209d086 refactor(web): organize devtools components (#30318) 2025-12-30 09:21:41 +08:00
Stephen ZhouGitHubyyhautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
6d0e36479b refactor(i18n): use JSON with flattened key and namespace (#30114)
Co-authored-by: yyh <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-12-29 14:52:32 +08:00
3ae7788933 refactor(query-state): migrate query param state management to nuqs (#30184)
Co-authored-by: Stephen Zhou <[email protected]>
Co-authored-by: Copilot <[email protected]>
2025-12-29 11:24:54 +08:00
yyhandGitHub 1e86535c4a refactor(web): Migrate to Unified TanStack Devtools (#30279) 2025-12-29 09:43:44 +08:00
yyhandGitHub 3cbbb06dc4 chore(web): migrate lodash-es to es-toolkit compat (#30126) 2025-12-25 09:44:57 +08:00
Stephen ZhouandGitHub 403adefc07 chore: lint require and how to import react (#30041) 2025-12-23 18:02:10 +08:00
f2842da397 chore(web): new lint setup (#30020)
Co-authored-by: yyh <[email protected]>
2025-12-23 16:58:55 +08:00
eabdc5f0eb refactor(web): migrate to Vitest and esm (#29974)
Co-authored-by: Claude Opus 4.5 <[email protected]>
Co-authored-by: yyh <[email protected]>
2025-12-22 16:35:22 +08:00
yyhandGitHub 079620714e refactor: migrate common service toward TanStack Query (#29009) 2025-12-19 17:34:14 +08:00
91e5db3e83 chore: Advance the timing of the dataset payment prompt (#29497)
Co-authored-by: yyh <[email protected]>
Co-authored-by: twwu <[email protected]>
Co-authored-by: Copilot <[email protected]>
2025-12-11 15:49:42 +08:00
18601d8b38 Refactor datasets service toward TanStack Query (#29008)
Co-authored-by: Wu Tianwei <[email protected]>
2025-12-09 13:48:23 +08:00
JoelandGitHub e6d504558a chore: remove log in test case (#29284) 2025-12-08 17:47:16 +08:00
0cb696b208 chore: add provider context mock (#29201)
Co-authored-by: Copilot <[email protected]>
2025-12-08 17:23:45 +08:00
fbb2d076f4 integrate Amplitude analytics into the application (#29049)
Co-authored-by: CodingOnStar <[email protected]>
Co-authored-by: Joel <[email protected]>
2025-12-03 14:22:12 +08:00
Coding On StarGitHubCodingOnStar姜涵煦autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
dbecba710b frontend auto testing rules (#28679)
Co-authored-by: CodingOnStar <[email protected]>
Co-authored-by: 姜涵煦 <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-11-26 15:18:07 +08:00
MariesGitHublyzno1lyzno1autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
a1b735a4c0 feat: trigger billing (#28335)
Signed-off-by: lyzno1 <[email protected]>
Co-authored-by: lyzno1 <[email protected]>
Co-authored-by: lyzno1 <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-11-20 10:15:23 +08:00
+4
YeuolyGitHubStreamlyzno1zhsamaHarrylyzno1yesseniahjlarrygemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>WTW0313Copilot
b76e17b25d feat: introduce trigger functionality (#27644)
Signed-off-by: lyzno1 <[email protected]>
Co-authored-by: Stream <[email protected]>
Co-authored-by: lyzno1 <[email protected]>
Co-authored-by: zhsama <[email protected]>
Co-authored-by: Harry <[email protected]>
Co-authored-by: lyzno1 <[email protected]>
Co-authored-by: yessenia <[email protected]>
Co-authored-by: hjlarry <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: WTW0313 <[email protected]>
Co-authored-by: Copilot <[email protected]>
2025-11-12 17:59:37 +08:00
NFishandGitHub fe50093c18 fix: prevent fetch version info in enterprise edition (#27923) 2025-11-06 17:59:53 +08:00
29afc0657d Fix/27468 in dify 192 the iframe embed cannot pass the user id in system variable (#27524)
Co-authored-by: Copilot <[email protected]>
2025-10-28 09:19:54 +08:00
GuanMuandGitHub 43bcf40f80 refactor: update installed app component to handle missing params and improve type safety (#27331) 2025-10-27 14:38:58 +08:00
GuanMuandGitHub bebb4ffbaa Fix type error (#27217) 2025-10-22 11:43:37 +08:00
d6e7543ba6 fix: passport outdate caused webapp reload (#27175)
Co-authored-by: Copilot <[email protected]>
2025-10-21 11:47:28 +08:00
+24
-LAN-GitHubCopilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>Yunlu WenJoelGareArcNFishDavide Delbiancominglu7Pondercrazywoolagemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>heysztAsuka MinatoGuangdong LiuEric GuoNeatGuyCodingXlKsytDhruv Gorasiyacrazywoolagithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>lyzno1hj24GuanMu非法操作CopilotTonloYusuke YamadaNovicekenwoodjwAdemílson Tonatoznnyangzheli
9a5f214623 refactor: replace localStorage with HTTP-only cookies for auth tokens (#24365)
Signed-off-by: NeatGuyCoding <[email protected]>
Signed-off-by: lyzno1 <[email protected]>
Signed-off-by: kenwoodjw <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Yunlu Wen <[email protected]>
Co-authored-by: Joel <[email protected]>
Co-authored-by: GareArc <[email protected]>
Co-authored-by: NFish <[email protected]>
Co-authored-by: Davide Delbianco <[email protected]>
Co-authored-by: minglu7 <[email protected]>
Co-authored-by: Ponder <[email protected]>
Co-authored-by: crazywoola <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: heyszt <[email protected]>
Co-authored-by: Asuka Minato <[email protected]>
Co-authored-by: Guangdong Liu <[email protected]>
Co-authored-by: Eric Guo <[email protected]>
Co-authored-by: NeatGuyCoding <[email protected]>
Co-authored-by: XlKsyt <[email protected]>
Co-authored-by: Dhruv Gorasiya <[email protected]>
Co-authored-by: crazywoola <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: lyzno1 <[email protected]>
Co-authored-by: hj24 <[email protected]>
Co-authored-by: GuanMu <[email protected]>
Co-authored-by: 非法操作 <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Tonlo <[email protected]>
Co-authored-by: Yusuke Yamada <[email protected]>
Co-authored-by: Novice <[email protected]>
Co-authored-by: kenwoodjw <[email protected]>
Co-authored-by: Ademílson Tonato <[email protected]>
Co-authored-by: znn <[email protected]>
Co-authored-by: yangzheli <[email protected]>
2025-10-19 21:29:04 +08:00
GuanMuandGitHub 650e38e17f refactor: improve TypeScript types for NodeCardProps and debug configuration context (#27001) 2025-10-16 22:16:01 +08:00
+10
-LAN-GitHubtwwucrazywoolajyongWu TianweiQuantumGhostlyzno1quicksandJyonglyzno1zxhlyhYongtao Huangautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>JoelCopilotnite-kniteHanqing Zhaogemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>Harry
85cda47c70 feat: knowledge pipeline (#25360)
Signed-off-by: -LAN- <[email protected]>
Co-authored-by: twwu <[email protected]>
Co-authored-by: crazywoola <[email protected]>
Co-authored-by: jyong <[email protected]>
Co-authored-by: Wu Tianwei <[email protected]>
Co-authored-by: QuantumGhost <[email protected]>
Co-authored-by: lyzno1 <[email protected]>
Co-authored-by: quicksand <[email protected]>
Co-authored-by: Jyong <[email protected]>
Co-authored-by: lyzno1 <[email protected]>
Co-authored-by: zxhlyh <[email protected]>
Co-authored-by: Yongtao Huang <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Joel <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: nite-knite <[email protected]>
Co-authored-by: Hanqing Zhao <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Harry <[email protected]>
2025-09-18 12:49:10 +08:00