fix(ui): add opt-in mobile keyboard resize mode and stabilize touch terminal input (#1107)

* fix(ui): add opt-in mobile keyboard resize mode

* fix(ui): stabilize touch terminal input and tab layout

* fix(ui): narrow touch terminal handling to mobile and tablet

* fix(ui): refine touch terminal input handling

* fix(ui): re-key terminal viewport on session id

* fix(ui): avoid touch-laptop terminal overlay regression

* fix(ui): hide ghostty system caret surfaces

* fix(settings): normalize mobile keyboard mode sanitization

* fix(ui): honor terminal quick keys toggle on mobile

* fix(ui): gate mobile keyboard resize mode on iOS

---------

Co-authored-by: vhqtvn <8930337+vhqtvn@users.noreply.github.com>
Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
This commit is contained in:
vhqtvn
2026-05-05 12:26:34 +03:00
committed by GitHub
co-authored by vhqtvn Bohdan Triapitsyn
parent 63b4a5b996
commit 962ee41bba
25 changed files with 604 additions and 128 deletions
+4
View File
@@ -11,6 +11,7 @@ export interface DeviceInfo {
screenWidth: number;
breakpoint: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
hasTouchInput: boolean;
hasTouchOnlyPointer: boolean;
}
export const CSS_DEVICE_VARIABLES = {
@@ -100,6 +101,7 @@ export function getDeviceInfo(): DeviceInfo {
const { isExplicitTablet } = getNavigatorDeviceHints(maxTouchPoints);
const hasTouchInput = prefersCoarsePointer || noHover || maxTouchPoints > 0;
const hasTouchOnlyPointer = prefersCoarsePointer || noHover;
const isTabletWidth = width > BREAKPOINTS.md && width <= BREAKPOINTS.lg;
const isMobileWidth = width <= BREAKPOINTS.md;
@@ -140,6 +142,7 @@ export function getDeviceInfo(): DeviceInfo {
screenWidth: width,
breakpoint,
hasTouchInput,
hasTouchOnlyPointer,
};
}
@@ -231,6 +234,7 @@ export function useDeviceInfo(): DeviceInfo {
screenWidth: 1024,
breakpoint: 'lg',
hasTouchInput: false,
hasTouchOnlyPointer: false,
};
}
return getDeviceInfo();