Repository navigation
feat(desktop): Electron app with tiled widget frames - #57
Merged
Merged
Conversation
Add apps/web (Vite+ + React + TanStack file-based routing, hello world) and apps/desktop (Electron shell embedding the web build via a privileged codework:// scheme, dev-server proxy via CODEWORK_WEB_URL), wired into the pnpm workspace with vite-plus-core as the vite alias.
# Conflicts: # pnpm-lock.yaml # vite.config.ts
`pnpm dev:desktop` runs the web dev server and main-process watcher, launches Electron once both are ready, and restarts it when the main or preload bundle rebuilds. - Drop the forwarded Origin header in the dev proxy; it made net.fetch treat module scripts as CORS requests the dev server rejects. - Launch `electron .` so the app path resolves preload and web assets. - Pin the web dev server to 127.0.0.1:5173. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add apps/server, an Effect app server the desktop runs as a child process (Electron binary in Node mode). It serves Effect RPC over a loopback WebSocket on an OS-chosen port and keeps app state in SQLite under Electron's userData (@effect/sql-sqlite-node, built on node:sqlite). First RPCs: fs.list and package-scoped kv.get/kv.set. Electron main starts the server, waits for its ready line, then opens the window and hands the RPC URL to the page through the preload. Main and preload are bundled separately because a sandboxed preload cannot load a shared chunk. The dev runner also watch-builds the server. Restructure apps/web/src into OS domains: kernel (server client), shell (chrome, workspace switcher), wm (tiling, frames, instances), sdk (widget contract) and widgets (built-ins plus registry). defineWidget declares a widget with a props schema; the window manager renders instances through the registry and validates saved props. The first built-in is an explorer powered by @pierre/trees: folders load lazily on expand, one query atom per path, and the expanded set is saved per instance in SQLite. It is the master widget on Main. Also add the pierre trees agent skill to skills-lock.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Desktop app (Electron) rendering the web app, with a first widget desktop tiled by webwm.
Desktop shell
apps/desktop(Electron main/preload) andapps/web(React + TanStack Router), served over a customcodework-dev:///codework://scheme.pnpm dev:desktop: one command runs the web dev server and main-process watcher, launches Electron when both are ready, and restarts it when main or preload rebuilds.Originheader (module scripts failed as CORS requests) and launchelectron .so preload and web assets resolve. Web dev server pinned to127.0.0.1:5173.Widget desktop (
apps/web/src/desktop)--cw-*CSS-variable theme tokens (light/dark), subtle 3D frames, lucide icons.Verification
vp checkand typecheck pass forapps/desktopandapps/web.🤖 Generated with Claude Code