From 253a6b427a4ba19c09b91fba3cc6ff582ea2ea3a Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Thu, 21 Aug 2025 14:42:31 -0600 Subject: [PATCH 1/2] animate fade for report --- .../ui/report/elements/StreamingText.tsx | 5 +---- apps/web/src/styles/tailwindAnimations.css | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/apps/web/src/components/ui/report/elements/StreamingText.tsx b/apps/web/src/components/ui/report/elements/StreamingText.tsx index 8130eeed8..6cabd1964 100644 --- a/apps/web/src/components/ui/report/elements/StreamingText.tsx +++ b/apps/web/src/components/ui/report/elements/StreamingText.tsx @@ -15,10 +15,7 @@ export function StreamingText(props: PlateTextProps) { Date: Thu, 21 Aug 2025 14:50:58 -0600 Subject: [PATCH 2/2] hot fix for j dawg --- apps/web/package.json | 2 +- .../src/components/ui/report/ReportEditor.tsx | 7 +++++-- .../report/plugins/stream-content-plugin.ts | 19 ++++++++++++------- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/apps/web/package.json b/apps/web/package.json index ba4030cb9..f2e90056a 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "next dev --turbo", - "dev:fast": "make start-fast", + "dev:fast": "make fast", "build": "next build", "start": "next start", "lint": "next lint && npx prettier --write . '!src/components/ui/icons/**' --log-level error", diff --git a/apps/web/src/components/ui/report/ReportEditor.tsx b/apps/web/src/components/ui/report/ReportEditor.tsx index 01799ad07..b8038dc34 100644 --- a/apps/web/src/components/ui/report/ReportEditor.tsx +++ b/apps/web/src/components/ui/report/ReportEditor.tsx @@ -64,6 +64,9 @@ export const ReportEditor = React.memo( // Initialize the editor instance using the custom useEditor hook const isReady = useRef(false); + // readOnly = true; + // isStreaming = true; + const editor = useReportEditor({ isStreaming, mode, @@ -127,12 +130,12 @@ export const ReportEditor = React.memo( variant={variant} readonly={readOnly} disabled={disabled} - className={containerClassName}> + className={cn('pb-[20vh]', containerClassName)}> diff --git a/apps/web/src/components/ui/report/plugins/stream-content-plugin.ts b/apps/web/src/components/ui/report/plugins/stream-content-plugin.ts index f53a1b912..a9d29a368 100644 --- a/apps/web/src/components/ui/report/plugins/stream-content-plugin.ts +++ b/apps/web/src/components/ui/report/plugins/stream-content-plugin.ts @@ -53,14 +53,19 @@ export const StreamContentPlugin = createPlatePlugin({ } // Prevent undo/redo and defer normalization for performance - editor.tf.withScrolling(() => { - editor.tf.withoutSaving(() => { - editor.tf.withoutNormalizing(() => { - const operations = buildUpdateOperations(editor, chunks); - executeOperations(operations); + editor.tf.withScrolling( + () => { + editor.tf.withoutSaving(() => { + editor.tf.withoutNormalizing(() => { + const operations = buildUpdateOperations(editor, chunks); + executeOperations(operations); + }); }); - }); - }); + }, + { + scrollOptions: { behavior: 'smooth' } + } + ); } } }));