Commit Graph

55 Commits

Author SHA1 Message Date
yyh
2ab0b334a8 Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox
# Conflicts:
#	web/app/components/rag-pipeline/components/update-dsl-modal.tsx
#	web/app/components/workflow-app/hooks/use-nodes-sync-draft.ts
#	web/app/components/workflow/variable-inspect/utils.tsx
#	web/app/layout.tsx
#	web/context/event-emitter.tsx
#	web/eslint-suppressions.json
#	web/next.config.ts
#	web/package.json
#	web/pnpm-lock.yaml
#	web/types/feature.ts
2026-02-10 18:12:41 +08:00
Stephen Zhou
f355c8d595 refactor: type safe env, update to zod v4 (#32035) 2026-02-10 17:55:11 +08:00
yyh
ce8c484ab8 fix(workflow): show clear all button when any inspect tab has data
Previously the button visibility was tab-dependent, hiding it when
switching to an empty tab even if the other tab had data.
2026-02-10 17:14:12 +08:00
yyh
db0c527ce8 Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox 2026-02-09 18:43:04 +08:00
yyh
724700acc4 test(workflow): add regression coverage for artifacts download query reset
Add a component-level regression test for variable inspect artifacts tab:\n- verifies selected file path is used before reset\n- verifies stale selected path is dropped after files are cleared\n- verifies download url query call keeps retry disabled in this component
2026-02-07 22:50:47 +08:00
yyh
2b848d7e93 fix(workflow): prevent redundant sandbox download refetch after reset
Problem:\n- In variable inspect artifacts view, clicking Reset All invalidates sandbox download query keys.\n- If a previously selected file has been removed, the download-url query may still refetch with stale path and return 400.\n- Default query retry amplifies this into repeated failed requests in this scenario.\n\nSolution:\n- Extend sandbox file invalidation with an option to skip download query refetch.\n- Use that option in Reset All flow so download-url queries are marked stale without immediate refetch.\n- Derive selected file path from latest sandbox flat data and disable download-url query when file no longer exists.\n- Disable retry only for artifacts-tab download-url query to avoid repeated 400 retries in this path.\n- Align tree selectedPath with derived selectedFilePath and add hook tests for invalidation behavior.\n\nValidation:\n- pnpm vitest --run service/use-sandbox-file.spec.tsx
2026-02-07 22:43:13 +08:00
yyh
11d5efc13e refactor(skill): regroup skill body, file tree, and tree hooks 2026-02-07 14:20:01 +08:00
yyh
eb87512122 fix: scope Reset All button visibility to current tab's data
Show the button only when the active tab has data, preventing
the empty-list-with-button scenario on the Variables tab when
only artifacts exist.
2026-02-05 11:43:54 +08:00
yyh
740fafc926 feat: show Reset All button on both variable inspect tabs
- Change Reset All button visibility from Variables-tab-only to both tabs,
  displaying when either variables or artifacts have data
- Invalidate sandbox files cache in deleteAllInspectorVars alongside
  existing conversation/system var invalidations
2026-02-05 11:30:53 +08:00
yyh
d0200e90d2 feat: poll sandbox files every 5s during workflow/chatflow runs
Add conditional refetchInterval to Artifacts components so the file
list refreshes automatically while a workflow debug run or chatflow
preview is in progress, stopping once the run completes.
2026-02-04 16:59:09 +08:00
yyh
178421a8ac fix: pass appId instead of userId to sandbox file API calls
The backend route /apps/{app_id}/sandbox/files expects the actual app ID
as the URL parameter and derives sandbox_id from the logged-in user
internally. The frontend was incorrectly passing userProfile.id (user ID)
as the appId, resulting in wrong storage paths.
2026-02-03 17:59:21 +08:00
zhsama
be96e6032e refactor: add json schema type guard 2026-01-31 00:57:45 +08:00
zhsama
078e2d7150 refactor: streamline variable inspect editor state 2026-01-31 00:31:26 +08:00
zhsama
473262d70e refactor: type event emitter payloads
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-31 00:04:57 +08:00
zhsama
51ffab8a1a refactor: type variable inspect handlers
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-31 00:04:57 +08:00
zhsama
3bdc16ac5f refactor: make validateJSONSchema type-safe
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-30 23:30:51 +08:00
zhsama
ea91f96924 refactor: Replace hardcoded string checks with VarType enum 2026-01-30 21:51:03 +08:00
yyh
acc8671c28 fix: hide artifacts tab in variable inspect panel for classic mode
Guard variable-inspect from rendering artifacts-related UI and API calls
when sandbox is not enabled, preventing unnecessary sandbox-file requests.
2026-01-30 16:10:17 +08:00
yyh
ff71816373 refactor: use query data for selected file download, keep mutation for tree downloads
The toolbar download button now uses the already-fetched download URL
from useQuery (zero extra requests), while tree node downloads keep
using useMutation with React Query-managed isPending state instead of
a hand-rolled useState wrapper.
2026-01-29 20:48:58 +08:00
yyh
5c91311077 fix: use downloadUrl utility instead of window.open for file downloads
Replace window.open with downloadUrl from utils/download to trigger
proper file downloads instead of opening files in a new browser tab.
2026-01-29 17:05:01 +08:00
yyh
76484406a2 feat(inspect): add read-only file preview in ArtifactsTab
Implement ReadOnlyFilePreview to render sandbox files by type
(code, markdown, image, video, SQLite, unsupported) using existing
skill viewer components with readOnly support. Add
useSandboxFileDownloadUrl and useFetchTextContent hooks for data
fetching, and generalize useFileTypeInfo to accept any file-like
object.
2026-01-29 16:42:22 +08:00
yyh
8185d146b6 fix(inspect): extract ArtifactsEmpty component and align split-panel empty state
Extract shared empty state card into ArtifactsEmpty component to
deduplicate the no-files and no-selection empty states. Align the
split-panel right-side empty state with the variables tab pattern.
Remove FC type annotations in favor of inline parameter types.
2026-01-29 14:38:08 +08:00
yyh
d73a36d6bc fix(inspect): add aria-hidden to decorative icon and use stable keys for path breadcrumb
Mark the empty state SearchLinesSparkle icon as aria-hidden for screen
readers. Replace array-index keys with cumulative path keys (O(n) vs
O(n²)) to satisfy react/no-array-index-key and improve key stability.
2026-01-29 14:20:12 +08:00
yyh
3ad05be9ca fix(inspect): align artifacts empty state with variables empty state design
Replace the minimal centered text card in artifacts tab empty state with
a full-height card layout matching the variables tab, including icon
container (SearchLinesSparkle), title, description, and learn more link.
2026-01-29 14:04:30 +08:00
yyh
f9f3d33911 fix(variable-inspect): anchor clear button to right side of tab header
Position the clear button relative to the right divider instead of
following the tab labels, ensuring consistent positioning across
different language translations. Also fix tab switching jitter by
setting a fixed header height.
2026-01-28 20:34:23 +08:00
yyh
20d19fead9 fix(web): align variable inspect tabs in empty state
- reserve left column width in empty layout to prevent tab shift
- keep close action aligned with split-panel header
2026-01-28 14:15:55 +08:00
yyh
27639600f9 feat(web): add FileDownload01 icon and use it in artifacts tab
Replace RiDownloadLine with a file-specific download icon for the
artifacts file list and remove the unused copy-path button.
2026-01-28 14:11:18 +08:00
yyh
0b6522df42 refactor(web): extract split layout for variable inspect
- add SplitPanel to share left/right shell and narrow menu handling
- reuse InspectHeaderProps for tab header + actions across tabs
- refactor variables/artifacts tabs to plug into shared split layout
- align right-side header/close behavior and consolidate empty/loading flows
2026-01-28 14:06:34 +08:00
yyh
ef6f7f2a6c refactor: extract InspectLayout composition component to eliminate repeated header/close patterns
Consolidate duplicated TabHeader + close button layout (8 occurrences) into a single
InspectLayout wrapper. Replace boolean props with children slots for better composition.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:50:04 +08:00
yyh
d098e72c13 feat(variable-inspect): add Artifacts tab with sandbox file tree browser
Refactor the variable inspect panel into a tabbed layout with Variables
and Artifacts tabs. Extract variable logic into VariablesTab, add new
ArtifactsTab with sandbox file tree selection and preview pane, and
improve accessibility across tree nodes and interactive elements.
2026-01-27 15:05:11 +08:00
zhsama
54fce5e903 feat: Add @agent icon and implement agent alias variables in workflow
inspector
2026-01-27 02:42:37 +08:00
zhsama
ec5964c419 feat: Add support for array[message](List[promptMessage]) variable type
in workflow
2026-01-26 17:50:18 +08:00
Stephen Zhou
3de33f7a4e fix: check and update doc links (#30849)
Co-authored-by: Riskey <36894937+RiskeyL@users.noreply.github.com>
2026-01-22 16:13:09 +08:00
Stephen Zhou
061feebd87 fix: check and update doc links (#30849)
Co-authored-by: Riskey <36894937+RiskeyL@users.noreply.github.com>
2026-01-21 16:31:48 +08:00
Stephen Zhou
6d0e36479b refactor(i18n): use JSON with flattened key and namespace (#30114)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-12-29 14:52:32 +08:00
yyh
3cbbb06dc4 chore(web): migrate lodash-es to es-toolkit compat (#30126) 2025-12-25 09:44:57 +08:00
Stephen Zhou
403adefc07 chore: lint require and how to import react (#30041) 2025-12-23 18:02:10 +08:00
Stephen Zhou
f2842da397 chore(web): new lint setup (#30020)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
2025-12-23 16:58:55 +08:00
Stephen Zhou
a26881cb24 refactor: unified cn utils (#29916)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
2025-12-19 12:08:34 +08:00
Xiu-Lan
abc13ef762 Feat/web workflow improvements (#27981)
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
Co-authored-by: johnny0120 <johnny0120@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Wood <tuiskuwood@outlook.com>
2025-11-25 19:54:40 +08:00
Yeuoly
b76e17b25d feat: introduce trigger functionality (#27644)
Signed-off-by: lyzno1 <yuanyouhuilyz@gmail.com>
Co-authored-by: Stream <Stream_2@qq.com>
Co-authored-by: lyzno1 <92089059+lyzno1@users.noreply.github.com>
Co-authored-by: zhsama <torvalds@linux.do>
Co-authored-by: Harry <xh001x@hotmail.com>
Co-authored-by: lyzno1 <yuanyouhuilyz@gmail.com>
Co-authored-by: yessenia <yessenia.contact@gmail.com>
Co-authored-by: hjlarry <hjlarry@163.com>
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 <twwu@dify.ai>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-12 17:59:37 +08:00
crazywoola
f0e739be43 fix: immer version and ref in code base (#27130) 2025-10-20 14:49:26 +09:00
Copilot
df43c6ab8a [Chore/Refactor] Implement lazy initialization for useState calls to prevent re-computation (#26252)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asukaminato0721 <30024051+asukaminato0721@users.noreply.github.com>
2025-09-29 20:35:55 +09:00
-LAN-
85cda47c70 feat: knowledge pipeline (#25360)
Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: twwu <twwu@dify.ai>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
Co-authored-by: jyong <718720800@qq.com>
Co-authored-by: Wu Tianwei <30284043+WTW0313@users.noreply.github.com>
Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com>
Co-authored-by: lyzno1 <yuanyouhuilyz@gmail.com>
Co-authored-by: quicksand <quicksandzn@gmail.com>
Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com>
Co-authored-by: lyzno1 <92089059+lyzno1@users.noreply.github.com>
Co-authored-by: zxhlyh <jasonapring2015@outlook.com>
Co-authored-by: Yongtao Huang <yongtaoh2022@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: nite-knite <nkCoding@gmail.com>
Co-authored-by: Hanqing Zhao <sherry9277@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Harry <xh001x@hotmail.com>
2025-09-18 12:49:10 +08:00
yo
5c50c3aa70 fix: allow empty values in Variable Inspector (#25644) 2025-09-14 14:10:12 +08:00
crazywoola
eb52216a9c Revert "example of remove useEffect" (#25418) 2025-09-09 16:23:44 +08:00
Asuka Minato
a9da8edbde example of remove useEffect (#25212) 2025-09-05 17:35:59 +08:00
Yongtao Huang
208ce4e774 CI: add TS indentation check via esLint (#24810) 2025-09-01 15:31:59 +08:00
Joel
dac72b078d feat: support bool type variable frontend (#24437)
Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com>
2025-08-26 18:16:05 +08:00
Joel
de9c5f10b3 feat: enchance prompt and code (#23633)
Co-authored-by: stream <stream@dify.ai>
Co-authored-by: Stream <1542763342@qq.com>
Co-authored-by: Stream <Stream_2@qq.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-08-18 12:29:12 +08:00