feat(v2): scaffold Tauri 2.x + Svelte 5 project (Phase 1)

- Tauri 2.10 + Svelte 5.45 + TypeScript + Vite 7
- Catppuccin Mocha theme with CSS variables and semantic aliases
- CSS Grid layout: sidebar (260px) + workspace, responsive breakpoints
  for ultrawide (3440px+) and narrow (<1200px)
- Component structure: Layout/, Terminal/, Agent/, Markdown/, Sidebar/
- Svelte 5 stores with $state runes: sessions, agents, layout
- SDK message adapter (abstracts Agent SDK wire format)
- PTY bridge (Tauri IPC wrapper, stubbed for Phase 2)
- Node.js sidecar entry point (stdio NDJSON, stubbed for Phase 3)
- Rust modules: pty, sidecar, watcher, session (stubbed)
- Vite dev server on port 9700
- Build verified: binary + .deb + .rpm + AppImage all produced
This commit is contained in:
Hibryda 2026-03-05 23:26:27 +01:00
parent 5996615e68
commit 758d626fab
51 changed files with 2287 additions and 0 deletions

View file

@ -0,0 +1,54 @@
<script lang="ts">
import type { Snippet } from 'svelte';
interface Props {
title: string;
children: Snippet;
}
let { title, children }: Props = $props();
</script>
<div class="pane-container">
<div class="pane-header">
<span class="pane-title">{title}</span>
</div>
<div class="pane-content">
{@render children()}
</div>
</div>
<style>
.pane-container {
display: flex;
flex-direction: column;
background: var(--bg-secondary);
border-radius: var(--border-radius);
overflow: hidden;
border: 1px solid var(--border);
}
.pane-header {
height: var(--pane-header-height);
display: flex;
align-items: center;
padding: 0 10px;
background: var(--bg-tertiary);
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.pane-title {
font-size: 12px;
font-weight: 500;
color: var(--text-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.pane-content {
flex: 1;
overflow: auto;
}
</style>

View file

@ -0,0 +1,44 @@
<script lang="ts">
interface Props {
title: string;
status?: 'idle' | 'running' | 'error' | 'done';
}
let { title, status = 'idle' }: Props = $props();
</script>
<div class="pane-header">
<span class="pane-title">{title}</span>
{#if status !== 'idle'}
<span class="status-indicator {status}">{status}</span>
{/if}
</div>
<style>
.pane-header {
height: var(--pane-header-height);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 10px;
background: var(--bg-tertiary);
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.pane-title {
font-size: 12px;
font-weight: 500;
color: var(--text-secondary);
}
.status-indicator {
font-size: 10px;
padding: 2px 6px;
border-radius: 3px;
}
.status-indicator.running { color: var(--ctp-blue); }
.status-indicator.error { color: var(--ctp-red); }
.status-indicator.done { color: var(--ctp-green); }
</style>

View file

@ -0,0 +1,58 @@
<script lang="ts">
import PaneContainer from './PaneContainer.svelte';
// Phase 2: dynamic pane management, resize, presets
// For now: single empty pane as placeholder
</script>
<div class="tiling-grid">
<PaneContainer title="Welcome">
<div class="welcome">
<h1>BTerminal v2</h1>
<p>Claude Agent Mission Control</p>
<div class="status">
<span class="badge">Phase 1 — Scaffold</span>
</div>
</div>
</PaneContainer>
</div>
<style>
.tiling-grid {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: 1fr;
gap: var(--pane-gap);
height: 100%;
padding: var(--pane-gap);
}
.welcome {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
gap: 8px;
color: var(--text-muted);
}
.welcome h1 {
font-size: 24px;
font-weight: 700;
color: var(--text-primary);
}
.welcome p {
font-size: 14px;
}
.badge {
background: var(--bg-surface);
color: var(--accent);
padding: 4px 12px;
border-radius: var(--border-radius);
font-size: 12px;
margin-top: 8px;
}
</style>

View file

@ -0,0 +1,39 @@
<script lang="ts">
// Phase 4: session CRUD, groups, types
</script>
<div class="session-list">
<div class="header">
<h2>Sessions</h2>
</div>
<div class="empty-state">
<p>No sessions yet.</p>
<p class="hint">Phase 2 will add terminal sessions.</p>
</div>
</div>
<style>
.session-list {
padding: 12px;
}
.header h2 {
font-size: 14px;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 12px;
}
.empty-state {
color: var(--text-muted);
font-size: 12px;
text-align: center;
padding: 24px 0;
}
.hint {
margin-top: 4px;
font-size: 11px;
color: var(--ctp-overlay0);
}
</style>