* fix(loki): the assistant composer was deleting your newlines
Found by using Loki to develop Loki. 'Brief Loki' on /today prefills the assistant with a multi-line prompt SummaryBar builds - heading, the day's counts, then the question, joined with newlines. The field it lands in was an <input>, and an <input> cannot hold a newline, so the browser stripped every one.
Measured live on 2026-09-18: the value was 'Daily brief - Friday, 18 SeptemberWhat should I focus on today?' with a newline count of ZERO. The product generated a structured prompt and its own field destroyed the structure - no error, nothing to notice, and the result still reads as roughly sensible prose, which is why it survived.
It is also the composer for the thing this product is FOR. A brief is several sentences by nature; a single-line box that scrolls horizontally shows about forty characters, so you cannot read back what you are about to dispatch. It is now a textarea that grows to a ceiling, with Enter to send and Shift+Enter for a line break - the convention the full-page composer already uses, whose auto-grow this mirrors rather than reinventing.
SECOND BUG, same prompt: .filter(Boolean) deleted the paragraph breaks. The array carries two deliberate empty-string separators, and an empty string is falsy, so the filter meant to drop absent counts dropped those too. Even in a textarea the three parts would have run together.
The builder moves to lib/today-brief.ts because it could not be tested where it was - an inline array inside an async server component. Six cases now pin it, including the exact 'SeptemberWhat' shape. Proven by mutation: restoring .filter(Boolean) fails two of them.
202/202 unit test files pass; the new test is picked up automatically by scripts/test-unit.ts.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* chore(format): prettier the today-brief test
CI's verify runs prettier --check on the whole tree; I had formatted the files I edited but written this one afterwards, so the check caught it and nothing else did. Exactly what that gate is for.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>