Skip to content

Goal creation with pending retries, calendar task links, session-goal linking#36

Merged
geokoko merged 3 commits into
masterfrom
feature/goal-session-linking
Jul 9, 2026
Merged

Goal creation with pending retries, calendar task links, session-goal linking#36
geokoko merged 3 commits into
masterfrom
feature/goal-session-linking

Conversation

@geokoko

@geokoko geokoko commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

Notes

Test plan

  • ./gradlew compileJava test (all green, includes new startStudySessionPersistsOptionalGoalAndTaskLink round-trip test)
  • schema.sql executed twice against a fresh H2 database — idempotent, both FKs created exactly once

🤖 Generated with Claude Code

geokoko and others added 2 commits July 9, 2026 23:48
…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>
@geokoko geokoko changed the base branch from feature/planner-task-retry-controls to master July 9, 2026 21:24
@geokoko geokoko merged commit 3022954 into master Jul 9, 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.

1 participant