Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

chore(web): remove obsolete PWA assets (#40082)

yyhdc309ced5954
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9c756939243..a001d73a85e 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -552,9 +552,6 @@ catalogs:
server-only:
specifier: 0.0.1
version: 0.0.1
- sharp:
- specifier: 0.35.3
- version: 0.35.3
shiki:
specifier: 4.4.2
version: 4.4.2
@@ -1443,9 +1440,6 @@ importers:
server-only:
specifier: 'catalog:'
version: 0.0.1
- sharp:
- specifier: 'catalog:'
- version: 0.35.3(@types/[email protected])
shiki:
specifier: 'catalog:'
version: 4.4.2
@@ -1978,9 +1972,6 @@ packages:
'@emnapi/[email protected]':
resolution: {integrity: sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA==}
- '@emnapi/[email protected]':
- resolution: {integrity: sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==}
-
'@emnapi/[email protected]':
resolution: {integrity: sha512-kyOl3X0DuTiT1h2ft8r2fYO8JYtU9a9Xis/zBSiGArNaagCOWx90N1k2wxp18czFDH+OgcWGb5ZP/XMt3dcyPA==}
@@ -9738,11 +9729,6 @@ snapshots:
tslib: 2.8.1
optional: true
- '@emnapi/[email protected]':
- dependencies:
- tslib: 2.8.1
- optional: true
-
'@emnapi/[email protected]':
dependencies:
tslib: 2.8.1
@@ -10175,7 +10161,8 @@ snapshots:
'@iconify/types': 2.0.0
import-meta-resolve: 4.2.0
- '@img/[email protected]': {}
+ optional: true
optionalDependencies:
@@ -10264,7 +10251,7 @@ snapshots:
dependencies:
- '@emnapi/runtime': 1.11.1
+ '@emnapi/runtime': 1.11.2
optional: true
@@ -16705,6 +16692,7 @@ snapshots:
'@img/sharp-win32-ia32': 0.35.3
'@img/sharp-win32-x64': 0.35.3
'@types/node': 25.9.5
+ optional: true
dependencies:
@@ -18031,7 +18019,6 @@ time:
[email protected]: '2025-02-27T15:15:20.630Z'
[email protected]: '2025-10-01T21:39:15.208Z'
[email protected]: '2022-09-03T01:07:26.139Z'
- [email protected]: '2026-07-01T11:28:34.077Z'
[email protected]: '2026-08-05T00:41:14.729Z'
[email protected]: '2025-12-23T16:39:16.428Z'
[email protected]: '2026-02-11T22:42:31.720Z'
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 8e227bfa4f9..279f960ad8e 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -233,7 +233,6 @@ catalog:
remark-directive: 4.0.0
scheduler: 0.27.0
server-only: 0.0.1
- sharp: 0.35.3
shiki: 4.4.2
socket.io-client: 4.8.3
sortablejs: 1.15.7
diff --git a/web/.gitignore b/web/.gitignore
index 33b782d8aa5..863b24d36c6 100644
--- a/web/.gitignore
+++ b/web/.gitignore
@@ -56,12 +56,5 @@ package-lock.json
mise.toml
-# PWA generated files
-public/sw.js
-public/sw.js.map
-public/workbox-*.js
-public/workbox-*.js.map
-public/fallback-*.js
-
.vscode/settings.json
.vscode/mcp.json
diff --git a/web/public/favicon.ico b/web/app/favicon.ico
similarity index 100%
rename from web/public/favicon.ico
rename to web/app/favicon.ico
diff --git a/web/app/layout.tsx b/web/app/layout.tsx
index 425d651a341..8f33655f1b1 100644
--- a/web/app/layout.tsx
+++ b/web/app/layout.tsx
@@ -44,18 +44,6 @@ export default async function RootLayout({ children }: { children: React.ReactNo
return (
<html lang={locale ?? 'en'} className="h-full" suppressHydrationWarning>
<head>
- <link rel="manifest" href="/manifest.json" />
- <meta name="theme-color" content="#1C64F2" />
- <meta name="mobile-web-app-capable" content="yes" />
- <meta name="apple-mobile-web-app-capable" content="yes" />
- <meta name="apple-mobile-web-app-status-bar-style" content="default" />
- <meta name="apple-mobile-web-app-title" content="Dify" />
- <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
- <link rel="icon" type="image/png" sizes="32x32" href="/icon-192x192.png" />
- <link rel="icon" type="image/png" sizes="16x16" href="/icon-192x192.png" />
- <meta name="msapplication-TileColor" content="#1C64F2" />
- <meta name="msapplication-config" content="/browserconfig.xml" />
-
<ReactScanLoader />
</head>
<body className="h-full bg-background-body" {...datasetMap}>
diff --git a/web/package.json b/web/package.json
index 4bb72150d53..f0926746cb2 100644
--- a/web/package.json
+++ b/web/package.json
@@ -129,7 +129,6 @@
"remark-directive": "catalog:",
"scheduler": "catalog:",
"server-only": "catalog:",
- "sharp": "catalog:",
"shiki": "catalog:",
"socket.io-client": "catalog:",
"sortablejs": "catalog:",
diff --git a/web/public/_offline.html b/web/public/_offline.html
deleted file mode 100644
index 95dbfe3390a..00000000000
--- a/web/public/_offline.html
+++ /dev/null
@@ -1,128 +0,0 @@
-<!doctype html>
-<html lang="en">
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>Dify - Offline</title>
- <style>
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- }
-
- body {
- font-family:
- -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- min-height: 100vh;
- display: flex;
- align-items: center;
- justify-content: center;
- color: white;
- text-align: center;
- padding: 20px;
- }
-
- .container {
- max-width: 600px;
- background: rgba(255, 255, 255, 0.1);
- backdrop-filter: blur(10px);
- border-radius: 20px;
- padding: 40px;
- box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
- }
-
- .icon {
- width: 100px;
- height: 100px;
- margin: 0 auto 30px;
- background: rgba(255, 255, 255, 0.2);
- border-radius: 20px;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 48px;
- }
-
- h1 {
- font-size: 32px;
- font-weight: 600;
- margin-bottom: 15px;
- }
-
- p {
- font-size: 18px;
- line-height: 1.6;
- opacity: 0.9;
- margin-bottom: 30px;
- }
-
- button {
- background: white;
- color: #764ba2;
- border: none;
- padding: 15px 30px;
- font-size: 16px;
- font-weight: 600;
- border-radius: 50px;
- cursor: pointer;
- transition:
- transform 0.2s,
- box-shadow 0.2s;
- }
-
- button:hover {
- transform: translateY(-2px);
- box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
- }
-
- button:active {
- transform: translateY(0);
- }
-
- @media (max-width: 640px) {
- .container {
- padding: 30px;
- }
-
- h1 {
- font-size: 24px;
- }
-
- p {
- font-size: 16px;
- }
- }
- </style>
- </head>
- <body>
- <div class="container">
- <div class="icon">⚡</div>
- <h1>You're Offline</h1>
- <p>
- It looks like you've lost your internet connection. Some features may not be available until
- you're back online.
- </p>
- <button onclick="window.location.reload()">Try Again</button>
- </div>
-
- <script>
- // Check for connection status changes
- window.addEventListener('online', function () {
- window.location.reload()
- })
-
- // Periodically check if online
- setInterval(function () {
- fetch(window.location.origin, { method: 'HEAD' })
- .then(function () {
- window.location.reload()
- })
- .catch(function () {
- // Still offline
- })
- }, 5000)
- </script>
- </body>
-</html>
diff --git a/web/public/apple-touch-icon.png b/web/public/apple-touch-icon.png
deleted file mode 100644
index bf0850ca928..00000000000
Binary files a/web/public/apple-touch-icon.png and /dev/null differ
diff --git a/web/public/browserconfig.xml b/web/public/browserconfig.xml
deleted file mode 100644
index 27fd0864ada..00000000000
--- a/web/public/browserconfig.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<browserconfig>
- <msapplication>
- <tile>
- <square70x70logo src="/icon-72x72.png"/>
- <square150x150logo src="/icon-152x152.png"/>
- <square310x310logo src="/icon-512x512.png"/>
- <TileColor>#1C64F2</TileColor>
- </tile>
- </msapplication>
-</browserconfig>
\ No newline at end of file
diff --git a/web/public/icon-128x128.png b/web/public/icon-128x128.png
deleted file mode 100644
index 06c630ccdfc..00000000000
Binary files a/web/public/icon-128x128.png and /dev/null differ
diff --git a/web/public/icon-144x144.png b/web/public/icon-144x144.png
deleted file mode 100644
index b2e01e41067..00000000000
Binary files a/web/public/icon-144x144.png and /dev/null differ
diff --git a/web/public/icon-152x152.png b/web/public/icon-152x152.png
deleted file mode 100644
index bd0d8cf5536..00000000000
Binary files a/web/public/icon-152x152.png and /dev/null differ
diff --git a/web/public/icon-192x192.png b/web/public/icon-192x192.png
deleted file mode 100644
index 4ada284e1d6..00000000000
Binary files a/web/public/icon-192x192.png and /dev/null differ
diff --git a/web/public/icon-256x256.png b/web/public/icon-256x256.png
deleted file mode 100644
index dcfc8e28830..00000000000
Binary files a/web/public/icon-256x256.png and /dev/null differ
diff --git a/web/public/icon-384x384.png b/web/public/icon-384x384.png
deleted file mode 100644
index 676a766368a..00000000000
Binary files a/web/public/icon-384x384.png and /dev/null differ
diff --git a/web/public/icon-512x512.png b/web/public/icon-512x512.png
deleted file mode 100644
index 55a9c04be1a..00000000000
Binary files a/web/public/icon-512x512.png and /dev/null differ
diff --git a/web/public/icon-72x72.png b/web/public/icon-72x72.png
deleted file mode 100644
index 2f159ce4bb1..00000000000
Binary files a/web/public/icon-72x72.png and /dev/null differ
diff --git a/web/public/icon-96x96.png b/web/public/icon-96x96.png
deleted file mode 100644
index e4966c05288..00000000000
Binary files a/web/public/icon-96x96.png and /dev/null differ
diff --git a/web/public/manifest.json b/web/public/manifest.json
deleted file mode 100644
index 8a4b80d80dd..00000000000
--- a/web/public/manifest.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "name": "Dify",
- "short_name": "Dify",
- "description": "Build Production Ready Agentic AI Solutions",
- "icons": [
- {
- "src": "/icon-192x192.png",
- "sizes": "192x192",
- "type": "image/png",
- "purpose": "any"
- },
- {
- "src": "/icon-192x192.png",
- "sizes": "192x192",
- "type": "image/png",
- "purpose": "maskable"
- },
- {
- "src": "/icon-256x256.png",
- "sizes": "256x256",
- "type": "image/png"
- },
- {
- "src": "/icon-384x384.png",
- "sizes": "384x384",
- "type": "image/png"
- },
- {
- "src": "/icon-512x512.png",
- "sizes": "512x512",
- "type": "image/png"
- }
- ],
- "theme_color": "#1C64F2",
- "background_color": "#ffffff",
- "display": "standalone",
- "scope": "/",
- "start_url": "/",
- "orientation": "portrait-primary",
- "categories": ["productivity", "utilities", "developer"],
- "lang": "en-US",
- "dir": "ltr",
- "prefer_related_applications": false,
- "shortcuts": [
- {
- "name": "Apps",
- "short_name": "Apps",
- "url": "/apps",
- "icons": [{ "src": "/icon-96x96.png", "sizes": "96x96" }]
- },
- {
- "name": "Datasets",
- "short_name": "Datasets",
- "url": "/datasets",
- "icons": [{ "src": "/icon-96x96.png", "sizes": "96x96" }]
- }
- ]
-}
diff --git a/web/scripts/generate-icons.js b/web/scripts/generate-icons.js
deleted file mode 100644
index 11e146622ba..00000000000
--- a/web/scripts/generate-icons.js
+++ /dev/null
@@ -1,51 +0,0 @@
-import path from 'node:path'
-import { fileURLToPath } from 'node:url'
-import sharp from 'sharp'
-
-const __filename = fileURLToPath(import.meta.url)
-const __dirname = path.dirname(__filename)
-
-const sizes = [
- { size: 192, name: 'icon-192x192.png' },
- { size: 256, name: 'icon-256x256.png' },
- { size: 384, name: 'icon-384x384.png' },
- { size: 512, name: 'icon-512x512.png' },
- { size: 96, name: 'icon-96x96.png' },
- { size: 72, name: 'icon-72x72.png' },
- { size: 128, name: 'icon-128x128.png' },
- { size: 144, name: 'icon-144x144.png' },
- { size: 152, name: 'icon-152x152.png' },
-]
-
-const inputPath = path.join(__dirname, '../public/icon.svg')
-const outputDir = path.join(__dirname, '../public')
-
-// Generate icons
-async function generateIcons() {
- try {
- console.log('Generating PWA icons...')
-
- for (const { size, name } of sizes) {
- const outputPath = path.join(outputDir, name)
-
- await sharp(inputPath).resize(size, size).png().toFile(outputPath)
-
- console.log(`✓ Generated ${name} (${size}x${size})`)
- }
-
- // Generate apple-touch-icon
- await sharp(inputPath)
- .resize(180, 180)
- .png()
- .toFile(path.join(outputDir, 'apple-touch-icon.png'))
-
- console.log('✓ Generated apple-touch-icon.png (180x180)')
-
- console.log('\n✅ All icons generated successfully!')
- } catch (error) {
- console.error('Error generating icons:', error)
- process.exit(1)
- }
-}
-
-generateIcons()