Skip to content

Fix icon rendering, DB reload processing, and planner bugs#23

Merged
geokoko merged 14 commits intomasterfrom
fix/icons-planner-reload-bugs
May 2, 2026
Merged

Fix icon rendering, DB reload processing, and planner bugs#23
geokoko merged 14 commits intomasterfrom
fix/icons-planner-reload-bugs

Conversation

@geokoko
Copy link
Copy Markdown
Owner

@geokoko geokoko commented Mar 17, 2026

Summary

  • Icon rendering: Use setGraphic() with Noto Emoji font labels for all icon/emoji characters across all panels, fixing rendering failures on systems without per-glyph font fallback (e.g. Kubuntu 24.04)
  • DB reload post-processing: Re-run markDelayedTasks and processAllDelayedGoals after a Google Drive DB download so overdue state is correct without requiring an app restart
  • Postponed recurring tasks: Exclude POSTPONED status from findActiveRecurring() so postponed courses stop showing as missed
  • Re-plan dropdown: Add Task.appliesToDate() for date-aware recurring task filtering, and fix ComboBox cell factory to use null instead of empty strings (eliminates phantom empty boxes)
  • Drive sync hardening: Atomic file replacement (same-filesystem temp file), post-download CHECKPOINT SYNC, explicit H2 SHUTDOWN on exit to prevent data loss
  • Three-option exit dialog: Push to Drive and Exit, Save Locally and Exit, Exit without Saving — Drive is never silently overwritten (shutdownSaveEnabled defaults to false)
  • Local save button: Explicit Save Locally in Profile panel for on-demand disk flush
  • Single-instance enforcement: File lock prevents duplicate app windows and concurrent H2 access
  • GNOME desktop integration: Correct StartupWMClass to match JavaFX actual WM_CLASS, preventing separate dock icon
  • GNOME dialog sizing: Force explicit dimensions on dialogs/stages that GNOME Mutter sizes too small
  • Planner goal query fix: Remove auto-carry-forward clause that caused re-planning one goal to pull ALL delayed goals, and caused achieved delayed goals to vanish from the completed section
  • Null-safety fixes: Guards for search filters, reminder toString, date picker edge cases
  • UI polish: Button icon overlap fixes, empty combo-box dropdown cleanup, re-plan filtering improvements

Pre-Landing Review

Pre-Landing Review: 2 issues — 2 auto-fixed (H2 SHUTDOWN always runs on exit, debug diagnostics removed)

Test plan

  • All 8 tests pass
  • Verify icon rendering on Kubuntu 24.04 (not planned)
  • Verify postponed recurring tasks no longer appear under Missed recurring tasks
  • Verify re-plan dropdown filtering and no empty boxes
  • Download DB from Drive and confirm panels refresh with correct delayed/overdue state -> partially works, DB CAN be fetched and data can be loaded properly, but the frontend button "Download From Drive" must be pressed twice for the new data to show up in frontend (which is not the expected behavior)
  • Manual testing: exit dialog options, single-instance lock, GNOME dock grouping, dialog sizing, goal re-plan, achieved goals display

Copilot AI review requested due to automatic review settings March 17, 2026 01:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 with null.

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.

Comment thread src/main/java/com/studysync/domain/entity/Task.java Outdated
Comment thread src/main/java/com/studysync/domain/entity/Task.java Outdated
Comment thread src/main/java/com/studysync/presentation/ui/components/ProfileViewPanel.java Outdated
@geokoko
Copy link
Copy Markdown
Owner Author

geokoko commented Mar 20, 2026

Downloaded up-to-date DB from Drive on Ubuntu 24.04 LTS. Calendar Panel does not refresh to the latest version.

@geokoko geokoko force-pushed the fix/icons-planner-reload-bugs branch from 8b5ee17 to 22a1e07 Compare March 25, 2026 04:46
@geokoko geokoko linked an issue Apr 25, 2026 that may be closed by this pull request
geokoko and others added 13 commits April 29, 2026 17:23
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>
@geokoko geokoko force-pushed the fix/icons-planner-reload-bugs branch from 3b3224d to 6e01468 Compare April 29, 2026 14:46
@geokoko geokoko merged commit c433f56 into master May 2, 2026
1 check passed
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.

3 participants