Skip to content

Conversation

@lilstiffy
Copy link
Contributor

This pull request refactors how monitored directory notification statuses are determined and displayed. The main change is the introduction of a new DirNotificationStatus enum, which centralizes the logic for determining the status, associated colors, and tooltips for monitored directories. This replaces the previous approach that relied on multiple boolean checks and manual string handling, resulting in clearer, more maintainable, and extensible code.

Monitored Directory Notification Status Refactor:

  • Introduced the DirNotificationStatus enum in MonitoredDirectoryUtil, encapsulating all possible directory notification states (e.g., UP_TO_DATE, NO_BASELINE, WEEK_OLD, etc.), and providing methods for retrieving the appropriate foreground color and tooltip text for each status.
  • Replaced the old logic in HomeController's list cell renderer with a call to MonitoredDirectoryUtil.getDirNotificationStatus, using the enum's methods to set foreground color and tooltip text, simplifying and unifying the UI feedback logic.
  • Updated getMonitoredDirectoryNotificationMessage in MonitoredDirectoryUtil to use the new enum, providing more granular and descriptive notification messages for each directory status.
  • Added the necessary import for the new enum in HomeController.java.
  • Removed obsolete methods (isScanOlderThanAWeek, isScanOlderThan1Minute) and replaced them with the new getDirNotificationStatus method, which determines the directory status based on the time since the last scan.

These changes make the notification system for monitored directories more robust, easier to extend, and improve the clarity of both the code and the user interface.

@lilstiffy lilstiffy self-assigned this Jan 30, 2026
@lilstiffy lilstiffy changed the base branch from master to develop January 30, 2026 17:22
Copy link
Contributor

@pwgit-create pwgit-create left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ Approved! ✨
Riktigt snyggt genomfört! Logiken för utökade varningar är tydlig, välstrukturerad och lätt att följa, och det känns tryggt att nu få bättre uppföljning även för längre tidsintervall (2 veckor, 1 månad och 1 år).
Toppen att allt även är korrekt uppdaterat i Integrity Hash Frontend. 👌

Starkt jobbat rakt igenom – ser verkligen fram emot att se hur detta beter sig i produktion. Grymt levererat! 🚀👏

@lilstiffy lilstiffy merged commit f53add6 into develop Jan 30, 2026
2 of 3 checks passed
@lilstiffy lilstiffy deleted the 88-bug-old-monitored-directories-that-havent-been-scanned-in-over-x-days branch January 30, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Old monitored directories that haven't been scanned in over X days

3 participants