Skip to content

refactor(desk98): author the Vue Vapor desktop in JSX instead of SFCs - #308

Merged
doodlewind merged 1 commit into
mainfrom
desk98-tsx
Aug 20, 2026
Merged

refactor(desk98): author the Vue Vapor desktop in JSX instead of SFCs#308
doodlewind merged 1 commit into
mainfrom
desk98-tsx

Conversation

@doodlewind

@doodlewind doodlewind commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

desktop

Follow-up to #302: the desk98 desktop stays Vue Vapor, but the authoring surface moves from .vue SFCs to JSX (vue-jsx-vapor — the same path as apps/hero-vue-vapor and the app.vue-vapor.tsx variants). The 18 single-file components collapse back into the original three-module shape:

  • chrome.tsx — T98, caption controls, taskbar, popup panel, Start menu, desktop icons
  • programs.tsx — Notepad/Minesweeper/folder/dialog views and their content-local hit helpers, back in one file
  • app.tsx — the compositor, now also owning the window shell + content dispatch (Window98)

Nothing else moves: reactivity (vue refs), state.ts, the pure modules, the desk dialect, the tests, the CI wiring and the build commands are all unchanged — pocket.json just points the entry at main.tsx.

JSX-specific rules honored:

  • Lists are plain .map() — the repo's vapor JSX idiom (zero v-for in any shipped JSX app).
  • Reactive branches live in JSX child positions. A bare ternary returned from a component body evaluates once at setup — MinesCell keeps its hidden/revealed swap inside a stable 16×16 wrapper so the reveal actually re-renders.
  • Clean subpath imports (@pocketjs/framework/components|lifecycle|clock|host) — the compiler resolves them per-framework, same as the Solid days.

Verified: the desk-companion sim journey (typing, double-click word select with the ⌘C payload asserted on the wire, drag selection, context menu → paste-req round-trip, ⌘Esc/⌘N/⌘W) passes against the JSX bundle unchanged; bun run test 12/12; pocket check clean over the 39-module graph; the density-2 sim render is pixel-faithful (screenshot refreshed — Minesweeper reveal/flag exercises the reactive branch swap).

🤖 Generated with Claude Code

Same framework, different authoring surface: the 18 .vue single-file
components collapse back into the original three-module shape — chrome.tsx
(T98, caption controls, taskbar, popups, Start menu, icons), programs.tsx
(program views + content-local hit helpers back in one file) and app.tsx
(the compositor, with the window shell + content dispatch) — compiled
through vue-jsx-vapor like apps/hero-vue-vapor and the app.vue-vapor.tsx
variants. Reactivity, state modules, the desk dialect, tests and the build
wiring are untouched; pocket.json only moves the entry to main.tsx.

JSX-specific rules honored: lists are plain .map() (the repo's vapor JSX
idiom), reactive branches live in JSX child positions (a bare ternary
returned from a component body evaluates once — MinesCell keeps its
hidden/revealed swap inside a stable 16×16 wrapper), and imports use the
clean @pocketjs/framework/* subpaths the framework resolves per-framework.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@doodlewind
doodlewind marked this pull request as ready for review August 20, 2026 07:46
@doodlewind
doodlewind merged commit f4d8727 into main Aug 20, 2026
1 check passed
@doodlewind
doodlewind deleted the desk98-tsx branch August 20, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant