Memory chip Make the write visible and the read too. A marker at the turn where something was stored, undo available in place, and a plain dated list where each item can be removed on its own. npx shadcn@latest add badge button npm i lucide-react Tokens this needs: --card, --card-foreground, --muted, --muted-foreground, --border, --status-warn, --chart-1 The status, chart, scale, state and direction names are an extension, not a rename. shadcn has --destructive and five --chart-* and nothing else in this territory. ──────────────────────────────────────────────────────────────────────── // MemoryChip.tsx ──────────────────────────────────────────────────────────────────────── import { X } from "lucide-react"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; /** * A stored item is text, a date and a scope. The date is what lets the viewer * judge it later; the scope is what stops a client's name from one project * turning up in a draft for another. */ export type Memory = { id: string; /** In the words it was stored in. "prefers metric units", not a key. */ text: string; savedAt: Date; /** Workspace or project the item belongs to. */ scope: string; }; const day = (d: Date) => d.toLocaleDateString("en-GB", { day: "numeric", month: "short", timeZone: "UTC" }); /** * The moment of writing. Sits on the turn that created the memory and names * what was stored. Undo is here rather than in a settings page because this * is the only moment the viewer has the context to judge it. */ export function SavedMarker({ memory, onUndo }: { memory: Memory; onUndo: (id: string) => void }) { return (
What it remembers
{memories.length === 0 ? (Nothing yet.
) : (The unit is 3.2 m wide and 2.4 m deep, so it clears the doorway with 15 cm to spare. I'll keep to metric from here on.
{saved &&The Rivera figures spreadsheet gives the floor area in square metres, so the totals below are in m² as well.
{used &&