The ask enabling the conditional "Pending deletion — cancel by <date>" banner on the Settings data page. deletion_scheduled_at was exposed only on AdminUserRow, not on the User schema returned by GET /users/me, which forced an always-visible cancel link; the ask adds deletion_scheduled_at to the User response. Resolved as lq-ai #119, pinned at 945ad31. When building the Data & Privacy settings deletion banner.
LQ_AI ask — expose deletion_scheduled_at on GET /users/me
From: Donna frontend session · Date: 2026-05-31 · Pin Donna is on: 438198c
Problem
P7-2 (Donna's Data & privacy settings) ships account deletion against the existing
POST /api/v1/users/me/delete (soft-schedules + revokes sessions) and
POST /api/v1/users/me/delete/cancel. But deletion_scheduled_at is exposed only on
AdminUserRow (the admin user-list schema) — the User schema returned by
GET /api/v1/users/me has no such field. So a normal user's session cannot detect a
pending deletion on load, and Donna cannot conditionally render a proper
"Pending deletion — cancel by
Current workaround (shipped in P7-2)
An always-visible "Cancel scheduled deletion" control that POSTs the cancel endpoint
(204 → "cancelled", 400 → "nothing pending"). Functional, but it's always shown even
when nothing is pending — slightly awkward.
Requested change
Expose the pending-deletion state on the user-facing profile, either:
- add
deletion_scheduled_at?: string | nullto theUserschema returned byGET /api/v1/users/me, or - add a small dedicated status field/endpoint Donna can read on load.
lq-ai files (approx.)
/Users/kevinkeller/Code/lq-ai/api/app/api/users.py(GET /users/mehandler)/Users/kevinkeller/Code/lq-ai/api/app/schemas/(theUserresponse model)
Unblocks (Donna)
Replace the always-on cancel link with a conditional "Pending deletion — cancel by npm run gen:api, swap the link for the banner, and
log it in docs/decisions/lq-ai-pin.md.