This release introduces a new health model for instances, decoupled from their registration lifecycle, so you can clearly tell active clients apart from silent or abandoned ones.
✨ What's new
Five health buckets automatically derived from LastSeenAt:
- 🟢 ok — seen less than 3h ago
- 🟡 late — under 24h
- 🟠 silent — under 7 days
- ⚪ inactive—— under 30 days (hidden from dashboard views)
- ⚫ abandoned — 30 days or more (auto-purged)
Clearer dashboard
- Row dots and the drawer status badge now reflect instance health (green / amber / red) instead of registration status.
- The single "active" footer counter is replaced with three colored counters — ok / late / silent — that automatically hide when the fleet is healthy.
Richer admin API
- GetStats now returns per-bucket counts (late_instances, silent_instances).
- ListInstances populates a Health field on each summary.
- Inactive instances (>7 days) are automatically filtered out of counts, listings and metric aggregates, so silent-but-not-dead clients drop off the radar on their own.
Automatic purge of abandoned instances
- An internal scheduler runs PurgeAbandoned every 6 hours (first run 30s after startup).
- Instances unseen for 30+ days are deleted, with their snapshots cleaned up through the FK cascade.
🔧 Under the hood
- New pure ComputeHealth function in the domain layer (internal/domain/instance.go), reusable across adapters and tests.
- Shared healthMeta() helper on the UI side unifies the look of dots and badges.
- Extended test coverage across domain, HTTP handlers, and the PostgreSQL repository.