From 01cc8bd8f3edb6b6520bec1f0bc618e8446436f5 Mon Sep 17 00:00:00 2001 From: Allison Truhlar Date: Thu, 23 Apr 2026 11:42:15 -0400 Subject: [PATCH 1/2] fix: add option in fracturedJson prevent spacing of within-row vars --- frontend/src/components/ui/BrowsePage/FileViewer.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/components/ui/BrowsePage/FileViewer.tsx b/frontend/src/components/ui/BrowsePage/FileViewer.tsx index 9a476d10..0d30284a 100644 --- a/frontend/src/components/ui/BrowsePage/FileViewer.tsx +++ b/frontend/src/components/ui/BrowsePage/FileViewer.tsx @@ -172,6 +172,7 @@ export default function FileViewer({ file }: FileViewerProps) { const parsed = JSON.parse(content); const formatter = new Formatter(); formatter.Options.IndentSpaces = 2; + formatter.Options.MaxTableRowComplexity = 1; displayContent = formatter.Serialize(parsed); } catch { // If JSON parsing fails, show original content From 0f989e752d32140c6868dbb585456c1beee59ffe Mon Sep 17 00:00:00 2001 From: Allison Truhlar Date: Thu, 23 Apr 2026 11:42:35 -0400 Subject: [PATCH 2/2] fix: type error by falling back to unformatted json content --- frontend/src/components/ui/BrowsePage/FileViewer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/ui/BrowsePage/FileViewer.tsx b/frontend/src/components/ui/BrowsePage/FileViewer.tsx index 0d30284a..a448319a 100644 --- a/frontend/src/components/ui/BrowsePage/FileViewer.tsx +++ b/frontend/src/components/ui/BrowsePage/FileViewer.tsx @@ -173,7 +173,7 @@ export default function FileViewer({ file }: FileViewerProps) { const formatter = new Formatter(); formatter.Options.IndentSpaces = 2; formatter.Options.MaxTableRowComplexity = 1; - displayContent = formatter.Serialize(parsed); + displayContent = formatter.Serialize(parsed) ?? content; } catch { // If JSON parsing fails, show original content displayContent = content;