From 65994816ab634e41f3837bc21af6d3737f4d6d3b Mon Sep 17 00:00:00 2001 From: mindesbunister Date: Mon, 14 Jul 2025 01:09:09 +0200 Subject: [PATCH] Add extensive debugging to analysis and gallery components - Add console logging to track result data in AIAnalysisPanel - Add debugging to ScreenshotGallery rendering conditions - Track screenshot data flow and component render states - Help identify why gallery preview/enlargement not working --- components/AIAnalysisPanel.tsx | 26 ++++--- test-gallery.html | 124 +++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+), 8 deletions(-) create mode 100644 test-gallery.html diff --git a/components/AIAnalysisPanel.tsx b/components/AIAnalysisPanel.tsx index 39539c8..de2d6b3 100644 --- a/components/AIAnalysisPanel.tsx +++ b/components/AIAnalysisPanel.tsx @@ -475,6 +475,7 @@ export default function AIAnalysisPanel() { return (
+ {console.log('AIAnalysisPanel render - result:', result)}

@@ -1370,14 +1371,23 @@ export default function AIAnalysisPanel() { {/* Screenshot Gallery */} {result && result.screenshots && ( - timeframes.find(t => t.value === tf)?.label || tf)} - enlargedImage={enlargedScreenshot} - onImageClick={handleScreenshotClick} - onClose={() => setEnlargedScreenshot(null)} - /> + <> + {console.log('Rendering ScreenshotGallery with:', { + screenshots: result.screenshots, + screenshotsLength: result.screenshots.length, + symbol, + selectedTimeframes, + enlargedScreenshot + })} + timeframes.find(t => t.value === tf)?.label || tf)} + enlargedImage={enlargedScreenshot} + onImageClick={handleScreenshotClick} + onClose={() => setEnlargedScreenshot(null)} + /> + )} {/* Multi-timeframe Screenshot Gallery */} diff --git a/test-gallery.html b/test-gallery.html new file mode 100644 index 0000000..9fb2492 --- /dev/null +++ b/test-gallery.html @@ -0,0 +1,124 @@ + + + + Test Screenshot Gallery + + + +

Screenshot Gallery Test

+

Testing direct screenshot access:

+ + + + + + + +