tanuki-telemetry 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/Dockerfile +22 -0
  2. package/bin/tanuki.mjs +251 -0
  3. package/frontend/eslint.config.js +23 -0
  4. package/frontend/index.html +13 -0
  5. package/frontend/package.json +39 -0
  6. package/frontend/src/App.tsx +232 -0
  7. package/frontend/src/assets/hero.png +0 -0
  8. package/frontend/src/assets/react.svg +1 -0
  9. package/frontend/src/assets/vite.svg +1 -0
  10. package/frontend/src/components/ArtifactsPanel.tsx +429 -0
  11. package/frontend/src/components/ChildStreams.tsx +176 -0
  12. package/frontend/src/components/CoordinatorPage.tsx +317 -0
  13. package/frontend/src/components/Header.tsx +108 -0
  14. package/frontend/src/components/InsightsPanel.tsx +142 -0
  15. package/frontend/src/components/IterationsTable.tsx +98 -0
  16. package/frontend/src/components/KnowledgePage.tsx +308 -0
  17. package/frontend/src/components/LoginPage.tsx +55 -0
  18. package/frontend/src/components/PlanProgress.tsx +163 -0
  19. package/frontend/src/components/QualityReport.tsx +276 -0
  20. package/frontend/src/components/ScreenshotUpload.tsx +117 -0
  21. package/frontend/src/components/ScreenshotsGrid.tsx +266 -0
  22. package/frontend/src/components/SessionDetail.tsx +265 -0
  23. package/frontend/src/components/SessionList.tsx +234 -0
  24. package/frontend/src/components/SettingsPage.tsx +213 -0
  25. package/frontend/src/components/StreamComms.tsx +228 -0
  26. package/frontend/src/components/TanukiLogo.tsx +16 -0
  27. package/frontend/src/components/Timeline.tsx +416 -0
  28. package/frontend/src/components/WalkthroughPage.tsx +458 -0
  29. package/frontend/src/hooks/useApi.ts +81 -0
  30. package/frontend/src/hooks/useAuth.ts +54 -0
  31. package/frontend/src/hooks/useKnowledge.ts +33 -0
  32. package/frontend/src/hooks/useWebSocket.ts +95 -0
  33. package/frontend/src/index.css +66 -0
  34. package/frontend/src/lib/api.ts +15 -0
  35. package/frontend/src/lib/utils.ts +58 -0
  36. package/frontend/src/main.tsx +10 -0
  37. package/frontend/src/types.ts +181 -0
  38. package/frontend/tsconfig.app.json +32 -0
  39. package/frontend/tsconfig.json +7 -0
  40. package/frontend/vite.config.ts +25 -0
  41. package/install.sh +87 -0
  42. package/package.json +63 -0
  43. package/src/api-keys.ts +97 -0
  44. package/src/auth.ts +165 -0
  45. package/src/coordinator.ts +136 -0
  46. package/src/dashboard-server.ts +5 -0
  47. package/src/dashboard.ts +826 -0
  48. package/src/db.ts +1009 -0
  49. package/src/index.ts +20 -0
  50. package/src/middleware.ts +76 -0
  51. package/src/tools.ts +864 -0
  52. package/src/types-shim.d.ts +18 -0
  53. package/src/types.ts +171 -0
  54. package/tsconfig.json +19 -0
