fix(electrobun): wizard creation flow + GitLab probe + shell detection + dropdown flip

- Git probe tries GitHub then GitLab for owner/repo shorthand
- Shows "Found on GitHub/GitLab" with platform indicator
- system.shells RPC detects installed shells (bash/zsh/fish/sh/dash)
- CustomDropdown flip logic uses 200px threshold for flip-up
- Project creation properly persists all wizard fields + adds card
This commit is contained in:
Hibryda 2026-03-23 15:34:57 +01:00
parent 021feba3ed
commit e61473b025
7 changed files with 112 additions and 21 deletions

View file

@ -8,6 +8,30 @@ import { execSync, spawn } from "child_process";
export function createGitHandlers() {
return {
"system.shells": async () => {
const candidates = [
{ path: '/bin/bash', name: 'bash' },
{ path: '/bin/zsh', name: 'zsh' },
{ path: '/bin/fish', name: 'fish' },
{ path: '/usr/bin/fish', name: 'fish' },
{ path: '/bin/sh', name: 'sh' },
{ path: '/usr/bin/dash', name: 'dash' },
];
const seen = new Set<string>();
const shells: Array<{ path: string; name: string }> = [];
for (const c of candidates) {
if (seen.has(c.name)) continue;
try {
fs.statSync(c.path);
shells.push(c);
seen.add(c.name);
} catch {
// not installed
}
}
return { shells };
},
"ssh.checkSshfs": async () => {
try {
const sshfsPath = execSync("which sshfs", { encoding: "utf8", timeout: 3000 }).trim();