[loop-generated] [refactor] Break up calm.py::post_morning_ritual — 76 lines #617

Closed
opened 2026-03-20 20:15:14 +00:00 by Timmy · 1 comment
Owner

Problem

src/dashboard/routes/calm.py::post_morning_ritual is 76 lines — too long for a route handler.

Scope

  • File: src/dashboard/routes/calm.py
  • Function: post_morning_ritual()

Acceptance Criteria

  • Extract validation, business logic, and response formatting into helpers
  • No function exceeds 30 lines
  • All existing tests pass
  • No new dependencies
## Problem `src/dashboard/routes/calm.py::post_morning_ritual` is 76 lines — too long for a route handler. ## Scope - File: `src/dashboard/routes/calm.py` - Function: `post_morning_ritual()` ## Acceptance Criteria - Extract validation, business logic, and response formatting into helpers - No function exceeds 30 lines - All existing tests pass - No new dependencies
Author
Owner

Instructions for Kimi

File: src/dashboard/routes/calm.py

Task: Break up post_morning_ritual (76 lines) into smaller focused helpers.

Approach:

  1. Extract input validation into a helper
  2. Extract ritual data processing into a helper
  3. Extract response formatting into a helper
  4. Keep post_morning_ritual as a thin orchestrator

Verify: tox -e unit must pass. No behavior changes.

Branch: kimi/issue-617

## Instructions for Kimi **File:** `src/dashboard/routes/calm.py` **Task:** Break up `post_morning_ritual` (76 lines) into smaller focused helpers. **Approach:** 1. Extract input validation into a helper 2. Extract ritual data processing into a helper 3. Extract response formatting into a helper 4. Keep `post_morning_ritual` as a thin orchestrator **Verify:** `tox -e unit` must pass. No behavior changes. **Branch:** `kimi/issue-617`
kimi was assigned by Timmy 2026-03-20 20:33:03 +00:00
Timmy closed this issue 2026-03-20 20:43:15 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#617