refactor: Unify sync server and combine torch with connection UI

- Consolidate git and torch WebSocket servers on port 4105
- Create separate handlers for git and torch in handlers/ directory
- Combine TorchButton with connection status into single pill button
- Remove StatusBar (now redundant with TorchButton)
- Remove auto-assign torch on register/disconnect
- Remove auto-connect to MCP on page load
- Connection only happens when user explicitly requests torch
This commit is contained in:
2026-02-14 17:13:32 -06:00
parent c98f3e2b99
commit 0f73bd60bf
13 changed files with 519 additions and 434 deletions

View File

@@ -1,7 +1,6 @@
<script setup lang="ts">
import { ref, onMounted, onUnmounted, watch } from 'vue'
import { RouterView, useRoute, useRouter } from 'vue-router'
import StatusBar from './components/StatusBar.vue'
import Toolbar from './components/Toolbar.vue'
import TorchButton from './components/TorchButton.vue'
import FloatingTerminal from './components/FloatingTerminal.vue'
@@ -348,7 +347,6 @@ watch(() => route.name, (newPage) => {
<header class="app-header">
<div class="header-left">
<h1 class="logo">Agent UI</h1>
<TorchButton />
<button class="debug-btn" :class="{ active: showDebugConsole }" @click="showDebugConsole = !showDebugConsole" title="Debug Console">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 20h9"/><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"/>
@@ -357,13 +355,15 @@ watch(() => route.name, (newPage) => {
</button>
<PwaInstallBanner />
</div>
<button class="refresh-btn" @click="hardRefresh" title="Hard refresh (Ctrl+F5)">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"/>
<path d="M21 3v5h-5"/>
</svg>
</button>
<StatusBar />
<div class="header-right">
<button class="refresh-btn" @click="hardRefresh" title="Hard refresh (Ctrl+F5)">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"/>
<path d="M21 3v5h-5"/>
</svg>
</button>
<TorchButton />
</div>
</header>
<main class="app-main">
<Toolbar />
@@ -545,6 +545,12 @@ watch(() => route.name, (newPage) => {
gap: 1.5rem;
}
.header-right {
display: flex;
align-items: center;
gap: 0.75rem;
}
.logo {
font-size: 1.25rem;
font-weight: 600;