fix: improve mobile terminal alternate-screen detection and scrolling
- Revert touch-action: none on .xterm-viewport so xterm.js can fall back to its own viewport scrolling when the custom handler doesn't take over. - Detect alternate screen via reference equality (term.buffer.active === term.buffer.alternate) instead of the string, which could report normal buffer incorrectly. - Lower vertical-scroll activation threshold from 4px to 2px and only prevent default once a vertical gesture is recognized. - In normal buffer use term.scrollLines() so xterm.js handles the buffer scroll consistently; in alternate screen continue sending SGR 1006 mouse-wheel sequences to tmux/vim. Quality gates: typecheck, lint clean, npm test -- --run 87 passed.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
dir: apps/web/src/styles
|
||||
|
||||
## role
|
||||
Provides the complete visual design system and styling foundation for the web application, including themes, tokens, utilities, and component-specific styles.
|
||||
Provides the complete visual design system and styling foundation for the web application, encompassing global styles, design tokens, utility classes, and component-specific styles.
|
||||
## parent
|
||||
index: apps/web/src/.pi-map.index.md
|
||||
map: apps/web/src/.pi-map.md
|
||||
|
||||
@@ -4,16 +4,16 @@ dir: apps/web/src/styles
|
||||
index: apps/web/src/styles/.pi-map.index.md
|
||||
|
||||
## role
|
||||
Provides the complete visual design system and styling foundation for the web application, including themes, tokens, utilities, and component-specific styles.
|
||||
Provides the complete visual design system and styling foundation for the web application, encompassing global styles, design tokens, utility classes, and component-specific styles.
|
||||
## files
|
||||
- global.css | Defines global CSS styles for a web application shell layout, navigation, cards, forms, dialogs, settings pages, and responsive design patterns. | dep: CSS custom properties (CSS variables: --border, --panel, --brand, --muted, --ink, --bg, --danger, --success, --warning, --font-size-xs, --font-size-sm, --space-2, --space-3, --space-4, --space-5)
|
||||
- syntax-highlight.css | Stylesheet for a syntax highlighting component with toolbar, line numbers, code display, and Prism.js theme integration | dep: Prism.js
|
||||
- tokens.css | Defines a comprehensive CSS design token system with light/dark themes, spacing scales, breakpoints, and fluid typography for a web application.
|
||||
- utilities.css | Provides responsive CSS utility classes and component-specific styles for a web application including layout systems, terminal styling, session management, and mobile-first adaptations. | dep: CSS custom properties (var(--space-*), var(--border), var(--bg), var(--text), var(--brand), var(--success), var(--danger), var(--muted)), xterm.js (terminal library)
|
||||
- utilities.css | Provides responsive CSS utility classes and component-specific styles for a web application featuring terminals, dialogs, tables, forms, and navigation with mobile-first breakpoints | dep: CSS custom properties (variables like --space-*, --border, --bg, --brand, --muted, --success, --danger, --text-xs, --text-sm), xterm.js (terminal library)
|
||||
## arch
|
||||
Token-driven CSS architecture using CSS custom properties for light/dark theming, utility-first responsive classes, and modular separation of concerns across global styles, syntax highlighting, design tokens, and utility helpers.
|
||||
CSS custom properties (variables) based theming system with light/dark mode support, mobile-first responsive breakpoints, fluid typography scales, utility-first class patterns, and modular separation of concerns across tokens, utilities, global layouts, and component-specific styles.
|
||||
## tags
|
||||
var(, space, global, css, web, application, syntax, defines
|
||||
space, global, css, web, application, syntax, defines, styles
|
||||
## symbols
|
||||
-
|
||||
## workflows
|
||||
|
||||
@@ -551,14 +551,12 @@ a.nav-item,
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
touch-action: none;
|
||||
overscroll-behavior: none;
|
||||
}
|
||||
|
||||
/* Ensure xterm's internal viewport also disables browser gestures on mobile */
|
||||
/* Let xterm.js's own viewport handle touch; we only lock the outer page */
|
||||
.terminal-container .xterm-viewport {
|
||||
touch-action: none;
|
||||
overscroll-behavior: none;
|
||||
touch-action: auto;
|
||||
overscroll-behavior: auto;
|
||||
}
|
||||
|
||||
/* xterm.js manages its own positioning and sizing */
|
||||
@@ -572,8 +570,6 @@ a.nav-item,
|
||||
/* Mobile terminal container - no padding to maximize space */
|
||||
.terminal-wrapper.mobile .terminal-container {
|
||||
padding: 0;
|
||||
touch-action: none;
|
||||
overscroll-behavior: none;
|
||||
}
|
||||
|
||||
.terminal-wrapper.mobile {
|
||||
|
||||
Reference in New Issue
Block a user