From cc2a638c767d73dc931f151066e865c5f73b679a Mon Sep 17 00:00:00 2001 From: Fusion Date: Sun, 24 May 2026 12:06:22 +0200 Subject: [PATCH 1/3] feat: always show special keys strip on mobile terminal - Remove auto-hide behavior for special keys strip - Keep header auto-hide functionality - Special keys are now always visible for quick access --- apps/web/src/components/mobile-terminal-wrapper.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/web/src/components/mobile-terminal-wrapper.tsx b/apps/web/src/components/mobile-terminal-wrapper.tsx index 3e0e7d3..15421a5 100644 --- a/apps/web/src/components/mobile-terminal-wrapper.tsx +++ b/apps/web/src/components/mobile-terminal-wrapper.tsx @@ -33,12 +33,10 @@ export const MobileTerminalWrapper: React.FC = ({ } | null>(null); const headerAutoHide = useAutoHide({ timeout: 3000, enabled: isMobile }); - const keysAutoHide = useAutoHide({ timeout: 3000, enabled: isMobile }); const handleTerminalTap = useCallback(() => { headerAutoHide.toggle(); - keysAutoHide.toggle(); - }, [headerAutoHide, keysAutoHide]); + }, [headerAutoHide]); const handleTerminalReady = useCallback( (sendData: (data: string) => void, connectionStatus: "connecting" | "connected" | "disconnected" | "error", focusInput: () => void) => { @@ -92,7 +90,7 @@ export const MobileTerminalWrapper: React.FC = ({ setShowPanel(true)} onKeepFocus={() => terminalRef?.focusInput()} /> From 06fe8623bc12598f786b3468c95166b381b4fbf0 Mon Sep 17 00:00:00 2001 From: Fusion Date: Sun, 24 May 2026 12:11:53 +0200 Subject: [PATCH 2/3] fix: move hidden input off-screen and fix branch loading - Move terminal hidden input to off-screen position (-9999px) to prevent text selection/caret visibility on mobile - Add user-select: none to prevent any selection UI - Fix create-session-form to use new listRepositoryBranches API signature (projectId, repoId) and access response.branches/default_branch --- apps/web/src/components/create-session-form.tsx | 16 ++++++++-------- apps/web/src/styles.css | 8 +++++--- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/apps/web/src/components/create-session-form.tsx b/apps/web/src/components/create-session-form.tsx index 78a65d4..7dd8695 100644 --- a/apps/web/src/components/create-session-form.tsx +++ b/apps/web/src/components/create-session-form.tsx @@ -73,19 +73,19 @@ export const CreateSessionForm = ({ // Load branches when selected repo changes useEffect(() => { - if (!selectedRepo || !showCloneMode) { + const projectId = fixedProjectId || selectedProject; + if (!selectedRepo || !projectId || !showCloneMode) { setBranches([]); return; } const loadBranches = async () => { setIsLoadingBranches(true); try { - const branchList = await listRepositoryBranches(selectedRepo); - setBranches(branchList); - const defaultBranch = branchList.find((b) => b.is_default); - if (defaultBranch) { - setBranch(defaultBranch.name); - setBaseBranch(defaultBranch.name); + const response = await listRepositoryBranches(projectId, selectedRepo); + setBranches(response.branches); + if (response.default_branch) { + setBranch(response.default_branch); + setBaseBranch(response.default_branch); } } catch { // ignore @@ -94,7 +94,7 @@ export const CreateSessionForm = ({ } }; void loadBranches(); - }, [selectedRepo, showCloneMode]); + }, [selectedRepo, selectedProject, fixedProjectId, showCloneMode]); // Filter repositories by selected project const availableRepos = selectedProject diff --git a/apps/web/src/styles.css b/apps/web/src/styles.css index 2bcf502..bba8d38 100644 --- a/apps/web/src/styles.css +++ b/apps/web/src/styles.css @@ -3152,13 +3152,15 @@ a.nav-item, } .terminal-hidden-input { - position: absolute; - bottom: 0; - left: 0; + position: fixed; + left: -9999px; + top: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; + user-select: none; + -webkit-user-select: none; } /* Disable zoom on mobile terminal */ From f5c2c95af0a4e8be3fe3ff0dbe7444ed44f8d02e Mon Sep 17 00:00:00 2001 From: Fusion Date: Sun, 24 May 2026 12:14:11 +0200 Subject: [PATCH 3/3] fix: focus xterm terminal on tap instead of hidden input - Use term.focus() instead of hidden input focus - This ensures keyboard opens properly when tapping anywhere on terminal --- apps/web/src/components/terminal.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/terminal.tsx b/apps/web/src/components/terminal.tsx index 59e39c8..08a5776 100644 --- a/apps/web/src/components/terminal.tsx +++ b/apps/web/src/components/terminal.tsx @@ -275,10 +275,10 @@ export const TerminalComponent: React.FC = ({ } }; - // Focus hidden input on mobile to keep keyboard open + // Focus terminal on mobile to keep keyboard open const handleTerminalClick = () => { - if (isMobile && hiddenInputRef.current) { - hiddenInputRef.current.focus(); + if (isMobile && termRef.current) { + termRef.current.focus(); } };