From ffbb49b52346bb403b69f220eed37e2e941842d0 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 19:55:51 +0000 Subject: [PATCH 1/3] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/components/documents/rich-text-editor.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/documents/rich-text-editor.tsx b/src/components/documents/rich-text-editor.tsx index 330cd27..5ccd75b 100644 --- a/src/components/documents/rich-text-editor.tsx +++ b/src/components/documents/rich-text-editor.tsx @@ -59,13 +59,18 @@ export function RichTextEditor({ }, }); - // Keep editor in sync when value is reset externally + // Keep editor in sync when value is reset/loaded externally (e.g. opening a saved pleading). + // Only re-sync when the incoming value differs meaningfully from the current editor HTML so + // we don't fight the user's typing on every keystroke. useEffect(() => { - if (editor && value !== editor.getHTML()) { - editor.commands.setContent(value || "

", { emitUpdate: false }); + if (!editor) return; + const current = editor.getHTML(); + const incoming = value || "

"; + if (incoming !== current) { + editor.commands.setContent(incoming, { emitUpdate: false }); } // eslint-disable-next-line react-hooks/exhaustive-deps - }, [value === ""]); + }, [value, editor]); if (!editor) return null; From d4f2fa117a7bdbd0e70fcbcdcc06bbd6ec3d7b9c Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 19:56:00 +0000 Subject: [PATCH 2/3] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/lib/pdf-pleading.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/pdf-pleading.ts b/src/lib/pdf-pleading.ts index afa29f9..9f1cbd5 100644 --- a/src/lib/pdf-pleading.ts +++ b/src/lib/pdf-pleading.ts @@ -327,7 +327,7 @@ export async function downloadPleadingPdf(input: PleadingInput, filename: string // Signature block (above footnotes) — right-side, indented ~2/3 of page width const sig = input.signature; - const SIG_X = MARGIN + CONTENT_W * (2 / 3) - 54; // shifted 0.75" left + const SIG_X = MARGIN + CONTENT_W * (2 / 3) - 108; // shifted 1.5" left of the 2/3 mark if (sig && (sig.block?.trim() || sig.imageDataUrl || sig.typed?.trim())) { ensureSpace(LINE_H * 6); y += LINE_H * 1.5; From 15f5969c020c01047d96cbff3da8a306e5002a76 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 19:56:13 +0000 Subject: [PATCH 3/3] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/lib/docx-pleading.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/docx-pleading.ts b/src/lib/docx-pleading.ts index 062bc81..44df40f 100644 --- a/src/lib/docx-pleading.ts +++ b/src/lib/docx-pleading.ts @@ -336,7 +336,7 @@ export function buildPleadingDoc(input: PleadingInput): Document { // Signature block (above footnotes, after body) — right-side, indented ~2/3 of page width const sig = input.signature; - const SIG_INDENT = 6240; // ~4.33" from left margin (page content is 9360 dxa wide) + const SIG_INDENT = 5160; // ~3.58" from left margin (shifted 0.75" left of prior 6240) const sigParagraph = (children: TextRun[]) => new Paragraph({ indent: { left: SIG_INDENT }, children }); if (sig && (sig.block?.trim() || sig.imageBytes || sig.typed?.trim())) {