Beszel only stores stats at 1m, 10m, 20m, 120m, 480m intervals.
The 1440m type doesn't exist, so queries for 1w/30d returned empty
results. Use 480m (8h) with appropriate perPage (21 for 1w, 90 for 30d).
* fix(beszel): harden cache layer and prevent blank widgets
- Add debug logging across Beszel integration, request handler, and tRPC
router (auth, fetch, SSE, per-procedure entry/exit) gated behind
LOG_LEVEL=debug
- cached-request-handler: retry with backoff, isValid predicate to skip
caching invalid data, in-flight dedup (single-flight per channel) to
avoid thundering herd after cache invalidation
- redis channel: set-then-publish so storage is always consistent even
when pubsub publish fails
- Beszel handlers: opt into fallbackToStaleOnError and retry so brief
upstream hiccups don't throw away good cached data
- beszel-system-stats: add refetchInterval matching each time period's
cache TTL so historical charts refresh in the background
- tRPC router: switch Promise.all -> Promise.allSettled for getSystems
and getAlerts; getSystemStats returns an error object instead of
throwing. Each result carries an optional error field so one failed
integration no longer nukes the whole widget
- Widgets: add explicit isPending loader, empty state for grid and
stats, and a shared per-integration error indicator (tooltip with
failed integration names). Alerts and table now only show their
empty state after loading completes
- Translation: add empty.noSystems key to beszelSystemGrid and
beszelSystemStats
Addresses #6030
* style: auto-fix lint and format
---------
Co-authored-by: ajnart <ajnart@users.noreply.github.com>
Replace all ternary operators with if/else, &&/||, or early returns.
Remove unused noAnimation constant that caused lint error.
Fix variable shadowing in tooltip deduplication loop.
- Add subscribeSystemStats tRPC subscription bridging PocketBase SSE
- Add subscribeRealtimeMetrics to BeszelIntegration with SSE parsing
- Add error handling: try/catch in subscription, response check in topic POST
- Add cacheDurationForInput to request handler for per-period cache TTL
- Add mock subscribeRealtimeMetrics with 1s interval for dev testing
When Docker API returns `null` for container ports (instead of `[]`),
the Docker management page crashes. Added optional chaining on
`ports?.length` to handle this case.
Fixes#5311
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
- Add 'orphaned' container state to handle containers with null/undefined cpu_stats.online_cpus
- Display orphaned containers with gray badge in UI
- Prevent 'Cannot read properties of undefined (reading online_cpus)' error
- Add translations for 'orphaned' status in all supported languages
- Containers with invalid stats are now marked as orphaned instead of causing errors
* fix(deps): update dependency drizzle-zod to ^0.8.2
* chore: update zod to v4 import
* fix: path is no longer available in transform context
* fix: AnyZodObject does no longer exist
* fix: auth env.ts using wrong createEnv and remove unused file env-validation.ts
* fix: required_error no longer exists on z.string
* fix: zod error map is deprecated and replaced with config
* fix: default requires callback now
* fix: migrate zod resolver for mantine
* fix: remove unused form translation file
* fix: wrong enum type
* fix: record now requires two arguments
* fix: add-confirm-password-refinement type issues
* fix: add missing first record argument for entityStateSchema
* fix: migrate superrefine to check
* fix(deps): upgrade zod-form-data to v3
* fix: migrate superRefine to check for mediaUploadSchema
* fix: authProvidersSchema default is array
* fix: use stringbool instead of custom implementation
* fix: record requires first argument
* fix: migrate superRefine to check for certificate router
* fix: confirm pasword refinement is overwriting types
* fix: email optional not working
* fix: migrate intersection to object converter
* fix: safe parse return value rename
* fix: easier access for min and max number value
* fix: migrate superRefine to check for oldmarr import file
* fix: inference of enum shape for old-import board-size wrong
* fix: errors renamed to issues
* chore: address pull request feedback
* fix: zod form requires object
* fix: inference for use-zod-form not working
* fix: remove unnecessary convertion
* fix(deps): upgrade trpc-to-openapi to v3
* fix: build error
* fix: migrate missing zod imports to v4
* fix: migrate zod records to v4
* fix: missing core package dependency in api module
* fix: unable to convert custom zod schema to openapi schema
* fix(deps): upgrade zod to v4
* chore(renovate): enable zod dependency updates
* test: add simple unit test for convertIntersectionToZodObject
---------
Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>