[feat-022] Stop parseCellContent from stripping keywords

↗ view on GitHub · Nick Whitehouse · 2026-05-07 · a71f3cc1

The worker stores cell content as {summary, flag, reasoning, keywords}
but the GET /tabular-review/:reviewId endpoint passes content through
parseCellContent, which had a hard-coded 3-field shape that silently
dropped keywords on the way out. Result: keyword chips never had data,
no matter what the worker actually emitted.

Updated parseCellContent (and the inner string-fallback branch) to
read + return keywords. Added sanitiseKeywordsForResponse - kept in
sync with sanitiseKeywords in lib/tabularJobs.ts (≤5 entries, trim,
≥2 chars, max 60 chars per entry) so legacy cells / corrupt rows
don't poison responses.

This was a missed plumbing step in feat-022. The DB data was correct;
it was the response shape that was wrong.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Repository nwhitehouse/mike
Author Nick Whitehouse <nick.whitehouse@mccarthyfinch.com>
Authored
Parents 04c7218a
Stats 1 file changed , +31 , -1
Part of Tabular cell citation + keyword chips

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-a71f3cc1.md from inside the repo you want the change in.

⬇ Download capture-commit-a71f3cc1.md