From a55168d20a306b92c221b11c63fac68cdcd35712 Mon Sep 17 00:00:00 2001 From: Giorgio Gilestro Date: Fri, 29 May 2026 12:35:10 +0200 Subject: [PATCH] ui: log panel stretches to portfolio bottom; AI analysis stays expanded MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two small fixes to the dashboard right column based on user feedback: 1. layout.css — drop align-self:start from #log-panel. The panel previously shrank to its content, leaving the right-hand column visually shorter than the indicators+portfolio stack on the left. Removing the override lets the grid stretch the panel to the full row span so the two columns now bottom-align. The log content still sits at the top of the panel; any extra height is empty padding inside the box. 2. portfolio.js — re-hydrate AI analysis expanded. The 60s auto-refresh rebuilds the portfolio mount and re-attaches the previously-generated analysis from localStorage, but the
element was re-attached with open:false — collapsing it under the user's cursor every minute. Users reasonably perceived that as "the analysis disappeared". Hydrate as open:true so the body stays visible; the user can still click the summary to collapse manually within a refresh window. Co-Authored-By: Claude Opus 4.7 --- app/static/css/layout.css | 9 ++++----- app/static/js/portfolio.js | 8 +++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/static/css/layout.css b/app/static/css/layout.css index 83f03f5..6acaf6c 100644 --- a/app/static/css/layout.css +++ b/app/static/css/layout.css @@ -253,11 +253,10 @@ body.drawer-open .drawer-backdrop { opacity: 1; } #portfolio-panel { grid-area: portfolio; } #log-panel { grid-area: log; - /* Don't stretch to fill both grid rows; if the log is shorter than - the portfolio next to it, the surplus below would render as a big - empty white box. Aligning to the start makes the panel shrink to - its content and the dashboard background fills any gap. */ - align-self: start; + /* Stretch (default align-self) so the log panel's border reaches the + bottom of the portfolio next to it — the two right-hand panels + align cleanly. The log body itself sits at the top of the panel; + any height beyond its content is empty padding inside the box. */ } #news-panel { grid-area: news; } diff --git a/app/static/js/portfolio.js b/app/static/js/portfolio.js index b7f820f..0f3ecb4 100644 --- a/app/static/js/portfolio.js +++ b/app/static/js/portfolio.js @@ -387,10 +387,12 @@ }); // Re-hydrate any cached AI analysis so the 60s auto-refresh doesn't - // wipe it. Collapsed by default on hydration so the panel stays - // compact — click the header to expand. + // wipe it. Rendered expanded so the user keeps seeing the body they + // just generated — collapsing it under their cursor every minute + // reads as "the analysis disappeared". They can still click the + // header to collapse manually within a single refresh window. if (pie.analysis && pie.analysis.content) { - showAnalysis(pie.analysis, { open: false }); + showAnalysis(pie.analysis, { open: true }); } }