marklok points Mike at Danish law

A four-commit afternoon turns this fork into a Danish-market legal assistant with clickable inline citations to primary sources.

searchchat-ui

marklok has wired Mike up to Retsinformation (the Danish government's official statute database) and EUR-Lex (the EU's regulation portal), covering things like the Danish anti-money-laundering act, employment law, company law, and EU rules such as DORA and PRIIPs. When the assistant cites a section, the citation now renders as a pill the user can click to slide open a panel showing the underlying text - the kind of trust affordance that matters when a partner is reading an answer about an actual statute.

The smart bit isn't just the retrieval. If a user or the model references something like "section 42, subsection 3," the system spots that pattern and goes and fetches that exact section directly, alongside the usual semantic search. So precise legal pinpoints don't get lost in fuzzy matching. The streaming UI was also tightened so users can't accidentally cancel mid-citation.

So what Worth a look for anyone building a jurisdiction-specific legal assistant - the citation-panel pattern and the pinpoint-reference handling generalise well beyond Denmark.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

4 commits from marklok/danishmike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
130ce0ae Add Danish law & EUR-Lex retrieval pipeline Markus 2026-05-08 ↗ GitHub
commit body
- Add lawRetrieval.ts: vector search + metadata-based fallback for specific
  § and Artikel references, merges results and dedupes
- Add ingestion scripts for Retsinformation and EUR-Lex (DORA, PRIIPs)
- Add document_chunks table migration and IVFFlat index (lists=20)
- Wire law context into chat and project-chat routes
- Add RETSINFORMATION_LAWS and EURLEX_REGULATIONS env vars to .env.example
- Ignore backend/data/ (local EUR-Lex HTML files) in .gitignore

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20f4a079 Add inline law citation panel Markus 2026-05-08 ↗ GitHub
commit body
Law citations (Retsinformation / EUR-Lex) now open in a slide-in panel
on the same page instead of navigating to an external URL. Shows source
badge, full excerpt text, and a link to the original source.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
90a57483 Fix law citations not rendering as clickable pills Markus 2026-05-08 ↗ GitHub
commit body
- normalizeCitation: treat page:null as page=0 instead of dropping the
  citation (law chunks have no page number)
- Emit loading_citations SSE event when <CITATIONS> block starts so the
  frontend can track citation generation state
- Strengthen formatLawContext prompt to reliably produce <CITATIONS> blocks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3f95ec9d Fix streaming UX: hide stop button during citation generation Markus 2026-05-08 ↗ GitHub
commit body
When visible text finishes but the invisible <CITATIONS> block is still
generating, the stop button now switches to the send arrow so the user
can't accidentally cancel and lose citations. The streaming indicator on
the last message also stops during this phase.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-206.md from inside the repo you want the changes in.

⬇ Download capture-thread-206.md