mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 07:42:23 +00:00
feat(documents): choose how the vault is laid out, and confirm every delete
The wrench beside Upload opens Settings, Appearance, Documents, the way the illness journal offers its display options: preview cards or a compact list, and months stacked as blocks or flowing across the full width with the month name inline above the document that opens it. The choice is stored per account in `users.documents_layout_json` behind GET/PUT /api/documents/inbound/layout (preserve-when-absent, module gated, the read delegable like the rest of the vault), carried in the account-settings backup and cleared by the data wipe. Deleting from the vault now always asks first. The bulk bar's Delete and a focused card's Delete key both go through one confirmation on the page, and the detail sheet's Delete opens its own; before, all three deleted on the spot with only an undo toast behind them. The selection bar is two tight lines: the count with an X at its right edge, then one action row with Delete alone at the right in the destructive style. Below 1024 px the verbs are icon-only at the 44 px tap floor, so the row stays one line at 360 px. The bar carries the selection-bar slot the Coach launcher already steps aside for.
This commit is contained in:
1 parent
ce6d2fe72a
commit
4273af231e
39 files changed
+1661
-209
No files matched your search
@@ -1190,6 +1190,10 @@ const DELEGABLE_ROUTES: Record<string, DelegableEntry> = {
|
||||
domain: "documents",
|
||||
why: "The record's vault state: quota, the filter bar's condition chips, and index coverage. Without it the admitted list loses its filters. The `assistAvailable` boolean is the same integration-adjacent availability flag `nutrients` already returns — no credential, endpoint or token — and every AI action it would gate stays refused. No write arm exists.",
|
||||
},
|
||||
"app/api/documents/inbound/layout/route.ts": {
|
||||
domain: "documents",
|
||||
why: "The record's vault presentation, read only: two closed enums (card or list view, stacked or flowing months) and nothing else. The admitted list renders through it, so a refused read would leave a delegate's vault waiting on a shape it can never learn. The PUT stays bare — how the owner's vault is laid out is the owner's choice, the same split `/api/medications/layout` keeps.",
|
||||
},
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
/* v1.37.0 — the fifty-one modules that became delegable at MANAGE. */
|
||||
@@ -2086,8 +2090,11 @@ const ACTOR_ROUTES: Record<string, string> = {
|
||||
* the life-event writes join it with their audit rows: the edit/delete module
|
||||
* on the record list, the create and the edit/delete on the manage literal.
|
||||
* 251 -> 255.
|
||||
*
|
||||
* v1.42 -- the document vault's presentation read joins the record list
|
||||
* beside the rest of the vault; its PUT stays bare. 255 -> 256.
|
||||
*/
|
||||
const FROZEN_ENTRY_COUNT = 255;
|
||||
const FROZEN_ENTRY_COUNT = 256;
|
||||
|
||||
/**
|
||||
* The two surfaces that authenticate a Bearer token outside `requireAuth` —
|
||||
|
||||
Reference in new issue
Block a user