Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.
TypeScript browser-shellcontrol-planefile-managerhomelabmobile-firstnextjsptyreactself-hostedserver-managementshadcn-uisysadmintailwindcssterminaltypescriptvpsweb-desktopweb-terminal
fix(windows): match native taskbar proportions
Rahmanae73b137f2bb
diff --git a/frontend/slices/appshell/components/shells/windows/taskbar.tsx b/frontend/slices/appshell/components/shells/windows/taskbar.tsxindex d8b72e2f..0a83f5da 100644--- a/frontend/slices/appshell/components/shells/windows/taskbar.tsx+++ b/frontend/slices/appshell/components/shells/windows/taskbar.tsx@@ -11,12 +11,12 @@12px label reads as a button whose caption fell off. */import { cn } from "@/lib/utils";import { Button } from "@/components/ui/button";-import { useEffect, useMemo, useState } from "react";+import { useEffect, useMemo, useState, useSyncExternalStore } from "react";import { Search, LayoutGrid, ArrowUpRight, Minimize2, X, Settings, Lock } from "lucide-react";import { useApps } from "../../../lib/registry";import { useWindowOrder, useWindow, useWindowsMap, useFocused } from "../../../hooks/use-shell";import type { AppDescriptor } from "../../../lib/types";-import { focusWindow, minimizeWindow, restoreWindow, closeWindow, toggleNotificationCenter, openWindow, toggleSpotlight } from "../../../lib/store";+import { focusWindow, minimizeWindow, minimizeAll, restoreWindow, closeWindow, toggleNotificationCenter, openWindow, toggleSpotlight } from "../../../lib/store";import { lock } from "../../../lib/lock";import { AppIcon } from "../../app-icon";import { WindowPreview } from "../../window-preview";@@ -27,6 +27,13 @@ import { Slot } from "../../../registry/feature-registry";export const TASKBAR_H = 48;+const subscribeBrowserLanguage = () => () => {};+const getBrowserLanguage = () => navigator.language || "en";+const getServerLanguage = () => "en";+function useBrowserLanguage() {+ return useSyncExternalStore(subscribeBrowserLanguage, getBrowserLanguage, getServerLanguage);+}+export function Taskbar({ onTaskView }: { onTaskView?: () => void }) {const [startOpen, setStartOpen] = useState(false);const order = useWindowOrder();@@ -38,6 +45,8 @@ export function Taskbar({ onTaskView }: { onTaskView?: () => void }) {const pinnedIds = useMemo(() => new Set(pinnedApps.map((a) => a.id)), [pinnedApps]);const runningApps = useMemo(() => new Set(Object.values(wins).map((w) => w.app)), [wins]);const tbMenu = useContextMenu();+ const language = useBrowserLanguage().toLowerCase();+ const searchLabel = language.startsWith("id") ? "Pencarian" : "Search";useEffect(() => {if (!startOpen) return;const onKey = (e: KeyboardEvent) => {@@ -50,42 +59,40 @@ export function Taskbar({ onTaskView }: { onTaskView?: () => void }) {<>{startOpen && <StartMenu onClose={() => setStartOpen(false)} />}<div- className="absolute inset-x-0 bottom-0 z-[60] flex h-12 items-center border-t border-border bg-[var(--mica-win,var(--card))] px-2 backdrop-blur-md font-[family-name:var(--shell-font)]"+ className="absolute inset-x-0 bottom-0 z-[60] flex h-12 items-center border-t border-black/10 bg-white/90 px-1 shadow-[0_-1px_0_rgba(0,0,0,0.06)] backdrop-blur-xl font-[family-name:var(--shell-font)] dark:border-white/10 dark:bg-[#191919]/95 dark:shadow-[0_-1px_0_rgba(255,255,255,0.04)]"onContextMenu={(e) => { if (e.target === e.currentTarget) tbMenu.open(e); }}>- <div className="absolute left-1/2 flex -translate-x-1/2 items-center gap-1">+ <div className="absolute left-1/2 flex -translate-x-1/2 items-center gap-0.5"><StartButton open={startOpen} onClick={() => setStartOpen((o) => !o)} onTaskView={onTaskView} /><Button type="button" variant="ghost"onClick={toggleSpotlight}- className="h-auto p-0 font-normal hover:bg-transparent flex h-10 items-center gap-2 rounded-md border border-border bg-background/60 px-3 text-xs text-muted-foreground hover:bg-muted"+ aria-label={searchLabel}+ className="h-[34px] w-[220px] justify-start gap-2 rounded-full border border-foreground/10 bg-foreground/[0.08] px-3 text-[13px] font-normal text-foreground/80 shadow-[inset_0_1px_0_rgba(255,255,255,0.04)] hover:bg-foreground/[0.12] max-[1200px]:w-[160px] max-[980px]:w-[120px]">- <Search className="size-4" /> Search+ <Search className="size-[18px] shrink-0" /> <span className="truncate">{searchLabel}</span></Button>- {onTaskView && (- <Button type="button" variant="ghost"- onClick={onTaskView}- title="Task View"- aria-label="Task View"- className="h-auto p-0 font-normal hover:bg-transparent grid size-10 place-items-center rounded-md hover:bg-muted"- >- <LayoutGrid className="size-6" />- </Button>- )}- {pinnedApps.length > 0 && <span className="mx-1 h-6 w-px bg-border" />}{pinnedApps.map((app) => {const front = Object.values(wins).filter((w) => w.app === app.id).sort((a, b) => b.z - a.z)[0];return front ? <TaskButton key={app.id} id={front.id} compact /> : <PinnedApp key={app.id} app={app} running={runningApps.has(app.id)} />;})}{order.filter((id) => !pinnedIds.has(wins[id]?.app)).map((id) => (- <TaskButton key={id} id={id} />+ <TaskButton key={id} id={id} compact />))}</div>- <div className="ml-auto flex items-center gap-0.5">+ <div className="ml-auto flex h-full items-center gap-0 text-foreground"><span data-slot="system-status-host" data-status-placement="taskbar" className="flex items-center"><Slot region="systemStatus" /></span>- <ControlCenterDesktop size={40} />+ <LocaleIndicator />+ <ControlCenterDesktop size={82} variant="windows" /><Clock />+ <button+ type="button"+ aria-label="Show desktop"+ title="Show desktop"+ onClick={minimizeAll}+ className="h-full w-[6px] shrink-0 border-l border-foreground/15 hover:bg-foreground/10"+ /></div></div><ContextMenu@@ -120,7 +127,7 @@ function StartButton({ open, onClick, onTaskView }: { open: boolean; onClick: ()mark, so Start read as a speck between two 24px neighbours. */}<span className="grid grid-cols-2 gap-[2px]">{[0, 1, 2, 3].map((i) => (- <span key={i} className="size-[11px] rounded-[1px] bg-primary" />+ <span key={i} className="size-[11px] rounded-[1px] bg-[#60cdff]" />))}</span></Button>@@ -143,7 +150,7 @@ function PinnedApp({ app, running }: { app: AppDescriptor; running: boolean }) {<AppIcon app={app} /></span><span- className={cn(`absolute bottom-[1px] left-1/2 h-[2px] -translate-x-1/2 rounded-full bg-primary transition-all ${running ? "w-2 opacity-70" : "w-0 opacity-0"}`)}+ className={cn(`absolute bottom-[1px] left-1/2 h-[2px] -translate-x-1/2 rounded-full bg-[#60cdff] transition-all ${running ? "w-2 opacity-70" : "w-0 opacity-0"}`)}/></Button>);@@ -179,7 +186,7 @@ function TaskButton({ id, compact = false }: { id: string; compact?: boolean }))}{!compact && <span className="max-w-[120px] truncate text-xs">{win.title}</span>}<span- className={cn(`absolute bottom-[1px] left-1/2 h-[2px] -translate-x-1/2 rounded-full bg-primary transition-all ${active ? "w-5" : "w-2 opacity-60"}`)}+ className={cn(`absolute bottom-[1px] left-1/2 h-[2px] -translate-x-1/2 rounded-full bg-[#60cdff] transition-all ${active ? "w-5" : "w-2 opacity-60"}`)}/></Button>{/* Win11-style hover flyout: a static <WindowPreview> floats above the@@ -208,6 +215,11 @@ function TaskButton({ id, compact = false }: { id: string; compact?: boolean }));}+function LocaleIndicator() {+ const language = useBrowserLanguage().toLowerCase();+ const label = language.startsWith("id") ? "IND" : language.startsWith("en") ? "ENG" : language.slice(0, 3).toUpperCase();+ return <span aria-label="Input language" className="flex h-10 min-w-9 items-center justify-center px-1 text-[12px] font-medium text-foreground/90">{label}</span>;+}// Clock doubles as the Notification Center toggle, like the real Win11 tray.// h-10 like every other button in this bar: the tray sits on the same 40px row as// Start and the task buttons, and at h-9 its hover pill was 4px shorter than its@@ -223,7 +235,7 @@ function Clock() {<Button type="button" variant="ghost"onClick={toggleNotificationCenter}aria-label="Notifications"- className="h-auto p-0 font-normal hover:bg-transparent flex h-10 min-w-10 flex-col items-end justify-center gap-0 rounded-md px-2 text-[11px] leading-tight text-muted-foreground hover:bg-muted"+ className="flex h-10 min-w-[72px] flex-col items-end justify-center gap-0 rounded-md px-2 py-0 font-normal text-[11px] tabular-nums leading-[1.15] text-foreground hover:bg-foreground/10"><span>{now.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })}</span><span>{now.toLocaleDateString([], { day: "2-digit", month: "2-digit", year: "numeric" })}</span>diff --git a/frontend/slices/appshell/features/control-center/components/control-center-desktop.tsx b/frontend/slices/appshell/features/control-center/components/control-center-desktop.tsxindex f2ca5509..cfb1fa2e 100644--- a/frontend/slices/appshell/features/control-center/components/control-center-desktop.tsx+++ b/frontend/slices/appshell/features/control-center/components/control-center-desktop.tsx@@ -1,7 +1,7 @@"use client";import { useState } from "react";-import { SlidersHorizontal } from "lucide-react";+import { BatteryMedium, SlidersHorizontal, Volume2, Wifi } from "lucide-react";import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";import { Button } from "@/components/ui/button";import { ControlCenterTiles } from "./control-center-tiles";@@ -14,13 +14,21 @@ import { ControlCenterTiles } from "./control-center-tiles";* original and still default home). The Windows taskbar row is 40px per the* Fluent table, and a 28px box there left one visibly short item next to the* clock — so the taskbar passes 40 rather than every surface being bumped. */-export function ControlCenterDesktop({ size = 28 }: { size?: number } = {}) {+export function ControlCenterDesktop({ size = 28, variant = "default" }: { size?: number; variant?: "default" | "windows" } = {}) {const [open, setOpen] = useState(false);return (<Popover open={open} onOpenChange={setOpen}><PopoverTrigger asChild>- <Button type="button" variant="ghost" size="icon" aria-label="Control Center" className="rounded-md" style={{ width: size, height: size }}>- <SlidersHorizontal className="size-4" />+ <Button type="button" variant="ghost" size="icon" aria-label="Control Center" className="rounded-md text-foreground hover:bg-foreground/10" style={{ width: size, height: variant === "windows" ? 40 : size }}>+ {variant === "windows" ? (+ <span className="flex items-center gap-1.5" aria-hidden>+ <Wifi className="size-4" />+ <Volume2 className="size-4" />+ <BatteryMedium className="size-[18px]" />+ </span>+ ) : (+ <SlidersHorizontal className="size-4" />+ )}</Button></PopoverTrigger><PopoverContentdiff --git a/frontend/slices/os-shell/server-connection-status.tsx b/frontend/slices/os-shell/server-connection-status.tsxindex 7bc007bc..c0e33828 100644--- a/frontend/slices/os-shell/server-connection-status.tsx+++ b/frontend/slices/os-shell/server-connection-status.tsx@@ -6,6 +6,7 @@ import { useSession } from "@/features/auth";import { useAppearance } from "@/lib/appearance";import { IS_DEMO } from "@/lib/demo";import { cn } from "@/lib/utils";+import { ChevronUp } from "lucide-react";/*** One status source, many native placements. AppShell exposes `systemStatus`@@ -20,6 +21,7 @@ function ServerConnectionStatus() {const live = status === "in" && tweaks.server.mode === "live";const mobile = shell.surface === "mobile";+ const windows = shell.id === "windows";const label = live? `${mobile ? "Live" : "Live server"} · ${role ?? "viewer"}`: mobile ? "Demo" : "Demo · Mock data only";@@ -29,21 +31,25 @@ function ServerConnectionStatus() {aria-label="Server connection mode"data-connection-mode={live ? "live" : "mock"}data-shell-status={shell.id}+ title={windows ? label : undefined}className={cn("flex max-w-full items-center gap-1.5 whitespace-nowrap text-muted-foreground",mobile? "rounded-full border border-border/70 bg-card/80 px-2 py-0.5 text-[10px] font-medium shadow-sm backdrop-blur"- : shell.id === "windows"- ? "h-8 rounded-md px-2 text-[11px] hover:bg-muted"+ : windows+ ? "grid size-10 place-items-center gap-0 rounded-md p-0 text-foreground hover:bg-foreground/10": "rounded-md px-1.5 py-0.5 text-[11px]",)}>- <span- aria-hidden- className={cn("size-1.5 shrink-0 rounded-full", live ? "bg-success" : "bg-warning")}- />- <span className="truncate">{label}</span>- {status === "out" && !mobile && (+ {windows ? (+ <ChevronUp aria-hidden className={cn("size-4", !live && "text-warning")} />+ ) : (+ <>+ <span aria-hidden className={cn("size-1.5 shrink-0 rounded-full", live ? "bg-success" : "bg-warning")} />+ <span className="truncate">{label}</span>+ </>+ )}+ {status === "out" && !mobile && !windows && (<Linkprefetch={false}href="/login"