Add streaming loading message to report editor

- Add shimmer loading message at bottom of editor when streaming
- Use existing ShimmerText component for consistency
- Position with absolute positioning and backdrop blur
- Show 'Generating content...' message during streaming

Co-Authored-By: nate@buster.so <nate@buster.so>
This commit is contained in:
Devin AI 2025-08-22 02:11:38 +00:00
parent 3d2909cc16
commit dd9b33927c
1 changed files with 6 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import { ThemeWrapper } from './ThemeWrapper/ThemeWrapper';
import { useReportEditor } from './useReportEditor';
import type { ReportElementsWithIds, ReportElementWithId } from '@buster/server-shared/reports';
import { platejsToMarkdown } from './plugins/markdown-kit/platejs-conversions';
import { ShimmerText } from '@/components/ui/typography/ShimmerText';
interface ReportEditorProps {
// We accept the generic Value type but recommend using ReportTypes.Value for type safety
@ -141,6 +142,11 @@ export const ReportEditor = React.memo(
className={cn('editor', className)}
autoFocus
/>
{isStreaming && (
<div className="absolute bottom-4 left-1/2 transform -translate-x-1/2 flex items-center gap-1.5 bg-background/80 backdrop-blur-sm px-3 py-2 rounded-md border border-border/50 shadow-sm">
<ShimmerText text="Generating content..." className="text-sm" />
</div>
)}
</ThemeWrapper>
</EditorContainer>
</Plate>