ui: log panel stretches to portfolio bottom; AI analysis stays expanded

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
   <details> 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 <noreply@anthropic.com>
This commit is contained in:
Giorgio Gilestro 2026-05-29 12:35:10 +02:00
parent 6c4c711830
commit a55168d20a
2 changed files with 9 additions and 8 deletions

View file

@ -253,11 +253,10 @@ body.drawer-open .drawer-backdrop { opacity: 1; }
#portfolio-panel { grid-area: portfolio; } #portfolio-panel { grid-area: portfolio; }
#log-panel { #log-panel {
grid-area: log; grid-area: log;
/* Don't stretch to fill both grid rows; if the log is shorter than /* Stretch (default align-self) so the log panel's border reaches the
the portfolio next to it, the surplus below would render as a big bottom of the portfolio next to it the two right-hand panels
empty white box. Aligning to the start makes the panel shrink to align cleanly. The log body itself sits at the top of the panel;
its content and the dashboard background fills any gap. */ any height beyond its content is empty padding inside the box. */
align-self: start;
} }
#news-panel { grid-area: news; } #news-panel { grid-area: news; }

View file

@ -387,10 +387,12 @@
}); });
// Re-hydrate any cached AI analysis so the 60s auto-refresh doesn't // Re-hydrate any cached AI analysis so the 60s auto-refresh doesn't
// wipe it. Collapsed by default on hydration so the panel stays // wipe it. Rendered expanded so the user keeps seeing the body they
// compact — click the header to expand. // 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) { if (pie.analysis && pie.analysis.content) {
showAnalysis(pie.analysis, { open: false }); showAnalysis(pie.analysis, { open: true });
} }
} }