fix: fit view — reapply layout on session close, show more lines, bottom-anchor content
Bug 1: closeSession() didn't call applyFitLayout when returning to
dashboard — tiles kept old heights from before the overview was hidden.
Fix: add rAF call after overview.style.display = '' so the layout is
remeasured once the overview becomes visible again.
Bug 2: Only 20 lines shown in tiles — not enough for tall fit-mode
tiles, and content sat at the top. Fix:
- buildTileHTML shows 80 lines in fit mode (vs 20 in auto)
- renderGrid rAF sets pre.scrollTop = pre.scrollHeight after
applyFitLayout so content anchors at the bottom (like a real
terminal). Hidden scrollbar via scrollbar-width:none + ::-webkit.
Tests: 3 new source-scan tests added and verified RED before GREEN.
This commit is contained in:
@@ -1380,10 +1380,16 @@ body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* In fit mode, stretch pre to fill the full tile body height (not just bottom-anchor) */
|
||||
/* In fit mode, stretch pre to fill the full tile body height and anchor content to bottom */
|
||||
.session-grid--fit .tile-body pre {
|
||||
top: 0; /* stretch to fill full tile body height in fit mode */
|
||||
overflow-y: auto; /* scroll if content exceeds the tile */
|
||||
top: 0; /* stretch to fill full tile body height in fit mode */
|
||||
overflow-y: scroll; /* enable scrollTop positioning (content anchored via JS scrollTop=scrollHeight) */
|
||||
scrollbar-width: none; /* Firefox: hide scrollbar */
|
||||
-ms-overflow-style: none; /* IE/Edge: hide scrollbar */
|
||||
}
|
||||
|
||||
.session-grid--fit .tile-body pre::-webkit-scrollbar {
|
||||
display: none; /* Chrome/Safari: hide scrollbar */
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
|
||||
Reference in New Issue
Block a user