fix: preserve scroll position when toggling Ralph Wiggum panel

- Save xterm viewport scroll position before toggle
- Restore scroll position after panel expand/collapse
- Refit terminal to new container size after layout change
- Add overflow-anchor: none to prevent browser scroll anchoring

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-20 17:24:42 +01:00
co-authored by Claude Opus 4.5
parent 69eada0632
commit eda7c0fd6c
2 changed files with 20 additions and 25 deletions
+1 -17
View File
@@ -462,6 +462,7 @@ body {
flex-shrink: 0;
overflow: hidden;
position: relative;
overflow-anchor: none; /* Prevent scroll anchoring when expanding/collapsing */
}
/* Mini Progress Ring (in summary) */
@@ -557,23 +558,6 @@ body {
50% { opacity: 0.6; transform: scale(1.2); }
}
.ralph-phrase-preview {
color: var(--text-dim);
font-size: 0.7rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 200px;
}
.ralph-phrase-preview code {
background: var(--bg-input);
padding: 0.1rem 0.3rem;
border-radius: 2px;
font-family: 'SF Mono', Monaco, monospace;
font-size: 0.65rem;
}
/* Summary Stats */
.ralph-summary-stats {
display: flex;