Devlog #3
Devlog #2 ended with a shell that read as a desktop but a dock where every icon
opened a placeholder. This time I filled it in: the real apps, a terminal that
can actually drive the OS, and the boot screen I said I’d redo.
About, Projects, and Music are real windows now, all registered in one place and
opened through the window manager. An app is just an entry — id, title, icon,
component — so the dock, the terminal, and the logo menu all launch through the
same path. Projects is the one with real structure: a card grid and a detail
view off a single useState. I made the cards <button> instead of <div>
after realizing I couldn’t tab to a project; that brought focus and Enter/Space
back for free.
The terminal was the part I cared about most. help, about, projects, ls,
open, theme, fastfetch, clear, plus two easter eggs. Parsing was
nothing — a split and a switch. The annoying part was that open terminal needs
the window manager and theme aurora needs the theme state, both living way
above the terminal. I didn’t want to prop-drill the whole WM into a leaf, so the
shell talks to src/os.ts instead:
import { launchApp, listApps, setTheme, THEMES } from "../os";
Small module, handlers registered at mount. open returns false for a missing
app so I can print no such app instead of failing silently. Command history
took two tries — the first walked off the end of the array and left undefined
in the input; fix was making -1 mean “not browsing”.
Boot screen: the old one was a pulsing logo and a 2400ms bar that measured
nothing, opening into a shell with glass and a live clock. Now it prints staged
log lines as the bar crosses them (mount display, load tokens, start WM,
register apps, start prism-sh), the logo sits on a slow refraction sweep, and
any click or key skips it. It only plays once per tab via sessionStorage, and
prefers-reduced-motion takes the same fast path.
Two bugs turned up prepping the build. npm run build died instantly:
src/hooks/useWindows.ts(1,10): error TS6133: 'use' is declared but never read.
An autocomplete import { use, ... } I never called. dev doesn’t typecheck,
but build is tsc --noEmit && vite build with noUnusedLocals, so the first
real build was the first warning. Six characters. The other: About’s only link
was href="https//github.com/..." — missing colon, so it read as a relative
path and 404’d inside my own site. Clicked past it a dozen times.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.