From 123484a8c45fd0d0b5d82c910137ab44823f7e79 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 3 Oct 2026 09:20:29 +0200 Subject: [PATCH] AGENTS.md: record the rules the charts and the site cards now depend on MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three things in here cost real time to work out, so they are written down rather than left to be re-derived: - The Recharts constraints behind the profit line (a Line is one , so cannot recolour a segment; a Line with its own `data` corrupts the shared categorical axis; profit Lines must be direct children or they vanish silently; the tooltip needs custom `content`). - globals.css hard-codes the axis tick font size, which beats Recharts' tick.fontSize prop — so the 12px mobile bump has to happen in that CSS rule or nowhere. - /sites now defaults to Cards and must be kept in step with IncomeView. Plus the two deliberate palette exceptions (--color-chart-loss, --color-chart-profit) and the client rulings behind them. --- AGENTS.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 5b3f588..ae388f5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -94,6 +94,12 @@ Other rules worth not re-learning: Months from other years are dropped, not folded in, and the panel says so. - `SiteSummary.pinned` exists because the table is a client component and cannot look the site up in the `sites` collection itself. +- **`/sites` defaults to the Cards view, deliberately mirroring `IncomeView`** — same + toolbar, same card shape, same 12-month strip on expand, same three-up footer. The + client likes the vehicles overview and asked for the sites to read the same way, so + keep the two in step when either changes. Grid is the old table, kept as a toggle. + The site detail link lives **inside the expanded panel only** — a card is a + `