From 93e8e6447d14d350e7594acb80ea16b30f39bf5a Mon Sep 17 00:00:00 2001 From: dotta Date: Mon, 6 Apr 2026 08:17:06 -0500 Subject: [PATCH] fix(ui): improve diff modal layout and readability - Make modal much wider (90vw) to show full document content - Use monospace font in diff area for better readability - Enable word-wrap with pre-wrap so long lines wrap cleanly without breaking line number gutters - Move revision selectors into a single row with colored Old/New badges instead of stacked Left:/Right: labels Co-Authored-By: Paperclip --- ui/src/components/DocumentDiffModal.tsx | 101 +++++++++++++----------- 1 file changed, 56 insertions(+), 45 deletions(-) diff --git a/ui/src/components/DocumentDiffModal.tsx b/ui/src/components/DocumentDiffModal.tsx index b85defa5..77286ffe 100644 --- a/ui/src/components/DocumentDiffModal.tsx +++ b/ui/src/components/DocumentDiffModal.tsx @@ -72,49 +72,51 @@ export function DocumentDiffModal({ return ( - - - - Diff — {documentKey} - - + +
+ + + Diff — {documentKey} + + -
-
- Left: - -
-
- Right: - +
+
+ Old + +
+
+ New + +
@@ -155,9 +157,18 @@ export function DocumentDiffModal({ }, }, contentText: { - fontFamily: "inherit", - fontSize: "13px", - lineHeight: "1.6", + fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace", + fontSize: "12px", + lineHeight: "1.5", + wordBreak: "break-word" as const, + whiteSpace: "pre-wrap" as const, + }, + gutter: { + minWidth: "40px", + whiteSpace: "nowrap" as const, + }, + line: { + wordBreak: "break-word" as const, }, }} />