2.1 KiB
2.1 KiB
Notification Enhancements Backlog
Issue: Human-Readable Time Display
The notification section currently displays scanner intervals in raw minutes (e.g., "1440 minutes"), which is not user-friendly. It should display in appropriate units (hours, days, weeks) that match the frequency options being used.
Current Behavior
- Notifications show: "Scanner will run in 1440 minutes"
- Users must mentally convert: 1440 minutes = 24 hours = 1 day
Desired Behavior
- Notifications show: "Scanner will run in 1 day" or "Scanner will run in 2 weeks"
- Display units should match the frequency options selected
Implementation Notes
Frontend Changes Needed
- AgentHealth.tsx - Add time formatting utility function
- Notification display logic - Convert minutes to human-readable format
- Unit matching - Ensure display matches selected frequency option
Suggested Conversion Logic
function formatScannerInterval(minutes: number): string {
if (minutes >= 10080 && minutes % 10080 === 0) {
const weeks = minutes / 10080;
return `${weeks} week${weeks > 1 ? 's' : ''}`;
}
if (minutes >= 1440 && minutes % 1440 === 0) {
const days = minutes / 1440;
return `${days} day${days > 1 ? 's' : ''}`;
}
if (minutes >= 60 && minutes % 60 === 0) {
const hours = minutes / 60;
return `${hours} hour${hours > 1 ? 's' : ''}`;
}
return `${minutes} minute${minutes > 1 ? 's' : ''}`;
}
Frequency Options Reference
- 5 minutes (rapid polling)
- 15 minutes
- 30 minutes
- 1 hour (60 minutes)
- 6 hours (360 minutes)
- 12 hours (720 minutes) - Update scanner default
- 24 hours (1440 minutes)
- 1 week (10080 minutes)
- 2 weeks (20160 minutes)
Priority: Low
This is a UX improvement rather than a functional bug. The system works correctly, just displays time in a less-than-ideal format.
Related Files
aggregator-web/src/components/AgentHealth.tsx- Main scanner configuration UIaggregator-web/src/types/index.ts- TypeScript type definitionsaggregator-agent/internal/config/subsystems.go- Scanner default intervals