Fix LegalPanel: eliminate stale-closure bug that blocked auto-load

↗ view on GitHub · Claude · 2026-05-05 · ad53e9c4

Two effects with identical deps caused a race: the second effect read
fullText from the prior render (non-null when switching citations),
so the !fullText guard silently skipped loadFullText() and left the
panel stuck with no text, no button, and no error shown.

Fix: merge into one effect that resets state and triggers the
legislation fetch inline (with cancel flag). Rename loadFullText to
loadCaseLaw since it now only handles the manual case-law button.

https://claude.ai/code/session_016JxWnFc3baeDgkzDgxY6ex
Repository Jeroen1991z/mikeNL
Author Claude <noreply@anthropic.com>
Authored
Committed
Parents 2357d694
Stats 1 file changed , +40 , -25
Part of Legal citation side panel (full-text reader with quote highlight)

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

⬇ Download capture-commit-ad53e9c4.md