Skip to content

feat: add nightly session notes#104

Open
kilo-WATT wants to merge 1 commit into
joshuamyers-dev:mainfrom
kilo-WATT:feature/session-notes
Open

feat: add nightly session notes#104
kilo-WATT wants to merge 1 commit into
joshuamyers-dev:mainfrom
kilo-WATT:feature/session-notes

Conversation

@kilo-WATT
Copy link
Copy Markdown
Contributor

@kilo-WATT kilo-WATT commented May 31, 2026

Summary

Adds simple plain-text notes for SleepLab session/night detail pages.

Users can now add, edit, view, and clear an optional note for a sleep session/night. Notes are stored on the existing sessions table with a nullable note column.

Because SleepLab already treats user_id + folder_date as the nightly boundary, saving a note updates all session rows for that same user/night so multi-block nights stay consistent.

Changes

  • Added migration 018_add_session_note.sql
  • Extended session detail API response with note
  • Added PUT /sessions/{session_id}/note
  • Added a compact Notes section to SessionDetail.tsx
  • Added backend tests for note persistence, updating, clearing, and session detail response

Screenshot

Notes section on the session detail page:

SleepLab session detail notes section

Validation

  • Migration applied successfully in local LXC deployment
  • App rebuilt and started healthy
  • Manual UI test passed: add note, save, refresh, edit, clear
  • uv run python scripts\check_migrations.py passed
  • uv run pytest -q passed available tests: 37 passed, 74 skipped
  • npm run test in frontend passed: 6 passed
  • npm run build in frontend passed
  • npm run lint still has pre-existing repo-wide lint failures unrelated to this PR

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