package/Dockerfile ADDED
@@ -0,0 +1,22 @@
1
+ FROM node:22-alpine
2
+
3
+ WORKDIR /app
4
+
5
+ # Install backend deps
6
+ COPY package.json ./
7
+ RUN npm install
8
+
9
+ # Build backend
10
+ COPY tsconfig.json ./
11
+ COPY src/ ./src/
12
+ RUN npm run build
13
+
14
+ # Build frontend
15
+ COPY frontend/package.json ./frontend/
16
+ RUN cd frontend && npm install --legacy-peer-deps
17
+ COPY frontend/ ./frontend/
18
+ RUN cd frontend && npx vite build
19
+
20
+ RUN mkdir -p /data
21
+
22
+ ENTRYPOINT ["node", "dist/dashboard-server.js"]
package/bin/tanuki.mjs ADDED
@@ -0,0 +1,251 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { execSync, spawn } from "child_process";
4
+ import fs from "fs";
5
+ import path from "path";
6
+ import os from "os";
7
+ import { createRequire } from "module";
8
+
9
+ const require = createRequire(import.meta.url);
10
+ const pkg = require("../package.json");
11
+
12
+ const VERSION = pkg.version;
13
+ const TANUKI_DIR = process.env.TANUKI_DIR || path.join(os.homedir(), ".tanuki");
14
+ const DATA_DIR = process.env.TANUKI_DATA || path.join(os.homedir(), ".tanuki/data");
15
+ const PORT = process.env.TANUKI_PORT || "3333";
16
+
17
+ const args = process.argv.slice(2);
18
+ const command = args[0] || "start";
19
+
20
+ const HELP = `
21
+ tanuki v${VERSION} — workflow monitor for Claude Code
22
+
23
+ Usage:
24
+ npx tanuki-telemetry Start dashboard (default)
25
+ npx tanuki-telemetry start Start dashboard on port ${PORT}
26
+ npx tanuki-telemetry stop Stop dashboard
27
+ npx tanuki-telemetry status Check if running
28
+ npx tanuki-telemetry setup Configure Claude Code MCP
29
+ npx tanuki-telemetry update Rebuild with latest code
30
+ npx tanuki-telemetry version Show version
31
+
32
+ Environment:
33
+ TANUKI_PORT Dashboard port (default: 3333)
34
+ TANUKI_DATA Data directory (default: ~/.tanuki/data)
35
+ `;
36
+
37
+ function run(cmd, opts = {}) {
38
+ try {
39
+ return execSync(cmd, { encoding: "utf-8", stdio: opts.quiet ? "pipe" : "inherit", ...opts });
40
+ } catch (e) {
41
+ if (!opts.ignoreError) {
42
+ console.error(` Error: ${e.message}`);
43
+ process.exit(1);
44
+ }
45
+ return "";
46
+ }
47
+ }
48
+
49
+ function checkDocker() {
50
+ try {
51
+ execSync("docker info", { stdio: "pipe" });
52
+ } catch {
53
+ console.error(" Error: Docker is not running. Start Docker Desktop first.");
54
+ process.exit(1);
55
+ }
56
+ }
57
+
58
+ function isRunning() {
59
+ try {
60
+ const out = execSync("docker ps --filter name=tanuki-dashboard --format '{{.ID}}'", { encoding: "utf-8", stdio: "pipe" });
61
+ return out.trim().length > 0;
62
+ } catch {
63
+ return false;
64
+ }
65
+ }
66
+
67
+ function copySourceToTanukiDir() {
68
+ // The source code is wherever this package was installed/run from
69
+ const srcDir = path.resolve(path.dirname(import.meta.url.replace("file://", "")), "..");
70
+
71
+ if (srcDir === TANUKI_DIR) return; // already in place
72
+
73
+ // Copy source to TANUKI_DIR for Docker builds
74
+ fs.mkdirSync(TANUKI_DIR, { recursive: true });
75
+
76
+ const filesToCopy = ["package.json", "tsconfig.json", "Dockerfile"];
77
+ const dirsToCopy = ["src", "frontend"];
78
+
79
+ for (const f of filesToCopy) {
80
+ const src = path.join(srcDir, f);
81
+ if (fs.existsSync(src)) {
82
+ fs.copyFileSync(src, path.join(TANUKI_DIR, f));
83
+ }
84
+ }
85
+
86
+ for (const d of dirsToCopy) {
87
+ const src = path.join(srcDir, d);
88
+ if (fs.existsSync(src)) {
89
+ copyDirSync(src, path.join(TANUKI_DIR, d));
90
+ }
91
+ }
92
+ }
93
+
94
+ function copyDirSync(src, dest) {
95
+ fs.mkdirSync(dest, { recursive: true });
96
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
97
+ const srcPath = path.join(src, entry.name);
98
+ const destPath = path.join(dest, entry.name);
99
+ if (entry.name === "node_modules" || entry.name === "dist" || entry.name === ".git") continue;
100
+ if (entry.isDirectory()) {
101
+ copyDirSync(srcPath, destPath);
102
+ } else {
103
+ fs.copyFileSync(srcPath, destPath);
104
+ }
105
+ }
106
+ }
107
+
108
+ function buildImages() {
109
+ console.log(" Building Docker images...");
110
+ run(`docker build -t tanuki-mcp:latest -t tanuki-dashboard:latest -t telemetry-mcp:latest -t telemetry-dashboard:latest "${TANUKI_DIR}" -q`);
111
+ }
112
+
113
+ function startDashboard() {
114
+ console.log(` Starting dashboard on port ${PORT}...`);
115
+ run("docker rm -f tanuki-dashboard 2>/dev/null || true", { quiet: true, ignoreError: true });
116
+ run("docker rm -f telemetry-dashboard 2>/dev/null || true", { quiet: true, ignoreError: true });
117
+ run(`docker run -d --rm --name tanuki-dashboard -p ${PORT}:3333 -v "${DATA_DIR}:/data" tanuki-dashboard:latest`, { quiet: true });
118
+ }
119
+
120
+ function printMcpConfig() {
121
+ const config = {
122
+ telemetry: {
123
+ type: "stdio",
124
+ command: "docker",
125
+ args: ["run", "--rm", "-i", "-v", `${DATA_DIR}:/data`, "--entrypoint", "node", "tanuki-mcp:latest", "dist/index.js"]
126
+ }
127
+ };
128
+ return JSON.stringify(config, null, 2);
129
+ }
130
+
131
+ // --- Commands ---
132
+
133
+ if (command === "help" || command === "--help" || command === "-h") {
134
+ console.log(HELP);
135
+ process.exit(0);
136
+ }
137
+
138
+ if (command === "version" || command === "--version" || command === "-v") {
139
+ console.log(`tanuki v${VERSION}`);
140
+ process.exit(0);
141
+ }
142
+
143
+ console.log("");
144
+ console.log(` TANUKI v${VERSION}`);
145
+ console.log("");
146
+
147
+ if (command === "start") {
148
+ checkDocker();
149
+ fs.mkdirSync(DATA_DIR, { recursive: true });
150
+
151
+ if (isRunning()) {
152
+ console.log(` Already running at http://localhost:${PORT}`);
153
+ process.exit(0);
154
+ }
155
+
156
+ copySourceToTanukiDir();
157
+
158
+ // Check if images exist
159
+ const hasImage = (() => {
160
+ try {
161
+ execSync("docker image inspect tanuki-dashboard:latest", { stdio: "pipe" });
162
+ return true;
163
+ } catch { return false; }
164
+ })();
165
+
166
+ if (!hasImage) {
167
+ buildImages();
168
+ }
169
+
170
+ startDashboard();
171
+
172
+ // Wait for health
173
+ let healthy = false;
174
+ for (let i = 0; i < 10; i++) {
175
+ try {
176
+ const res = execSync(`curl -s http://localhost:${PORT}/health`, { encoding: "utf-8", stdio: "pipe" });
177
+ if (res.includes('"ok":true')) { healthy = true; break; }
178
+ } catch {}
179
+ execSync("sleep 1", { stdio: "pipe" });
180
+ }
181
+
182
+ if (healthy) {
183
+ console.log(` Dashboard running at http://localhost:${PORT}`);
184
+ } else {
185
+ console.log(` Dashboard starting — check http://localhost:${PORT}`);
186
+ }
187
+ console.log("");
188
+ }
189
+
190
+ else if (command === "stop") {
191
+ console.log(" Stopping dashboard...");
192
+ run("docker rm -f tanuki-dashboard 2>/dev/null || true", { quiet: true, ignoreError: true });
193
+ run("docker rm -f telemetry-dashboard 2>/dev/null || true", { quiet: true, ignoreError: true });
194
+ console.log(" Stopped.");
195
+ console.log("");
196
+ }
197
+
198
+ else if (command === "status") {
199
+ if (isRunning()) {
200
+ try {
201
+ const health = execSync(`curl -s http://localhost:${PORT}/health`, { encoding: "utf-8", stdio: "pipe" });
202
+ const parsed = JSON.parse(health);
203
+ console.log(` Running at http://localhost:${PORT} (v${parsed.version})`);
204
+ } catch {
205
+ console.log(` Container running but health check failed`);
206
+ }
207
+ } else {
208
+ console.log(" Not running. Use 'npx tanuki-telemetry start' to start.");
209
+ }
210
+ console.log("");
211
+ }
212
+
213
+ else if (command === "setup") {
214
+ console.log(" Add this to your ~/.claude.json under \"mcpServers\":");
215
+ console.log("");
216
+ console.log(printMcpConfig());
217
+ console.log("");
218
+
219
+ // Check if already configured
220
+ const claudeConfig = path.join(os.homedir(), ".claude.json");
221
+ if (fs.existsSync(claudeConfig)) {
222
+ const content = fs.readFileSync(claudeConfig, "utf-8");
223
+ if (content.includes('"telemetry"')) {
224
+ console.log(" (Already configured in .claude.json)");
225
+ }
226
+ }
227
+ console.log("");
228
+ }
229
+
230
+ else if (command === "update") {
231
+ checkDocker();
232
+ copySourceToTanukiDir();
233
+ buildImages();
234
+
235
+ if (isRunning()) {
236
+ console.log(" Restarting dashboard...");
237
+ run("docker rm -f tanuki-dashboard 2>/dev/null || true", { quiet: true, ignoreError: true });
238
+ run("docker rm -f telemetry-dashboard 2>/dev/null || true", { quiet: true, ignoreError: true });
239
+ startDashboard();
240
+ console.log(` Updated and running at http://localhost:${PORT}`);
241
+ } else {
242
+ console.log(" Images rebuilt. Run 'npx tanuki-telemetry start' to launch.");
243
+ }
244
+ console.log("");
245
+ }
246
+
247
+ else {
248
+ console.error(` Unknown command: ${command}`);
249
+ console.log(HELP);
250
+ process.exit(1);
251
+ }
@@ -0,0 +1,23 @@
1
+ import js from '@eslint/js'
2
+ import globals from 'globals'
3
+ import reactHooks from 'eslint-plugin-react-hooks'
4
+ import reactRefresh from 'eslint-plugin-react-refresh'
5
+ import tseslint from 'typescript-eslint'
6
+ import { defineConfig, globalIgnores } from 'eslint/config'
7
+
8
+ export default defineConfig([
9
+ globalIgnores(['dist']),
10
+ {
11
+ files: ['**/*.{ts,tsx}'],
12
+ extends: [
13
+ js.configs.recommended,
14
+ tseslint.configs.recommended,
15
+ reactHooks.configs.flat.recommended,
16
+ reactRefresh.configs.vite,
17
+ ],
18
+ languageOptions: {
19
+ ecmaVersion: 2020,
20
+ globals: globals.browser,
21
+ },
22
+ },
23
+ ])
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>tanuki</title>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ <script type="module" src="/src/main.tsx"></script>
12
+ </body>
13
+ </html>
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "frontend",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc -b && vite build",
9
+ "lint": "eslint .",
10
+ "preview": "vite preview"
11
+ },
12
+ "dependencies": {
13
+ "class-variance-authority": "^0.7.1",
14
+ "clsx": "^2.1.1",
15
+ "gsap": "^3.14.2",
16
+ "lucide-react": "^0.577.0",
17
+ "react": "^19.2.4",
18
+ "react-dom": "^19.2.4",
19
+ "react-is": "^19.2.4",
20
+ "recharts": "^3.8.0",
21
+ "tailwind-merge": "^3.5.0"
22
+ },
23
+ "devDependencies": {
24
+ "@eslint/js": "^9.39.4",
25
+ "@tailwindcss/vite": "^4.2.1",
26
+ "@types/node": "^24.12.0",
27
+ "@types/react": "^19.2.14",
28
+ "@types/react-dom": "^19.2.3",
29
+ "@vitejs/plugin-react": "^6.0.0",
30
+ "eslint": "^9.39.4",
31
+ "eslint-plugin-react-hooks": "^7.0.1",
32
+ "eslint-plugin-react-refresh": "^0.5.2",
33
+ "globals": "^17.4.0",
34
+ "tailwindcss": "^4.2.1",
35
+ "typescript": "~5.9.3",
36
+ "typescript-eslint": "^8.56.1",
37
+ "vite": "^8.0.0"
38
+ }
39
+ }
@@ -0,0 +1,232 @@
1
+ import { useState, useEffect, useRef } from "react"
2
+ import gsap from "gsap"
3
+ import { Header } from "@/components/Header"
4
+ import { SessionList } from "@/components/SessionList"
5
+ import { SessionDetail } from "@/components/SessionDetail"
6
+ import { KnowledgePage } from "@/components/KnowledgePage"
7
+ import { CoordinatorPage } from "@/components/CoordinatorPage"
8
+ import { LoginPage } from "@/components/LoginPage"
9
+ import { SettingsPage } from "@/components/SettingsPage"
10
+ import { WalkthroughPage } from "@/components/WalkthroughPage"
11
+ import { useAuth } from "@/hooks/useAuth"
12
+ import { useStats, useSessions, useSessionDetail } from "@/hooks/useApi"
13
+ import { useWebSocket } from "@/hooks/useWebSocket"
14
+ import { cn } from "@/lib/utils"
15
+
16
+ type Tab = "sessions" | "knowledge" | "coordinator" | "walkthroughs" | "settings"
17
+
18
+ export default function App() {
19
+ const { user, loading: authLoading, authEnabled } = useAuth()
20
+ const [tab, setTab] = useState<Tab>("coordinator")
21
+ const [filter, setFilter] = useState("")
22
+ const [activeId, setActiveId] = useState<string | null>(null)
23
+ const [parentId, setParentId] = useState<string | null>(null)
24
+
25
+ const tabBarRef = useRef<HTMLDivElement>(null)
26
+
27
+ const { stats, reload: reloadStats } = useStats()
28
+ const { sessions, reload: reloadSessions } = useSessions(filter)
29
+ const { detail, loading, reload: reloadDetail } = useSessionDetail(activeId)
30
+ const { status: wsStatus, messages } = useWebSocket()
31
+
32
+ // Staggered fade-in for tab bar
33
+ useEffect(() => {
34
+ if (!tabBarRef.current) return
35
+ gsap.fromTo(
36
+ tabBarRef.current.children,
37
+ { opacity: 0 },
38
+ { opacity: 1, duration: 0.3, stagger: 0.06, ease: "power2.out" }
39
+ )
40
+ }, [])
41
+
42
+ // Navigate to a child session, remembering the parent
43
+ const handleSelectSession = (id: string) => {
44
+ if (detail?.session) {
45
+ setParentId(detail.session.id)
46
+ }
47
+ setActiveId(id)
48
+ }
49
+
50
+ // Navigate back to parent
51
+ const handleBackToParent = () => {
52
+ if (parentId) {
53
+ setActiveId(parentId)
54
+ setParentId(null)
55
+ } else if (detail?.session?.parent_session_id) {
56
+ setActiveId(detail.session.parent_session_id)
57
+ }
58
+ }
59
+
60
+ // React to WebSocket messages
61
+ useEffect(() => {
62
+ if (messages.length === 0) return
63
+ const latest = messages[messages.length - 1]
64
+
65
+ if (latest.type === "session_new" || latest.type === "session_update") {
66
+ reloadSessions()
67
+ reloadStats()
68
+ }
69
+
70
+ if (activeId) {
71
+ const affectsActive =
72
+ (latest.type === "event" && latest.data.session_id === activeId) ||
73
+ (latest.type === "iteration" && latest.data.session_id === activeId) ||
74
+ (latest.type === "screenshot" && latest.data.session_id === activeId) ||
75
+ (latest.type === "artifact" && latest.data.session_id === activeId) ||
76
+ (latest.type === "insight" && latest.data.session_id === activeId) ||
77
+ (latest.type === "plan_step_new" && latest.data.session_id === activeId) ||
78
+ (latest.type === "plan_step_update" && latest.data.session_id === activeId) ||
79
+ (latest.type === "session_update" && latest.data.id === activeId)
80
+
81
+ if (affectsActive) {
82
+ reloadDetail()
83
+ }
84
+
85
+ // If a child session of the active session updates, also refresh
86
+ if (detail?.child_sessions && detail.child_sessions.length > 0) {
87
+ const childIds = new Set(detail.child_sessions.map((c) => c.id))
88
+ const affectsChild =
89
+ (latest.type === "session_update" && childIds.has(latest.data.id)) ||
90
+ (latest.type === "session_new" && latest.data.parent_session_id === activeId)
91
+ if (affectsChild) {
92
+ reloadDetail()
93
+ }
94
+ }
95
+ }
96
+ }, [messages, activeId, reloadSessions, reloadStats, reloadDetail, detail?.child_sessions])
97
+
98
+ // Auth loading state
99
+ if (authLoading) {
100
+ return (
101
+ <div className="h-screen flex items-center justify-center bg-bg">
102
+ <div className="text-accent text-xs font-mono animate-pulse">INITIALIZING...</div>
103
+ </div>
104
+ )
105
+ }
106
+
107
+ // Auth gate — if auth is enabled and user is not logged in, show login page
108
+ if (authEnabled && !user) {
109
+ return <LoginPage />
110
+ }
111
+
112
+ return (
113
+ <div className="h-screen flex flex-col overflow-hidden bg-bg">
114
+ {/* Scanline overlay */}
115
+ <div className="pointer-events-none fixed inset-0 z-[100] opacity-[0.03]">
116
+ <div className="w-full h-px bg-accent" style={{
117
+ animation: "scanline 8s linear infinite"
118
+ }} />
119
+ </div>
120
+
121
+ <Header stats={stats} />
122
+
123
+ {/* Tab bar */}
124
+ <div ref={tabBarRef} className="border-b border-border px-5 flex items-center gap-1 bg-bg flex-shrink-0">
125
+ <TabButton active={tab === "coordinator"} onClick={() => setTab("coordinator")}>
126
+ COORDINATOR
127
+ </TabButton>
128
+ <TabButton active={tab === "sessions"} onClick={() => setTab("sessions")}>
129
+ SESSIONS
130
+ </TabButton>
131
+ <TabButton active={tab === "knowledge"} onClick={() => setTab("knowledge")}>
132
+ KNOWLEDGE
133
+ </TabButton>
134
+ <TabButton active={tab === "walkthroughs"} onClick={() => setTab("walkthroughs")}>
135
+ WALKTHROUGHS
136
+ </TabButton>
137
+ {authEnabled && (
138
+ <TabButton active={tab === "settings"} onClick={() => setTab("settings")}>
139
+ SETTINGS
140
+ </TabButton>
141
+ )}
142
+ </div>
143
+
144
+ {/* Content */}
145
+ {tab === "coordinator" ? (
146
+ <CoordinatorPage wsMessages={messages} />
147
+ ) : tab === "sessions" ? (
148
+ <div className="flex flex-1 overflow-hidden">
149
+ <SessionList
150
+ sessions={sessions}
151
+ activeId={activeId}
152
+ filter={filter}
153
+ onSelect={(id) => {
154
+ setParentId(null)
155
+ setActiveId(id)
156
+ }}
157
+ onFilterChange={setFilter}
158
+ />
159
+ <div className="flex-1 flex flex-col overflow-hidden">
160
+ {detail?.session?.parent_session_id && (
161
+ <div className="border-b border-border px-4 py-1.5 bg-bg-elevated flex-shrink-0">
162
+ <button
163
+ onClick={handleBackToParent}
164
+ className="text-[10px] text-accent hover:text-text transition-colors font-mono"
165
+ >
166
+ &larr; back to parent session
167
+ </button>
168
+ </div>
169
+ )}
170
+ <SessionDetail
171
+ detail={detail}
172
+ loading={loading}
173
+ onSelectSession={handleSelectSession}
174
+ onReload={reloadDetail}
175
+ />
176
+ </div>
177
+ </div>
178
+ ) : tab === "knowledge" ? (
179
+ <KnowledgePage wsMessages={messages} />
180
+ ) : tab === "walkthroughs" ? (
181
+ <WalkthroughPage />
182
+ ) : tab === "settings" ? (
183
+ <SettingsPage user={user} />
184
+ ) : null}
185
+
186
+ {/* Bottom status bar */}
187
+ <div className="border-t border-border px-4 py-1.5 flex items-center justify-between text-[10px] text-text-dim bg-bg-elevated flex-shrink-0">
188
+ <span>
189
+ <span className="text-accent">TANUKI</span> :: workflow monitor
190
+ </span>
191
+ <span className="flex items-center gap-3">
192
+ {user && (
193
+ <>
194
+ <span className="text-text-muted">{user.email}</span>
195
+ <span className="text-border-bright">|</span>
196
+ </>
197
+ )}
198
+ <span className="flex items-center gap-1.5">
199
+ <span className={cn("inline-block w-1.5 h-1.5", wsStatus === "connected" ? "bg-accent" : wsStatus === "connecting" ? "bg-warning" : "bg-error")} />
200
+ </span>
201
+ <span className="text-border-bright">|</span>
202
+ {sessions.length} sessions
203
+ </span>
204
+ </div>
205
+ </div>
206
+ )
207
+ }
208
+
209
+ function TabButton({
210
+ active,
211
+ onClick,
212
+ children,
213
+ }: {
214
+ active: boolean
215
+ onClick: () => void
216
+ children: React.ReactNode
217
+ }) {
218
+ return (
219
+ <button
220
+ onClick={onClick}
221
+ className={cn(
222
+ "px-3 py-2 text-[10px] font-bold uppercase tracking-widest border-b-2 transition-colors duration-200",
223
+ active
224
+ ? "border-b-accent text-accent"
225
+ : "border-b-transparent text-text-dim hover:text-text-muted"
226
+ )}
227
+ >
228
+ {children}
229
+ </button>
230
+ )
231
+ }
232
+
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="77" height="47" fill="none" aria-labelledby="vite-logo-title" viewBox="0 0 77 47"><title id="vite-logo-title">Vite</title><style>.parenthesis{fill:#000}@media (prefers-color-scheme:dark){.parenthesis{fill:#fff}}</style><path fill="#9135ff" d="M40.151 45.71c-.663.844-2.02.374-2.02-.699V34.708a2.26 2.26 0 0 0-2.262-2.262H24.493c-.92 0-1.457-1.04-.92-1.788l7.479-10.471c1.07-1.498 0-3.578-1.842-3.578H15.443c-.92 0-1.456-1.04-.92-1.788l9.696-13.576c.213-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.472c-1.07 1.497 0 3.578 1.842 3.578h11.376c.944 0 1.474 1.087.89 1.83L40.153 45.712z"/><mask id="a" width="48" height="47" x="14" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M40.047 45.71c-.663.843-2.02.374-2.02-.699V34.708a2.26 2.26 0 0 0-2.262-2.262H24.389c-.92 0-1.457-1.04-.92-1.788l7.479-10.472c1.07-1.497 0-3.578-1.842-3.578H15.34c-.92 0-1.456-1.04-.92-1.788l9.696-13.575c.213-.297.556-.474.92-.474H53.93c.92 0 1.456 1.04.92 1.788L47.37 13.03c-1.07 1.498 0 3.578 1.842 3.578h11.376c.944 0 1.474 1.088.89 1.831L40.049 45.712z"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#eee6ff" rx="5.508" ry="14.704" transform="rotate(269.814 20.96 11.29)scale(-1 1)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#eee6ff" rx="10.399" ry="29.851" transform="rotate(89.814 -16.902 -8.275)scale(1 -1)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#8900ff" rx="5.508" ry="30.487" transform="rotate(89.814 -19.197 -7.127)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#8900ff" rx="5.508" ry="30.599" transform="rotate(89.814 -25.928 4.177)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#8900ff" rx="5.508" ry="30.599" transform="rotate(89.814 -25.738 5.52)scale(1 -1)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#eee6ff" rx="14.072" ry="22.078" transform="rotate(93.35 31.245 55.578)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#8900ff" rx="3.47" ry="21.501" transform="rotate(89.009 35.419 55.202)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#8900ff" rx="3.47" ry="21.501" transform="rotate(89.009 35.419 55.202)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx="14.592" cy="9.743" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(39.51 14.592 9.743)"/></g><g filter="url(#k)"><ellipse cx="61.728" cy="-5.321" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 61.728 -5.32)"/></g><g filter="url(#l)"><ellipse cx="55.618" cy="7.104" fill="#00c2ff" rx="5.971" ry="9.665" transform="rotate(37.892 55.618 7.104)"/></g><g filter="url(#m)"><ellipse cx="12.326" cy="39.103" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 12.326 39.103)"/></g><g filter="url(#n)"><ellipse cx="12.326" cy="39.103" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 12.326 39.103)"/></g><g filter="url(#o)"><ellipse cx="49.857" cy="30.678" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 49.857 30.678)"/></g><g filter="url(#p)"><ellipse cx="52.623" cy="33.171" fill="#00c2ff" rx="5.971" ry="15.297" transform="rotate(37.892 52.623 33.17)"/></g></g><path d="M6.919 0c-9.198 13.166-9.252 33.575 0 46.789h6.215c-9.25-13.214-9.196-33.623 0-46.789zm62.424 0h-6.215c9.198 13.166 9.252 33.575 0 46.789h6.215c9.25-13.214 9.196-33.623 0-46.789" class="parenthesis"/><defs><filter id="b" width="60.045" height="41.654" x="-5.564" y="16.92" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-40.407" y="-6.762" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="d" width="79.355" height="29.4" x="-35.435" y="2.801" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="e" width="79.579" height="29.4" x="-30.84" y="20.8" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="f" width="79.579" height="29.4" x="-29.307" y="21.949" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="g" width="74.749" height="58.852" x="29.961" y="-17.13" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="h" width="61.377" height="25.362" x="37.754" y="3.055" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="i" width="61.377" height="25.362" x="37.754" y="3.055" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="j" width="56.045" height="63.649" x="-13.43" y="-22.082" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="k" width="54.814" height="64.646" x="34.321" y="-37.644" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="l" width="33.541" height="35.313" x="38.847" y="-10.552" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="m" width="54.814" height="64.646" x="-15.081" y="6.78" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="n" width="54.814" height="64.646" x="-15.081" y="6.78" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="o" width="54.814" height="64.646" x="22.45" y="-1.645" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="p" width="39.409" height="43.623" x="32.919" y="11.36" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter></defs></svg>