mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 13:22:14 +00:00
feat(coach): keep stored plans readable and erasable with the Coach unavailable
Plans are the person's own record, like the stored facts and conversations. The list and delete routes no longer ask the Coach module, and the plans page turns read-only instead of redirecting to Insights: every plan can be read and removed, while confirming or moving one stays Coach use and is refused by the PATCH route as before.
This commit is contained in:
1 parent
e0ece41e21
commit
5e5d33ecf8
16 files changed
+168
-81
No files matched your search
+6
-17
@@ -9429,14 +9429,14 @@ paths:
|
||||
tags:
|
||||
- Insights
|
||||
summary: List the caller's Coach goal / if-then plans
|
||||
description: v1.21.3 — returns the durable plans the Coach has proposed for the caller, newest first, each decrypted on
|
||||
description: 'v1.21.3 — returns the durable plans the Coach has proposed for the caller, newest first, each decrypted on
|
||||
the fly. A plan is an "if-then" implementation intention tied to one metric, with an optional target. The Coach
|
||||
extractor writes a plan as `proposed`; only `PATCH /api/coach/plans/{id}` activates it. Pass `?status=` to
|
||||
filter to one lifecycle status, or `?scope=` for a named group (open = proposed + active + review_due, past =
|
||||
met + abandoned + reviewed, all = every non-deleted plan) — mutually exclusive. Both omitted returns the
|
||||
non-terminal set (proposed + active). Coach-gated (`requireModuleEnabled("coach")`); a disabled surface 403s.
|
||||
Auth via cookie or Bearer; the owner is always narrowed from the session, never the body. Undecryptable rows are
|
||||
omitted rather than failing the read.
|
||||
non-terminal set (proposed + active). Not gated on the Coach: the plans belong to the caller and stay readable
|
||||
while the Coach is unavailable (v1.39). Auth via cookie or Bearer; the owner is always narrowed from the
|
||||
session, never the body. Undecryptable rows are omitted rather than failing the read.'
|
||||
parameters:
|
||||
- name: status
|
||||
in: query
|
||||
@@ -9471,12 +9471,6 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CoachPlansList"
|
||||
"401": *a1
|
||||
"403":
|
||||
description: Coach surface disabled.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorEnvelope"
|
||||
"422": *a4
|
||||
"429": *a5
|
||||
/api/coach/plans/{id}:
|
||||
@@ -9530,7 +9524,8 @@ paths:
|
||||
summary: Soft-delete one Coach plan
|
||||
description: "v1.21.3 — soft-deletes a single plan owned by the caller. An unknown / cross-user / already-deleted id is
|
||||
an idempotent no-op returning `{ deleted: false }`, never revealing whether the id exists under another account.
|
||||
Coach-gated. Auth via cookie or Bearer."
|
||||
Not gated on the Coach: erasing one's own plan works while the Coach is unavailable (v1.39). Auth via cookie or
|
||||
Bearer."
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
@@ -9741,12 +9736,6 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CoachReminderDeleted"
|
||||
"401": *a1
|
||||
"403":
|
||||
description: Coach surface disabled.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorEnvelope"
|
||||
"422": *a4
|
||||
"429": *a5
|
||||
/api/coach/suggested-actions:
|
||||
|
||||
Reference in new issue
Block a user