Skip to content

Let goals carry a done checklist and tasks a done-when note - #45

Merged
geokoko merged 3 commits into
masterfrom
feature/goal-done-criteria
Sep 12, 2026
Merged

geokoko merged 3 commits into
masterfrom
feature/goal-done-criteria

Conversation

@geokoko

@geokoko geokoko commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Adds optional goal checklists and task "Done when" notes so completion is defined explicitly instead of guessed at the end of the day.

  • Goals get a checklist stored on the parent goal (one criterion per line), so ticks survive edits and retries. Ticking the last criterion achieves the current attempt; unticking one on an achieved goal reopens it. Progress shows as "n/m" in the planner, calendar, and task goal history.
  • Tasks get a free-text "Done when" note in the form and on the card.
  • Additive H2 migrations (done_criteria on study_goals and tasks, nullable, no backfill). Scoring is unchanged.
  • Docs and version metadata updated for 0.1.8.

Validation: ./gradlew test passes (78 tests, including six new persistence tests for tick preservation, last-tick achievement, reopen on untick, invalid-index no-op, duplicate lines, and the task field). ./gradlew check reports only pre-existing Checkstyle warnings. The JavaFX walk-through was not run.

Migration: existing databases gain nullable done_criteria columns; existing goals without a checklist behave exactly as before.

Copilot AI lite review requested due to automatic review settings September 12, 2026 13:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved checklist lifecycle and planner task-form issues remain, along with missing calendar progress display.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds persisted goal checklists and task “Done when” notes, with UI, migrations, tests, documentation, and version updates.

Changes:

  • Added nullable done_criteria persistence and migrations.
  • Added checklist ticking, achievement behavior, and progress displays.
  • Added task-note editing/display, tests, and documentation updates.

Review findings:

  • Critical (1 vote): Checklist updates can incorrectly clear manually achieved goals.
  • Moderate (1 vote): Planner-created tasks do not persist the “Done when” field.
  • Nit (2 votes): Calendar checklist cards omit the n/m progress indicator.
File summaries
File Summary
src/test/java/com/studysync/domain/service/TaskServicePersistenceTest.java Tests task-note persistence.
src/test/java/com/studysync/domain/service/StudyServicePersistenceTest.java Tests checklist persistence and lifecycle behavior.
src/test/java/com/studysync/domain/service/ScoringServiceTest.java Updates schema fixtures.
src/main/resources/schema.sql Adds nullable checklist/note columns and migrations.
src/main/java/com/studysync/presentation/ui/components/TaskStyleUtils.java Adds checklist and progress helpers.
src/main/java/com/studysync/presentation/ui/components/TaskManagementPanel.java Adds task-note and goal-checklist UI.
src/main/java/com/studysync/presentation/ui/components/StudyPlannerPanel.java Adds planner checklist UI and form support.
src/main/java/com/studysync/presentation/ui/components/CalendarViewPanel.java Adds calendar checklist display and goal creation support.
src/main/java/com/studysync/domain/service/TaskUpdate.java Adds task-note update data.
src/main/java/com/studysync/domain/service/TaskService.java Preserves and updates task notes.
src/main/java/com/studysync/domain/service/StudyService.java Manages checklist lifecycle behavior.
src/main/java/com/studysync/domain/entity/Task.java Stores task completion notes.
src/main/java/com/studysync/domain/entity/StudyGoal.java Stores, parses, and ticks goal criteria.
README.md Updates feature and version documentation.
gradle.properties Updates the project version.
build.gradle Updates the project version.
AGENTS.md Documents checklist behavior and schema changes.
Review details

Suppressed comments (1)

src/main/java/com/studysync/presentation/ui/components/TaskManagementPanel.java:859

  • This adds the Done when field only to TaskManagementPanel's task form. StudyPlannerPanel.showCreateTaskDialog is a second task-creation form and still constructs a Task without setting doneCriteria, so tasks created from the planner cannot use the new feature. Add the field/write path there too, or share the task form implementation.
        TextArea doneArea = new TextArea(isNew ? "" : nvl(existingTask.getDoneCriteria()));
        doneArea.setPromptText("What done means (optional)");
        doneArea.setPrefRowCount(2);
        doneArea.setWrapText(true);
  • Files reviewed: 16/17 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/main/java/com/studysync/domain/service/StudyService.java Outdated
@geokoko
geokoko merged commit eece62a into master Sep 12, 2026
@geokoko
geokoko deleted the feature/goal-done-criteria branch September 12, 2026 17:39
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.

2 participants