fix: prevent terminal container from overflowing page on desktop

The desktop terminal page sometimes grew an outer scrollbar because the
terminal instance/wrapper/container chain lacked height constraints.
Without min/max-height enforcement, xterm.js's internal viewport could
expand its parent flex/grid track past the available space.

- Add overflow: hidden to .terminal-page.
- Add max-height: 100% and overflow: hidden to .terminal-instance.
- Add max-height: 100% to .terminal-wrapper.
- Add min-height: 0 to .terminal-container.
- Constrain .xterm-viewport to max-height/width 100% so it fills but
  never exceeds its container.

Quality gates: npm run typecheck, npm run lint, npm test -- --run (87 passed).

Refs: openspec/changes/fix-terminal-container-overflow
This commit is contained in:
Developer
2026-06-14 09:07:43 +00:00
parent 84cf423684
commit ac9f7a9299
13 changed files with 75 additions and 17 deletions
+7
View File
@@ -439,6 +439,7 @@ a.nav-item,
min-height: 0;
padding: var(--space-4);
gap: var(--space-4);
overflow: hidden;
}
.terminal-page-header {
@@ -457,6 +458,7 @@ a.nav-item,
grid-template-rows: auto 1fr;
flex: 1;
min-height: 0;
max-height: 100%;
border: 1px solid var(--border);
border-radius: 10px;
overflow: hidden;
@@ -549,6 +551,7 @@ a.nav-item,
position: relative;
width: 100%;
height: 100%;
min-height: 0;
padding: 0;
overflow: hidden;
}
@@ -557,6 +560,8 @@ a.nav-item,
.terminal-container .xterm-viewport {
touch-action: auto;
overscroll-behavior: auto;
max-height: 100% !important;
width: 100% !important;
}
/* xterm.js manages its own positioning and sizing */
@@ -767,7 +772,9 @@ a.nav-item,
.terminal-instance {
flex: 1;
min-height: 0;
max-height: 100%;
display: none;
overflow: hidden;
}
.terminal-instance.active {