Commit Graph

51 Commits

Author SHA1 Message Date
ben
47db4e39e3 feat(desktop): migration engine for Tauri → Electron (draft, do not merge) (#1523)
* feat(desktop): migration engine for Tauri → Electron handoff

Implements the infrastructure needed to move users from Tauri to Electron
without losing state or Launchpad/Dock presence. Zero user impact on its
own — this becomes live only when paired with a final Tauri release that
calls the snapshot writer and installs Electron.

What lands here:

- Unify app identity with Tauri. electron-builder appId goes from
  com.differentai.openwork.electron → com.differentai.openwork so macOS
  reuses the same bundle identifier (no duplicate Dock icon, no new
  Gatekeeper prompt, same TCC permissions).
- Unify userData path. Electron's app.setPath("userData", ...) now points
  at the exact folder Tauri uses (~/Library/Application Support/com.differentai.openwork
  on macOS, %APPDATA%/com.differentai.openwork on Windows, ~/.config/
  com.differentai.openwork on Linux). An OPENWORK_ELECTRON_USERDATA env
  var override is available for dogfooders who want isolation.
- Filename compat. On first launch, Electron copies Tauri's
  openwork-workspaces.json → workspace-state.json (leaves the legacy
  file in place for rollback safety).
- electron-updater wiring. New deps + IPC handlers
  (openwork:updater:check / download / installAndRestart). Packaged-only.
  Publish config points at the same GitHub release as Tauri.
- Migration snapshot plumbing.
  * Tauri Rust command `write_migration_snapshot` serializes an
    allowlist of localStorage keys to app_data_dir/migration-snapshot.v1.json.
  * `apps/app/src/app/lib/migration.ts` has matching
    writeMigrationSnapshotFromTauri() / ingestMigrationSnapshotOnElectronBoot().
  * Scope: workspace list + selection only
    (openwork.react.activeWorkspace, .sessionByWorkspace,
     openwork.server.list/active/urlOverride/token). Everything else is
    cheap to redo.
  * Electron main exposes openwork:migration:read / ack IPC; preload
    bridges them under window.__OPENWORK_ELECTRON__.migration.
  * desktop-runtime-boot.ts ingests the snapshot once on first launch,
    hydrates empty localStorage keys, then acks.
- Updated prds/electron-migration-plan.md with the localStorage scope
  decision and the remaining work (last Tauri release ships the UI
  prompt + installer downloader).

Verified: `pnpm --filter @openwork/app typecheck` ✓,
`pnpm --filter @openwork/desktop build:electron` ✓, `cargo check`
against src-tauri ✓.

* fix(desktop): emit relative asset paths for Electron packaged builds

Packaged Electron loads index.html via file:// (Contents/Resources/app-dist/
index.html inside the .app bundle), but Vite was building with the default
base: '/' which resolves /assets/*.js to the filesystem root. Result: a
working dev experience (Vite dev server on localhost:5173) and a broken
packaged .app that renders an empty <div id="root"></div>.

The Tauri shell doesn't hit this because Tauri serves the built HTML
through its own tauri:// protocol which rewrites paths. Electron's
file:// loader has no such rewriter.

Fix: electron-build.mjs sets OPENWORK_ELECTRON_BUILD=1 when invoking
vite build, and vite.config.ts flips base to './' only when that env
var is set. Dev server and Tauri builds unchanged.

Discovered while manually exercising the Electron prod-build migration
flow (packaged app launch, snapshot ingest, idempotency, updater IPC).
Latent since PR #1522 landed the packaged build path; never caught
because dogfood ran via dev:electron which uses the Vite dev server.

---------

Co-authored-by: Benjamin Shafii <benjamin@openworklabs.com>
2026-04-22 16:50:51 -07:00
ben
1dbc9f713c feat(desktop): electron 1:1 port alongside Tauri + fix workspace-create visibility (#1522)
* feat(desktop): electron 1:1 port alongside Tauri, fix workspace-create visibility

Adds an Electron shell that mirrors the Tauri desktop runtime (bridge,
dialogs, deep links, runtime supervision for openwork-server / opencode /
opencode-router / orchestrator, packaging via electron-builder). Tauri
dev/build scripts remain the default; Electron runs via dev:electron and
package:electron.

Also fixes the "workspace I just created is invisible until I restart the
app" bug: the React routes only wrote to desktop-side state, so the running
openwork-server never learned about the new workspace and the sidebar (which
is populated from the server list) dropped it. The create flow now also
calls openworkClient.createLocalWorkspace so POST /workspaces/local
registers the workspace at runtime.

Other small fixes included:
- Clears the "OpenWork server Disconnected" flash caused by React 18
  StrictMode double-invoking the connection stores' start/dispose pair.
- Real app icon wired into Electron (dock + BrowserWindow + builder).
- Fix a latent rm-import bug in runtime.mjs that silently skipped
  orchestrator auth cleanup.
- Locale copy updated to say "OpenWork desktop app" instead of "Tauri app".
- Adds description/author to apps/desktop/package.json to silence
  electron-builder warnings.

* docs(prds): Tauri → Electron migration plan

Describes how we'll cut every current Tauri user over to the Electron
build via the existing Tauri updater (one last migration release that
downloads + launches the Electron installer), how we unify app identity
so Electron reads the same userData Tauri wrote (zero-copy data
migration), and how ongoing auto-updates switch to electron-updater
publishing to the same GitHub releases.

---------

Co-authored-by: Benjamin Shafii <benjamin@openworklabs.com>
2026-04-22 15:34:54 -07:00
src-opn
e97a11d452 chore: bump version to 0.11.212 2026-04-20 18:48:25 -07:00
src-opn
ccdb46d111 chore: bump version to 0.11.211 2026-04-20 18:45:24 -07:00
src-opn
872c21764c chore: bump version to 0.11.210 2026-04-20 11:49:19 -07:00
src-opn
f0e4f6db18 chore: bump version to 0.11.209 2026-04-20 10:58:35 -07:00
src-opn
3ac290fab7 chore: bump version to 0.11.208 2026-04-20 09:42:56 -07:00
src-opn
7346d009bf chore: bump version to 0.11.207 2026-04-13 14:48:35 -07:00
src-opn
135290004b chore: bump version to 0.11.206 2026-04-08 13:20:34 -07:00
src-opn
6b26f7765f chore: bump version to 0.11.205 2026-04-07 17:55:49 -07:00
src-opn
eee4a847de chore: bump version to 0.11.204 2026-04-07 17:41:38 -07:00
src-opn
d5459798b2 chore: bump version to 0.11.203 2026-04-07 10:49:19 -07:00
ben
9365e7d397 feat(app): add incremental React session path (#1362)
* feat(server): add workspace session read APIs

Expose workspace-scoped session list, detail, message, and snapshot reads so the client can fetch session data without depending on activation choreography.

* feat(app): route mounted session reads through OpenWork APIs

Use the new workspace-scoped session read endpoints for mounted OpenWork clients so the current frontend stops depending on direct session proxy reads for list, detail, message, and todo loading.

* feat(app): add React read-only session transcript

Introduce a feature-gated React island for the session transcript so we can replace the session surface incrementally while keeping the Solid shell intact.

* feat(app): add React session composer surface

Extend the feature-gated React session island to own its draft, prompt send, stop flow, and snapshot polling so the session body can evolve independently from the Solid composer.

* feat(app): add React session transition model

Keep the React session surface stable during session switches by tracking rendered vs intended session state and exposing a developer debug panel for render-source and transition inspection.

* docs(prd): add React migration plan to repo

Copy the incremental React adoption PRD into the OpenWork repo so the migration plan lives next to the implementation and PR branch.

* docs(prd): sync full React migration plan

Replace the shortened repo copy with the full incremental React adoption PRD so the implementation branch and product plan stay in sync.

* feat(desktop): add React session launch modes

Add dedicated Tauri dev and debug-build entrypoints for the React session path and honor a build-time React session flag before local storage so the alternate shell is easy to launch and reproduce.

* fix(app): fall back to legacy mounted session reads

Keep the new app working against older OpenWork servers by falling back to the original mounted OpenCode session reads when the workspace-scoped session read APIs are unavailable.
2026-04-05 16:46:06 -07:00
src-opn
ff981742bb chore: bump version to 0.11.202 2026-04-04 13:13:29 -07:00
Benjamin Shafii
15725dfb31 chore: bump version to 0.11.201 2026-04-03 18:28:44 -07:00
Benjamin Shafii
5cc7bbdd87 chore: bump version to 0.11.200 2026-04-03 07:51:45 -07:00
Benjamin Shafii
4a3e43e597 chore: bump version to 0.11.199 2026-04-01 18:48:35 -07:00
Benjamin Shafii
761796fd33 chore: bump version to 0.11.198 2026-03-30 22:30:04 -07:00
Benjamin Shafii
020d763667 chore: bump version to 0.11.197 2026-03-30 21:50:48 -07:00
Benjamin Shafii
53b8964dc3 Merge branch 'dev' of https://github.com/different-ai/openwork into dev 2026-03-30 19:52:21 -07:00
Benjamin Shafii
663e357b00 chore: bump version to 0.11.196 2026-03-30 13:56:06 -07:00
src-opn
9d5b14b4f4 chore: bump version to 0.11.195 2026-03-27 14:29:11 -07:00
src-opn
41d93e2ece chore: bump version to 0.11.194 2026-03-26 13:15:32 -07:00
Benjamin Shafii
da74ba9a75 chore: bump version to 0.11.193 2026-03-25 21:53:12 -07:00
Benjamin Shafii
5f30ad2a87 chore: bump version to 0.11.192 2026-03-25 14:56:33 -07:00
Omar McAdam
6c9700ce85 chore: bump version to 0.11.191 2026-03-24 17:34:29 -07:00
Benjamin Shafii
6c22f80018 chore: bump version to 0.11.190 2026-03-24 16:01:42 -07:00
Benjamin Shafii
a7fa0312cf chore: bump version to 0.11.189 2026-03-24 09:39:37 -07:00
Benjamin Shafii
c9e00db612 chore: bump version to 0.11.188 2026-03-24 09:29:02 -07:00
Benjamin Shafii
5d1c6a28a2 chore: bump version to 0.11.187 2026-03-24 07:37:58 -07:00
Benjamin Shafii
b77c254d3d Merge branch 'dev' of https://github.com/different-ai/openwork into dev 2026-03-24 06:39:55 -07:00
Benjamin Shafii
30737e99a2 chore: bump version to 0.11.186 2026-03-23 22:45:54 -07:00
Omar McAdam
5584dfd652 chore: bump version to 0.11.185 2026-03-23 22:03:43 -07:00
Benjamin Shafii
09204a02ff chore: bump version to 0.11.184 2026-03-23 07:33:50 -07:00
Benjamin Shafii
160198ab94 chore: bump version to 0.11.183 2026-03-22 21:59:34 -07:00
Benjamin Shafii
31d894ae98 commit stuff for windows arm 2026-03-22 19:59:57 -07:00
Benjamin Shafii
7a0e31d004 chore: bump version to 0.11.182 2026-03-22 18:18:18 -07:00
ben
3709ea33ec dx: add windows arm64 pnpm dev support (#1113)
* chore: align dev scripts for Windows

* refactor: isolate Windows dev flow
2026-03-22 16:48:38 -07:00
Benjamin Shafii
abcfdfc745 chore: bump version to 0.11.181 2026-03-22 09:31:39 -07:00
Benjamin Shafii
093ee573a0 chore: bump version to 0.11.180 2026-03-22 09:29:16 -07:00
Jan Carbonell
5f0434568f chore: bump version to 0.11.179 2026-03-21 22:33:09 -07:00
Benjamin Shafii
1cc5360f62 chore: bump version to 0.11.178 2026-03-21 19:37:02 -07:00
Omar McAdam
9603be37d2 chore: bump version to 0.11.177 2026-03-20 13:24:23 -07:00
Omar McAdam
47b6f7e37a chore: bump version to 0.11.176 2026-03-20 12:51:31 -07:00
Omar McAdam
db10a7b5ba build: centralize the pinned opencode version (#1075)
Keep OpenCode version selection predictable by reading a single repo-wide constant and packaging that pin into orchestrator builds. Remove env and latest-release fallbacks so desktop, workers, snapshots, and CI stay aligned.

Co-authored-by: Omar McAdam <omar@OpenWork-Studio.localdomain>
2026-03-20 12:30:24 -07:00
Benjamin Shafii
da0cd71c7e chore: bump version to 0.11.175 2026-03-19 22:21:17 -07:00
Benjamin Shafii
9f3890f609 chore: bump version to 0.11.174 2026-03-19 18:59:35 -07:00
Omar McAdam
5f0e11ceca chore: bump version to 0.11.173 2026-03-19 15:41:22 -07:00
Omar McAdam
d47a194d93 chore: bump version to 0.11.172 2026-03-19 15:07:12 -07:00
Benjamin Shafii
10ec28d6dc chore: bump version to 0.11.171 2026-03-19 14:01:13 -07:00