From 0d056e116f6bab443c01a8370844eff3c5979242 Mon Sep 17 00:00:00 2001 From: DEls Date: Sun, 30 Aug 2026 22:33:35 +0200 Subject: [PATCH] fix(pwa): restore static manifest.json + remove dead next-pwa config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The next-pwa plugin's `manifest` option is silently ignored in @ducanh2912/next-pwa@10.2.9 — only the service worker is generated. The dashboard Web App Manifest now lives as a static file at public/manifest.json, sourced from the next.config.js block we just removed. This is the same shape the project shipped at HEAD~3, just with the new short_name and id field added by Task 4. --- next.config.js | 38 ++++++--------------------------- public/manifest.json | 50 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 32 deletions(-) create mode 100644 public/manifest.json diff --git a/next.config.js b/next.config.js index d265202..a25d436 100644 --- a/next.config.js +++ b/next.config.js @@ -35,38 +35,12 @@ const withPWA = require("@ducanh2912/next-pwa").default({ clientsClaim: true, skipWaiting: true, }, - manifest: { - name: "MEGA INFRASTRUCTURE", - short_name: "MEGA OPS", - description: "Construction site operations dashboard for fuel, orders, and workforce.", - theme_color: "#fdb13c", - background_color: "#e8ebed", - display: "standalone", - orientation: "portrait", - scope: "/", - start_url: "/dashboard", - id: "/dashboard", - icons: [ - { - src: "/icons/icon-192.png", - sizes: "192x192", - type: "image/png", - purpose: "any", - }, - { - src: "/icons/icon-512.png", - sizes: "512x512", - type: "image/png", - purpose: "any", - }, - { - src: "/icons/maskable-512.png", - sizes: "512x512", - type: "image/png", - purpose: "maskable", - }, - ], - }, + // The Web App Manifest lives at public/manifest.json (static file). + // next-pwa does NOT generate it — the `manifest` option was silently + // ignored in @ducanh2912/next-pwa@10.2.9. The dashboard metadata lives + // in public/manifest.json; the chat metadata lives in + // public/chat.webmanifest. Both are referenced from the per-route + // metadata blocks in src/app/layout.tsx and src/app/dashboard/chat/page.tsx. }); module.exports = withPWA(nextConfig); diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..fca35ca --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,50 @@ +{ + "name": "MEGA INFRASTRUCTURE", + "short_name": "MEGA OPS", + "description": "Construction site operations dashboard for fuel, orders, and workforce.", + "start_url": "/dashboard", + "scope": "/", + "display": "standalone", + "orientation": "portrait", + "background_color": "#e8ebed", + "theme_color": "#fdb13c", + "id": "/dashboard", + "categories": ["business", "productivity", "utilities"], + "icons": [ + { + "src": "/icons/icon-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "any" + }, + { + "src": "/icons/icon-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "any" + }, + { + "src": "/icons/maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ], + "shortcuts": [ + { + "name": "Fuel", + "url": "/dashboard/fuel", + "icons": [{ "src": "/icons/icon-192.png", "sizes": "192x192" }] + }, + { + "name": "Orders", + "url": "/dashboard/orders", + "icons": [{ "src": "/icons/icon-192.png", "sizes": "192x192" }] + }, + { + "name": "Workforce", + "url": "/dashboard/employees", + "icons": [{ "src": "/icons/icon-192.png", "sizes": "192x192" }] + } + ] +}