Skip to content

Planner: plan a goal for one of a parent's subtasks - #68

Merged
geokoko merged 1 commit into
fix/retry-dialog-layoutfrom
feature/plan-subtask-goals
Nov 1, 2026
Merged

geokoko merged 1 commit into
fix/retry-dialog-layoutfrom
feature/plan-subtask-goals

Conversation

@geokoko

@geokoko geokoko commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Follow-up to #67, stacked on it: retarget to master once #67 is merged.

Plan a subtask's goal from its parent

"Needs a plan" lists a subtask only when the subtask itself is due, scheduled or already planned that day. A course that is weeks late shows up, but its problem sets don't, and planning the course's tile could only add a goal for the course.

  • When the add-goal dialog opens for a task with active subtasks (open, in progress or delayed), a For: row under the heading lists the task and its subtasks in the task list's deadline / priority / title order. It starts on the task itself, and the heading follows the choice.
  • This covers every way the planner opens the dialog for a task: a Needs a plan tile (double-click, Enter or drag), the task browser's + Add goal and the retry dialog's + New goal. A task without active subtasks gets the dialog as before.
  • README: the Subtasks bullet mentions the picker.

Tests

  • StudyPlannerPanelTest: planning an overdue parent lists its active subtasks (not a completed one) in deadline order and saves the goal to the chosen subtask; a subtask's own tile shows no picker.
  • ./gradlew check passes (247 tests).

@geokoko

geokoko commented Oct 30, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1c2deb94-ad4d-418e-be8b-9d51be0046a4
Commits

Reviewing files that changed from the base of the PR and between 8f1971b and 1733d3e.

Files selected for processing: 1
  • src/main/java/com/studysync/presentation/ui/components/StudyPlannerPanel.java

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Summary

Summary by CodeRabbit

  • New Features
    • When planning a goal from a parent task, choose the parent or one of its active subtasks as the goal’s task. The dialog heading updates to reflect your selection.
    • When no task is pre-linked, choose any active task or leave the goal unlinked.
  • Documentation
    • Updated the Subtasks feature description to explain task selection when planning a goal from a parent task.

The goal dialog now lets a goal opened from a parent task target that task or one of its active subtasks. The selected task updates the dialog heading and determines the saved task ID.

Changes: Goal target selection

Layer / File(s) Summary
Goal target selection and saving
src/main/java/com/studysync/presentation/ui/components/StudyPlannerPanel.java, src/main/java/com/studysync/presentation/ui/components/TaskListAgenda.java, src/test/java/com/studysync/presentation/ui/components/StudyPlannerPanelTest.java, README.md
The dialog offers the linked parent and its active subtasks when subtasks exist. It updates the heading and saves the selected task ID. The test covers available targets, selection, and the subtask entry point. TASK_ORDER becomes package-private, and the README describes the target selection.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Possibly related PRs

  • geokoko/StudySync#67: PR #67 changes the planner goal dialogs and is the stated stack base for this change.
  • geokoko/StudySync#66: PR #66 changes planner rules for goals linked to subtasks; this change adds selection of an active subtask when planning from its parent.

Suggested labels: enhancement

Merge Risk: Minimal · up to 1733d

Goals can be assigned to an active subtask without an identified merge-blocking issue.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description check Passed The description clearly explains the add-goal picker for parent tasks and active subtasks, related UI behavior, tests, and README updates.
Title check Passed The title clearly and concisely identifies the main change: planning a goal for one of a parent task's subtasks.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 3 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot added the enhancement New feature or request label Oct 30, 2026
@geokoko geokoko self-assigned this Oct 30, 2026
@geokoko
geokoko added this pull request to stack #69 October 31, 2026 18:39
@geokoko
geokoko force-pushed the feature/plan-subtask-goals branch from 8f1971b to 1733d3e Compare October 31, 2026 18:39
Copilot AI balanced review requested due to automatic review settings October 31, 2026 18:39

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@geokoko
geokoko merged commit e5b6c66 into master Nov 1, 2026
2 checks passed
An error occurred while trying to automatically change base from fix/retry-dialog-layout to master November 1, 2026 23:59
@geokoko
geokoko deleted the feature/plan-subtask-goals branch November 2, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants