From a856fefd982fdbd66af2562b58d71701e3e38be2 Mon Sep 17 00:00:00 2001 From: josedario87 Date: Sat, 14 Feb 2026 05:49:16 -0600 Subject: [PATCH] feat: Add Git page with branch selector, commit history, and diff viewer Includes FileTree, CommitList, BranchSelector and DiffViewer components, Git API routes, and mobile keyboard visibility handling for FAB buttons --- frontend/src/App.vue | 32 +- frontend/src/components/Toolbar.vue | 9 + .../src/components/git/BranchSelector.vue | 263 ++++ frontend/src/components/git/CommitList.vue | 243 ++++ frontend/src/components/git/DiffViewer.vue | 310 +++++ frontend/src/components/git/FileTree.vue | 199 +++ frontend/src/components/git/index.ts | 4 + frontend/src/composables/git/index.ts | 1 + frontend/src/composables/git/useGitApi.ts | 138 +++ frontend/src/pages/GitPage.vue | 1075 +++++++++++++++++ frontend/src/router/index.ts | 5 + frontend/src/services/toolRegistry.ts | 12 +- .../services/tools/handlers/gitHandlers.ts | 273 +++++ frontend/src/services/tools/handlers/index.ts | 3 +- .../src/services/tools/toolDefinitions.ts | 14 +- frontend/src/types/git.ts | 70 ++ server/routes/git.ts | 346 ++++++ server/routes/index.ts | 31 + 18 files changed, 3015 insertions(+), 13 deletions(-) create mode 100644 frontend/src/components/git/BranchSelector.vue create mode 100644 frontend/src/components/git/CommitList.vue create mode 100644 frontend/src/components/git/DiffViewer.vue create mode 100644 frontend/src/components/git/FileTree.vue create mode 100644 frontend/src/components/git/index.ts create mode 100644 frontend/src/composables/git/index.ts create mode 100644 frontend/src/composables/git/useGitApi.ts create mode 100644 frontend/src/pages/GitPage.vue create mode 100644 frontend/src/services/tools/handlers/gitHandlers.ts create mode 100644 frontend/src/types/git.ts create mode 100644 server/routes/git.ts diff --git a/frontend/src/App.vue b/frontend/src/App.vue index cfa3bbc..ed1aed5 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -84,6 +84,7 @@ const awaitingPermission = ref(false) // Waiting for user permission (highest pr const showSessionStart = ref(false) // Session start animation (3s) const showNotification = ref(false) // Notification pulse (2s) const showToolFlash = ref(false) // Tool use flash (500ms) +const keyboardVisible = ref(false) // Virtual keyboard visible let statusWs: WebSocket | null = null let statusReconnectTimeout: number | null = null @@ -311,6 +312,16 @@ onMounted(async () => { } }) + // Detect virtual keyboard on mobile + if (window.visualViewport) { + const initialHeight = window.visualViewport.height + window.visualViewport.addEventListener('resize', () => { + const currentHeight = window.visualViewport!.height + // If viewport shrinks significantly, keyboard is likely open + keyboardVisible.value = currentHeight < initialHeight * 0.75 + }) + } + // Start polling for token if not connected const webmcp = getWebMCP() if (!webmcp?.isConnected) { @@ -387,7 +398,8 @@ watch(() => route.name, (newPage) => { 'session-start': showSessionStart, notification: showNotification, 'tool-flash': showToolFlash, - 'sheet-open': showTerminal || showVoice + 'sheet-open': showTerminal || showVoice, + 'keyboard-visible': keyboardVisible }" @click="showTerminal = !showTerminal" :title="awaitingPermission ? `Permiso requerido: ${claudeTool || 'herramienta'}` : isProcessing ? `Claude: ${claudeTool || 'processing'}` : 'Toggle Terminal'" @@ -460,7 +472,7 @@ watch(() => route.name, (newPage) => {