mirror of
https://github.com/Dvorinka/Containr.git
synced 2026-10-28 07:41:27 +00:00
Found during a browser-driven audit of the whole app:
- connectivity banner showed permanently: pingServer() resolved
undefined, which React Query treats as an error; returns boolean now
- Vite dev proxy now forwards /health so the probe actually measures
the backend, and the API target is env-overridable (VITE_API_PROXY)
- auth-session removed from the persisted query cache — stale sessions
no longer rehydrate into a false signed-in flash
- workspace Observability tab no longer shows fabricated random metrics
("87K Active User", fake performance/speed-test cards); the dashboard
now aggregates real per-service metrics (CPU, memory, network, instances)
- service detail tabs write ?section= so tab state is shareable/deep-linked
- Security page auto-selects the first project instead of rendering blank
- People page user-creation form no longer overflows its card
(minmax(0,1fr) grid tracks; same fix on env-var rows)
- page padding is responsive (px-4 sm:px-8) so mobile keeps content width;
Projects header wraps instead of clipping the "+ new project" button
- template deploy modal shows a loading state while the session resolves
instead of flashing the sign-in prompt
- audit log table strips the CIDR suffix from displayed IPs
- docs list excerpts no longer repeat the document title
- activity filter placeholder "Search search…" → "Search events…"
- workspace view tabs get more room: ⌘K button now waits for lg:
Generated with [Devin](https://devin.ai)
Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
79 lines
2.2 KiB
TypeScript
79 lines
2.2 KiB
TypeScript
/// <reference types="vitest" />
|
|
import { defineConfig } from 'vitest/config'
|
|
import react from '@vitejs/plugin-react'
|
|
import path from 'path'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
test: {
|
|
globals: true,
|
|
environment: 'happy-dom',
|
|
setupFiles: ['./src/test/setup.ts'],
|
|
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html'],
|
|
include: ['src/lib/**/*.ts'],
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
build: {
|
|
// Enable code splitting and optimization
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
// Split vendor libraries
|
|
vendor: ['react', 'react-dom', '@tanstack/react-query'],
|
|
ui: ['@radix-ui/react-dialog', '@radix-ui/react-dropdown-menu', 'lucide-react'],
|
|
utils: ['date-fns', 'clsx', 'tailwind-merge'],
|
|
canvas: ['@xyflow/react'],
|
|
charts: ['recharts']
|
|
},
|
|
// Optimize chunk naming for better caching
|
|
chunkFileNames: 'assets/js/[name]-[hash].js',
|
|
entryFileNames: 'assets/js/[name]-[hash].js',
|
|
assetFileNames: 'assets/[ext]/[name]-[hash].[ext]'
|
|
}
|
|
},
|
|
// Enable source maps for production debugging
|
|
sourcemap: true,
|
|
// Optimize bundle size
|
|
minify: 'terser',
|
|
// Set appropriate chunk size limit for better caching
|
|
chunkSizeWarningLimit: 1000
|
|
},
|
|
// Optimize dependencies during build
|
|
optimizeDeps: {
|
|
include: ['react', 'react-dom', '@tanstack/react-query', 'date-fns']
|
|
},
|
|
// Development server optimization
|
|
server: {
|
|
fs: {
|
|
// Allow serving files from project root
|
|
allow: ['..']
|
|
},
|
|
proxy: {
|
|
// Same-origin API path for dev - matches the nginx proxy in the shipped image
|
|
'/health': {
|
|
target: process.env.VITE_API_PROXY ?? 'http://localhost:8082',
|
|
changeOrigin: true,
|
|
},
|
|
'/api': {
|
|
target: process.env.VITE_API_PROXY ?? 'http://localhost:8082',
|
|
changeOrigin: true,
|
|
ws: true,
|
|
},
|
|
}
|
|
},
|
|
// Preview server optimization
|
|
preview: {
|
|
port: 4173,
|
|
strictPort: true
|
|
}
|
|
})
|