Fix icon rendering, DB reload processing, and planner bugs#23
Merged
Fix icon rendering, DB reload processing, and planner bugs#23
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates StudySync’s JavaFX UI and Drive reload behavior to improve cross-platform icon rendering and fix planner/recurring-task edge cases, especially on systems without reliable per-glyph font fallback.
Changes:
- Standardize icon rendering by moving emoji/symbol glyphs into
setGraphic()using Noto Emoji labels across multiple panels and badges. - After Google Drive DB download/reload, re-run delayed-task and delayed-goal processing so overdue state updates immediately.
- Adjust recurring-task logic: exclude POSTPONED from “active recurring,” and add
Task.appliesToDate()for date-aware filtering in the re-plan dropdown; fix ComboBox cell factory to clear text withnull.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/studysync/presentation/ui/components/TaskStyleUtils.java | Adds iconLabel() helper and updates badge rendering to use setGraphic() with Noto Emoji. |
| src/main/java/com/studysync/presentation/ui/components/TaskManagementPanel.java | Switches status/error icon rendering to setGraphic() for better emoji reliability. |
| src/main/java/com/studysync/presentation/ui/components/StudyPlannerPanel.java | Updates many UI glyphs to graphics, fixes ComboBox cell clearing, tweaks session handling and error display. |
| src/main/java/com/studysync/presentation/ui/components/ProfileViewPanel.java | Converts several Drive/profile UI icons to graphics; adjusts Drive status messaging. |
| src/main/java/com/studysync/presentation/ui/components/CalendarViewPanel.java | Moves header/tab/button glyphs to graphics and applies emoji font for small glyph labels. |
| src/main/java/com/studysync/presentation/ui/StudySyncUI.java | Re-runs delayed task/goal startup processing after DB reload from Drive and improves reload overlay rendering. |
| src/main/java/com/studysync/integration/drive/GoogleDriveSettingsLoader.java | Ensures default paths resolve to absolute paths for deterministic Drive IO. |
| src/main/java/com/studysync/integration/drive/GoogleDriveService.java | Makes Drive upload safer by aborting on failed H2 checkpoint; conditionally skips shutdown upload if checkpoint fails. |
| src/main/java/com/studysync/integration/drive/GoogleDriveGateway.java | Adds diagnostic logging (file size/mtime) before uploading DB to Drive. |
| src/main/java/com/studysync/domain/service/StudyService.java | Filters delayed goals eligible for replanning using Task.appliesToDate(today) for recurring tasks. |
| src/main/java/com/studysync/domain/entity/Task.java | Adds appliesToDate() and updates findActiveRecurring() to exclude POSTPONED tasks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
Author
|
Downloaded up-to-date DB from Drive on Ubuntu 24.04 LTS. Calendar Panel does not refresh to the latest version. |
8b5ee17 to
22a1e07
Compare
Add the shared TaskStyleUtils icon label helper, replace non-rendering emoji with basic Unicode symbols, convert inline icon text to graphics across panels, fix button icon spacing, and keep empty ComboBox popups from collapsing.
Tasks with POSTPONED status were still returned by findActiveRecurring(), causing them to appear as missed in the study planner even though the user intentionally paused them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show only delayed goals whose parent task is not already present in today's tasks, render empty ComboBox cells as null instead of blank strings, and cap visible dropdown rows.
…picker - TaskService.matchesCategory(): NPE when task.getCategory() is null - TaskService.searchTasksAdvanced(): same null category issue - ProjectService.searchProjects(): same pattern - TaskReminder.toString(): NPE when computeReminderDate() returns null - ReflectionDiaryPanel.onDateChanged(): NPE if datePicker value is null - StudySyncUI: close icon InputStream via try-with-resources Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the two-option exit dialog with three choices: - "Push to Drive & Exit" — checkpoint + upload + exit - "Save Locally & Exit" — checkpoint + exit (no upload) - "Exit without Saving" — exit immediately, no DB flush Default shutdownSaveEnabled to false so Drive is never silently overwritten by @PreDestroy. Add saveLocally() method and a "Save Locally" button in the Profile panel for explicit disk flush. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Acquire an exclusive file lock on ~/.local/share/studysync/.studysync.lock at startup. If another StudySync process holds the lock, print a message to stderr and exit immediately — preventing duplicate windows and DB corruption from concurrent H2 access. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Set the desktop file StartupWMClass to the JavaFX application class so GNOME can associate running windows with the launcher entry.
GNOME's Mutter ignores JavaFX DialogPane pref/min size hints, causing sub-windows to open at their minimum content size. Fix by explicitly setting width/height on the dialog window via onShown handler, and setting explicit dimensions on the Profile stage. KDE is unaffected. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove the auto-carry-forward clause from findByTaskIdForDate and findUnlinkedForDate. Delayed goals now only appear if explicitly re-planned (replanned_for_date = today) or originally scheduled (date = today). The old clause caused two bugs: 1. Re-planning one goal pulled ALL delayed goals for that task 2. Achieved delayed goals vanished (achieved=TRUE excluded by clause) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add task-level goal history, hide soft-deleted goals from active planner/calendar flows, and fold in the consistency fix that clears achieved when a goal is marked failed.
…em vanish Goals re-planned to a specific date disappeared from all views once that date passed, because queries only match on date or replanned_for_date equal to the display date. Now processAllDelayedGoals() marks these goals as failed immediately when the replan date passes, so they appear in goal history with proper failed status. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…iled - Calendar delete is now permanent (hard delete from DB), not soft-delete - Added "Mark as Failed" button on calendar for explicit soft-deletion - Calendar shows all goals for their planned date including failed ones, with distinct red styling and status indicator for failed goals - Added findAllByDate/findAllByDateIncludingDelayed queries that include failed goals, used exclusively by calendar view - Split deleteStudyGoal (hard delete) from markGoalAsFailed (soft-delete) - Failed and delayed goals count against the profile goal completion rate - Fixes all Codex-identified blind spots: unlinked failed goals are now visible on the calendar for the day they were originally planned Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3b3224d to
6e01468
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pre-Landing Review
Pre-Landing Review: 2 issues — 2 auto-fixed (H2 SHUTDOWN always runs on exit, debug diagnostics removed)
Test plan