fix: dashboard layout, widget caching, and backend stability
Layout: - Remove Container maxWidth cap so widgets scale fluidly on wide screens - Fix ActivityFeed Card missing height:100% and overflow:hidden that caused the timeline connector pseudo-element to bleed outside the card boundary Performance (frontend): - Migrate VehicleDashboardCard, EquipmentDashboardCard, AtemschutzDashboardCard, UpcomingEventsWidget, and PersonalWarningsBanner from useEffect+useState to TanStack Query — cached for 5 min, so navigating back to the dashboard no longer re-fires all 9 API requests - Add gcTime:10min and refetchOnWindowFocus:false to QueryClient defaults to prevent spurious refetches on tab-switch Backend stability: - Raise default RATE_LIMIT_MAX from 100 to 300 req/15min — the previous limit was easily exceeded by a single active user during normal dashboard navigation - Increase DB connectionTimeoutMillis from 2s to 5s to handle burst-load scenarios where multiple requests compete for pool slots simultaneously Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ const poolConfig: PoolConfig = {
|
||||
password: environment.database.password,
|
||||
max: 20, // Maximum number of clients in the pool
|
||||
idleTimeoutMillis: 30000, // Close idle clients after 30 seconds
|
||||
connectionTimeoutMillis: 2000, // Return an error if connection takes longer than 2 seconds
|
||||
connectionTimeoutMillis: 5000, // Return an error if connection takes longer than 5 seconds
|
||||
};
|
||||
|
||||
const pool = new Pool(poolConfig);
|
||||
|
||||
Reference in New Issue
Block a user