From 80f39d8fae5799685ea260f01d7dcdcb677aadfe Mon Sep 17 00:00:00 2001 From: cvsloane Date: Sat, 14 Feb 2026 11:53:39 -0500 Subject: [PATCH] fix: smooth mobile terminal gesture axis lock --- apps/dashboard/src/components/TerminalView.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/apps/dashboard/src/components/TerminalView.tsx b/apps/dashboard/src/components/TerminalView.tsx index 54db6cf6..1078c9d9 100644 --- a/apps/dashboard/src/components/TerminalView.tsx +++ b/apps/dashboard/src/components/TerminalView.tsx @@ -535,14 +535,31 @@ export function TerminalView({ sessionId, paneId, className }: TerminalViewProps const AXIS_RATIO = 1.2; if (absDy < MOVE_THRESHOLD && absDx < MOVE_THRESHOLD) { + touchState.lastY = touch.clientY; + touchState.lastX = touch.clientX; return; } if (absDy > absDx * AXIS_RATIO) { touchState.axis = 'vertical'; + touchState.lastY = touch.clientY; + touchState.lastX = touch.clientX; + touchState.lastTime = performance.now(); + touchState.velocity = 0; + touchState.remainder = 0; + return; } else if (absDx > absDy * AXIS_RATIO) { touchState.axis = 'horizontal'; + touchState.lastY = touch.clientY; + touchState.lastX = touch.clientX; + touchState.lastTime = performance.now(); + touchState.velocity = 0; + touchState.remainder = 0; + return; } else { + touchState.lastY = touch.clientY; + touchState.lastX = touch.clientX; + touchState.lastTime = performance.now(); return; // ambiguous; wait for clearer intent } }