▍ humdrum codex / soft

Docs: update bento-layout section for cols/rows + Edit layout mode

3ce1939b9414c75a666a5821777067c8a12bf437
humdrum-tiv <45084903+humdrum-tiv@users.noreply.github.com> · 2026-06-09 13:26

parent 87fa9c56

Docs: update bento-layout section for cols/rows + Edit layout mode

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

1 files changed

CLAUDE.md +7 −4
@@ -60,10 +60,13 @@ **Things Today** source, rendered by `components/cards/ThingsCard.tsx` (special-cased in the
 Dashboard for its complete-checkbox). A vestigial local `/api/todos` + `todos` table remain
 for export compatibility but aren't shown.
 
-**Bento layout:** each source has a `size` (`lib/schemas/source.ts` → `lib/layout.ts`
-`TILE_SPANS`) mapping to grid col/row spans. The dashboard is a dense `grid-auto-flow`
-with fixed `gridAutoRows`; cards fill their tile and scroll internally. Resize per card in
-Settings.
+**Bento layout:** each source stores explicit `cols`/`rows` grid spans (`lib/layout.ts`
+`spanStyle`); the dashboard is a dense `grid-auto-flow` with fixed `gridAutoRows`, and cards
+fill their tile and scroll internally. The dashboard's **"Edit layout"** mode
+(`components/Dashboard.tsx`) makes cards dnd-kit drag sources for reordering (renumbers
+`position`) and adds a bottom-right corner handle that resizes by whole grid cells (writes
+`cols`/`rows`); both persist via `PATCH /api/sources/[id]`. The old `size` enum column +
+`TILE_SPANS` are **vestigial** (kept for export/back-compat, no longer drive layout).
 
 **The newspaper.** `/print` is a server component rendering current snapshots
 (`lib/edition-data.ts`) with print CSS in `app/globals.css` (`.paper`, `@media print` hides