feat(electrobun): ProjectWizard — 3-step project creation with 5 source types

Step 1 — Source: local folder (path browser + validation), git clone,
GitHub URL, template (4 built-in), remote SSH
Step 2 — Configure: name, branch selector, worktree toggle, group, icon, shell
Step 3 — Agent: provider, model, permission mode, system prompt, auto-start

- ProjectWizard.svelte: 3-step wizard with display toggle (rule 55)
- PathBrowser.svelte: inline directory browser with breadcrumbs + shortcuts
- git-handlers.ts: git.branches + git.clone RPC handlers
- files.statEx RPC: path validation + git detection + writable check
- 39 new i18n keys, 172 total TranslationKey entries
- App.svelte: wizard overlay replaces simple add-project card
This commit is contained in:
Hibryda 2026-03-22 11:17:05 +01:00
parent 1d2975b07b
commit 45bca3b96f
9 changed files with 1203 additions and 45 deletions

View file

@ -32,6 +32,7 @@ import { createBtmsgHandlers, createBttaskHandlers } from "./handlers/btmsg-hand
import { createSearchHandlers } from "./handlers/search-handlers.ts";
import { createPluginHandlers } from "./handlers/plugin-handlers.ts";
import { createRemoteHandlers } from "./handlers/remote-handlers.ts";
import { createGitHandlers } from "./handlers/git-handlers.ts";
/** Current app version — sourced from electrobun.config.ts at build time. */
const APP_VERSION = "0.0.1";
@ -99,6 +100,7 @@ const bttaskHandlers = createBttaskHandlers(bttaskDb, rpcRef);
const searchHandlers = createSearchHandlers(searchDb);
const pluginHandlers = createPluginHandlers();
const remoteHandlers = createRemoteHandlers(relayClient, settingsDb);
const gitHandlers = createGitHandlers();
// ── RPC definition ─────────────────────────────────────────────────────────
@ -123,6 +125,18 @@ const rpc = BrowserView.defineRPC<PtyRPCSchema>({
...pluginHandlers,
// Remote
...remoteHandlers,
// Git
...gitHandlers,
// Project templates (hardcoded list)
"project.templates": async () => ({
templates: [
{ id: "blank", name: "Blank Project", description: "Empty directory with no scaffolding", icon: "📁" },
{ id: "web-app", name: "Web App", description: "HTML/CSS/JS web application starter", icon: "🌐" },
{ id: "api-server", name: "API Server", description: "Node.js/Bun HTTP API server", icon: "⚡" },
{ id: "cli-tool", name: "CLI Tool", description: "Command-line tool with argument parser", icon: "🔧" },
],
}),
// ── Project clone handler ──────────────────────────────────────────
"project.clone": async ({ projectId, branchName }) => {