dify/web/utils
yyh e819b804ba
refactor(web): add SSR-safe localStorage utility and ESLint rules
Introduce centralized storage utilities to address SSR issues with direct
localStorage access in zustand slices and components. This adds ESLint
rules to prevent future regressions while preserving existing usages
via bulk suppressions.

- Add config/storage-keys.ts for centralized storage key definitions
- Add utils/storage.ts with SSR-safe get/set/remove operations
- Add workflow/store/persist-config.ts for zustand storage adapter
- Add no-restricted-globals and no-restricted-properties ESLint rules
- Migrate workflow slices and related components to use new utilities
2026-01-18 16:01:04 +08:00
..
app-redirection.spec.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
app-redirection.ts feat: introduce trigger functionality (#27644) 2025-11-12 17:59:37 +08:00
classnames.spec.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
classnames.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
client.ts refactor(web): extract isServer/isClient utility & upgrade Node.js to 22.12.0 (#30803) 2026-01-12 12:57:43 +08:00
clipboard.spec.ts refactor(web): migrate to Vitest and esm (#29974) 2025-12-22 16:35:22 +08:00
clipboard.ts fix: resolve clipboard.writeText failure under HTTP protocol (#12936) 2025-01-22 15:18:23 +08:00
completion-params.spec.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
completion-params.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
context.spec.ts chore: lint require and how to import react (#30041) 2025-12-23 18:02:10 +08:00
context.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
draft-07.json feat: Add customized json schema validation (#25408) 2025-09-09 15:15:32 +08:00
emoji.spec.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
emoji.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
encryption.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
error-parser.ts feat: introduce trigger functionality (#27644) 2025-11-12 17:59:37 +08:00
format.spec.ts fix: fix formatNumber accuracy (#30877) 2026-01-13 11:51:15 +08:00
format.ts fix: fix formatNumber accuracy (#30877) 2026-01-13 11:51:15 +08:00
get-icon.spec.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
get-icon.ts Introduce Plugins (#13836) 2025-02-17 17:05:13 +08:00
gtag.ts refactor(web): extract isServer/isClient utility & upgrade Node.js to 22.12.0 (#30803) 2026-01-12 12:57:43 +08:00
index.spec.ts refactor(query-state): migrate query param state management to nuqs (#30184) 2025-12-29 11:24:54 +08:00
index.ts feat(web): migrate from es-toolkit/compat to native es-toolkit (#30244) (#30246) 2025-12-31 11:13:22 +08:00
mcp.spec.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
mcp.ts removing horus eye and adding mcp icon (#25323) 2025-10-10 17:00:03 +08:00
model-config.spec.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
model-config.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
navigation.spec.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
navigation.ts CI: add TS indentation check via esLint (#24810) 2025-09-01 15:31:59 +08:00
permission.spec.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
permission.ts fix: add dataset edit permissions (#13223) 2025-02-06 14:26:16 +08:00
plugin-version-feature.spec.ts refactor(web): migrate to Vitest and esm (#29974) 2025-12-22 16:35:22 +08:00
plugin-version-feature.ts feat: the frontend part of mcp (#22131) 2025-07-10 14:14:02 +08:00
semver.spec.ts feat: the frontend part of mcp (#22131) 2025-07-10 14:14:02 +08:00
semver.ts feat: the frontend part of mcp (#22131) 2025-07-10 14:14:02 +08:00
server-only-context.ts feat: init rsc support for translation (#30596) 2026-01-06 13:23:03 +08:00
setup-status.spec.ts refactor(web): setup status caching (#30798) 2026-01-13 16:59:49 +08:00
setup-status.ts refactor(web): setup status caching (#30798) 2026-01-13 16:59:49 +08:00
storage.ts refactor(web): add SSR-safe localStorage utility and ESLint rules 2026-01-18 16:01:04 +08:00
time.spec.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
time.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
timezone.json chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
timezone.ts Fix/app logs today filter (#689) 2023-07-31 13:30:04 +08:00
tool-call.spec.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
tool-call.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
urlValidation.spec.ts test: adding some web tests (#27792) 2025-11-04 21:06:44 +08:00
urlValidation.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
validators.spec.ts test: adding some web tests (#27792) 2025-11-04 21:06:44 +08:00
validators.ts feat: Add customized json schema validation (#25408) 2025-09-09 15:15:32 +08:00
var.spec.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
var.ts fix: remove hardcoded 48-character limit from text inputs (#30156) 2026-01-15 17:43:00 +08:00
zod.spec.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00