Goal creation with pending retries, calendar task links, session-goal linking#36
Merged
Conversation
…nd session-goal linking - Planner: the "+ Create Goal" button now renders even when a task only has missed goals waiting for retry, instead of being replaced by the retry section (issue #31) - Calendar: the "Plan ahead for this day" dialog gets an optional task selector and passes the chosen task to addStudyGoal, so future-day goals can be linked to tasks (issue #30) - Sessions: study_sessions gains optional goal_id/task_id columns (FKs added idempotently in the migration section, ON DELETE SET NULL), a "Link to (optional)" picker next to Start Session offering today's open goals and tasks, and a muted link label on session cards (issue #17) Closes #31 Closes #30 Closes #17 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Re-validate the link selection in the Start Session handler: a goal or task deleted after the combo was populated now degrades to an unlinked (or task-only) session instead of an uncaught FK violation; the combo is cleared after starting so the next session doesn't silently inherit it, and a blank legacy taskId can no longer be written - StudySession.save() drops a link id whose target row was deleted while the session was in memory and retries once, so an active session can always be ended; the surviving link is preserved - Re-select the previous combo choice by id (StudyGoal has no equals), and clear a stale value whose item vanished from the fresh list - Harden the persistence tests: session-table DDL now carries the same FKs as production (tables reordered to satisfy them), the link round-trip test creates a real task row, and a new test covers ending a session whose linked goal was deleted mid-session Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
addStudyGoal(desc, date, taskId)goal_id/task_idcolumns onstudy_sessions(FKs added via named idempotentALTER ... ADD CONSTRAINT IF NOT EXISTS,ON DELETE SET NULL), astartStudySession(goalId, taskId)overload, a "Link to (optional)" ComboBox next to Start Session listing today's open goals then uncovered tasks, and a muted link label on completed/incomplete session cardsNotes
feature/planner-task-retry-controls) since all three fixes touch the attempt-based goal code introduced there; merge Move missed-goal retry into task planner #29 first, then retarget or merge thisTest plan
startStudySessionPersistsOptionalGoalAndTaskLinkround-trip test)🤖 Generated with Claude Code