[feat-006] add_citation tool + hover popover + same-doc rescroll fix

↗ view on GitHub · Nick Whitehouse · 2026-05-04 · 6321e28a

Replaces the freeform <CITATIONS> JSON block with an explicit add_citation
tool the model invokes per [N] marker. Tool calls are far more reliable
on Olava than freeform output formats, mirroring the SLM-friendly pattern
established by feat-005's multi-pass orchestrator. Legacy block parsing
remains as a fallback so any model regression still surfaces citations.

Frontend: replaces the browser-native title= tooltip with a styled hover
popover (filename + page + serif quote). Fixes a same-doc rescroll bug
where clicking citation #2 on an already-open doc tab kept the viewer
on citation #1 - upsertTab now drops the prior initialScrollTop when
the new mode has its own scroll target.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Repository nwhitehouse/mike
Author Nick Whitehouse <nick.whitehouse@mccarthyfinch.com>
Authored
Parents 3fd35b4e
Stats 3 files changed , +246 , -39
Part of add_citation tool experiment + park (feat-006)

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-6321e28a.md from inside the repo you want the change in.

⬇ Download capture-commit-6321e28a.md