Merge remote-tracking branch 'origin/staging' into dal-fix-report-bugs

This commit is contained in:
dal 2025-08-20 11:10:13 -06:00
commit 550f8f2257
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
3 changed files with 3 additions and 11 deletions

View File

@ -24,7 +24,6 @@ export const useTrackAndUpdateReportChanges = ({
DEFAULT_UPDATE_OPERATIONS,
(report) => {
if (report.value) {
console.log('report', report.value);
const queryKey = reportsQueryKeys.reportsGetReport(reportId).queryKey;
queryClient.setQueryData(queryKey, (v) => {
if (!v) return v;

View File

@ -48,7 +48,7 @@ export const useReportEditor = ({
const editor = usePlateEditor({
plugins,
value: [],
value,
readOnly: disabled || isStreaming
});

View File

@ -25,6 +25,7 @@ export const ReportPageController: React.FC<{
const isStreamingMessage = useChatIndividualContextSelector((x) => x.isStreamingMessage);
const content: ReportElementsWithIds = report?.content || [];
const commonClassName = 'sm:px-[max(64px,calc(50%-350px))]';
const { mutate: updateReport } = useUpdateReport();
@ -46,18 +47,10 @@ export const ReportPageController: React.FC<{
debouncedUpdateReport({ reportId, content });
});
const commonClassName = 'sm:px-[max(64px,calc(50%-350px))]';
useTrackAndUpdateReportChanges({ reportId, subscribe: false });
useTrackAndUpdateReportChanges({ reportId, subscribe: isStreamingMessage });
return (
<div className={cn('h-full space-y-1.5 overflow-y-auto pt-9', className)}>
<div
className={cn(
'absolute right-5 bottom-5 h-15 w-15 animate-bounce rounded-full',
isStreamingMessage ? 'bg-purple-400' : 'bg-green-400'
)}
/>
{report ? (
<>
<ReportPageHeader