fix(microprints): fix source viewer showing stale content when switching files

The source_viewer component used static DOM IDs (id='source-viewer')
with phx-update='ignore'. When switching expanded files, LiveView
reused the same DOM element but phx-update='ignore' prevented content
from being updated, showing the previous file's source.

- Override source_viewer/1 in MicroprintsLive with unique per-file IDs
  generated via :erlang.phash2(file_path)
- Add test verifying expand-switch shows correct source content
- Add test for highlight/expand coupling (collapse when highlighting
  a different file)
- All 160 tests pass
This commit is contained in:
Firehose Bot
2026-05-18 18:04:47 +01:00
parent 36bdc0610e
commit 7c06204ac2
4 changed files with 4289 additions and 6 deletions
File diff suppressed because one or more lines are too long