open-swe/ui/src/components/agents/utils
Johannes du Plessis 60663800e5
fix: prevent reviews page crash on binary/large file diffs (#1597)
The PR reviews page builds a Pierre FileContents cache key for every
file in an unconditional useMemo. Binary/oversized/added/removed blobs
arrive with null originalContent/modifiedContent (pr_diff.py flags them
unrenderable), so fileContentsCacheKey dereferenced null via
contents.length and crashed the whole route — escaping the markdown
error boundary, which was unrelated. Coerce null/undefined contents to
"" in the cache-key helper so it can never throw.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-06-23 12:21:20 -07:00
..
diffStats.ts feat(open-swe): stream agent chat via @langchain/react v2 protocol (#1475) 2026-06-11 09:54:35 -07:00
diffUtils.test.ts fix: prevent reviews page crash on binary/large file diffs (#1597) 2026-06-23 12:21:20 -07:00
diffUtils.ts fix: prevent reviews page crash on binary/large file diffs (#1597) 2026-06-23 12:21:20 -07:00