Skip to content

Commit 0178eb2

Browse files
committed
refactor(dashboard): remove service worker registration and adjust build configuration
1 parent 06112f0 commit 0178eb2

File tree

5 files changed

+3
-58
lines changed

5 files changed

+3
-58
lines changed

dashboard/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@ def build_api_interface():
2323

2424

2525
def build():
26-
# Match Vite `base` to FastAPI mount so asset and PWA URLs resolve under DASHBOARD_PATH.
27-
vite_base = DASHBOARD_PATH.rstrip("/") + "/" if DASHBOARD_PATH else "/"
2826
proc = subprocess.Popen(
2927
["bun", "run", "build", "--outDir", build_dir, "--assetsDir", "statics"],
30-
env={**os.environ, "VITE_BASE_API": VITE_BASE_API, "BASE_URL": vite_base},
28+
env={**os.environ, "VITE_BASE_API": VITE_BASE_API},
3129
cwd=base_dir,
3230
)
3331
proc.wait()
@@ -62,4 +60,4 @@ def run_dashboard():
6260
if DEBUG:
6361
run_dev()
6462
else:
65-
run_build(app)
63+
run_build(app)

dashboard/src/components/ui/checkbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root
1414
{...props}
1515
>
1616
<CheckboxPrimitive.Indicator className={cn('flex items-center justify-center text-current')}>
17-
<Check className="h-4 w-4" />
17+
<Check className="h-3 w-3 stroke-current" />
1818
</CheckboxPrimitive.Indicator>
1919
</CheckboxPrimitive.Root>
2020
))

dashboard/src/entry.client.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import App from '@/App'
22
import { StrictMode } from 'react'
33
import { createRoot } from 'react-dom/client'
4-
import { registerSW } from './sw-register'
5-
6-
// Register service worker with dynamic start URL
7-
registerSW()
84

95
createRoot(document.getElementById('root')!).render(
106
<StrictMode>

dashboard/src/sw-register.ts

Lines changed: 0 additions & 48 deletions
This file was deleted.

dashboard/vite.config.mts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ export default defineConfig({
148148
workbox: {
149149
navigateFallback: '/index.html',
150150
globPatterns: ['**/*.{js,css,html,ico,png,svg,woff2}'],
151-
maximumFileSizeToCacheInBytes: 4 * 1024 * 1024,
152151
skipWaiting: true,
153152
clientsClaim: true,
154153
runtimeCaching: [

0 commit comments

Comments
 (0)