feat(electrobun): groups, cloning, shortcuts, custom window — all 5 features

Groups Sidebar:
- SQLite groups table (4 seeded: Development, Testing, DevOps, Research)
- Left icon rail with emoji group icons, Ctrl+1-4 switching
- Active group highlighted, projects filtered by group

Project Cloning:
- Clone button on project cards (fork icon)
- git worktree add via Bun.spawn (array form, no shell strings)
- 3-clone limit, branch name validation, pending-status pattern
- Clone cards: WT badge + branch name + accent top border
- Chain link SVG icons between linked clones in grid

Keyboard Shortcuts:
- keybinding-store.svelte.ts: 16 defaults across 4 categories
- Two-scope: document capture + terminal focus guard
- KeyboardSettings.svelte: search, click-to-capture, conflict detection
- Per-binding reset + Reset All

Custom Window:
- titleBarStyle: "hidden" — no native title bar
- Vertical "AGOR" text in left sidebar (writing-mode: vertical-rl)
- Floating window controls badge (minimize/maximize/close)
- Draggable region via -webkit-app-region: drag
- Window frame persisted to SQLite (debounced 500ms)

Window is resizable by default (Electrobun BrowserWindow).
This commit is contained in:
Hibryda 2026-03-20 06:24:24 +01:00
parent 5032021915
commit a020f59cb4
14 changed files with 1741 additions and 189 deletions

View file

@ -89,6 +89,63 @@ export type PtyRPCRequests = {
params: { id: string };
response: { ok: boolean };
};
// ── Groups RPC ─────────────────────────────────────────────────────────────
/** Return all project groups. */
"groups.list": {
params: Record<string, never>;
response: { groups: Array<{ id: string; name: string; icon: string; position: number }> };
};
// ── Project clone RPC ──────────────────────────────────────────────────────
/** Clone a project into a git worktree. branchName must match /^[a-zA-Z0-9\/_.-]+$/. */
"project.clone": {
params: { projectId: string; branchName: string };
response: { ok: boolean; project?: { id: string; config: string }; error?: string };
};
// ── Window control RPC ─────────────────────────────────────────────────────
/** Minimize the main window. */
"window.minimize": {
params: Record<string, never>;
response: { ok: boolean };
};
/** Toggle maximize/restore on the main window. */
"window.maximize": {
params: Record<string, never>;
response: { ok: boolean };
};
/** Close the main window. */
"window.close": {
params: Record<string, never>;
response: { ok: boolean };
};
/** Get current window frame (x, y, width, height). */
"window.getFrame": {
params: Record<string, never>;
response: { x: number; y: number; width: number; height: number };
};
// ── Keybindings RPC ────────────────────────────────────────────────────────
/** Return all persisted custom keybindings (overrides only). */
"keybindings.getAll": {
params: Record<string, never>;
response: { keybindings: Record<string, string> };
};
/** Persist a single keybinding override. */
"keybindings.set": {
params: { id: string; chord: string };
response: { ok: boolean };
};
/** Reset a keybinding to default (removes override). */
"keybindings.reset": {
params: { id: string };
response: { ok: boolean };
};
};
// ── Messages (Bun → WebView, fire-and-forget) ────────────────────────────────