open-design/apps/packaged
kami 1b9caf50a0
fix(packaged): honor OD_DATA_DIR in desktop runtime (#2162)
* fix(packaged): honor OD_DATA_DIR in desktop runtime

Co-authored-by: multica-agent <github@multica.ai>

* fix(packaged): scope OD_DATA_DIR by namespace

Co-authored-by: multica-agent <github@multica.ai>

* fix(packaged): reject relative OD_DATA_DIR overrides

Co-authored-by: multica-agent <github@multica.ai>

* fix(packaged): preserve scoped OD_DATA_DIR overrides

Co-authored-by: multica-agent <github@multica.ai>

* fix(packaged): surface OD_DATA_DIR validation as PackagedPathAccessError

Relative OD_DATA_DIR in packaged mode now throws PackagedPathAccessError
instead of a plain Error. apps/packaged/src/index.ts main() only routes
PackagedPathAccessError to dialog.showErrorBox, so the prior plain Error
made the app exit silently for GUI launches with an invalid override.

Extract PackagedPathAccessError into apps/packaged/src/errors.ts so
paths.ts can throw it without an inter-module value cycle with launch.ts.

Co-authored-by: multica-agent <github@multica.ai>

* fix(packaged): make OD_DATA_DIR absolute-path guard platform-aware

The previous guard ran `win32.isAbsolute(expanded)` unconditionally on
every platform, so on macOS/Linux a value like `C:\Users\Fred\OD` passed
the check (win32 considers it absolute) and silently flowed into
`join(expanded, "namespaces", namespace, "data")`, producing a
cwd-relative POSIX path instead of throwing.

Branch the check on `process.platform === "win32"` so Windows paths are
only accepted on Windows. Update the existing Windows-themed test
fixtures to stub `process.platform = "win32"` (the omission was what
masked this bug) and add a regression that stubs `linux` and asserts
`C:\foo` and `\\server\share` are rejected as PackagedPathAccessError.

Co-authored-by: multica-agent <github@multica.ai>

* fix(packaged): reject mismatched scoped OD_DATA_DIR

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: kami.c <kami.c@chative.com>
2026-05-24 14:21:54 +00:00
..
src fix(packaged): honor OD_DATA_DIR in desktop runtime (#2162) 2026-05-24 14:21:54 +00:00
tests fix(packaged): honor OD_DATA_DIR in desktop runtime (#2162) 2026-05-24 14:21:54 +00:00
AGENTS.md Add mac packaged runtime and beta release flow (#170) 2026-04-30 20:25:49 +08:00
esbuild.config.mjs feat(linux): add headless mode for install/start/stop operations (#686) 2026-05-07 01:52:03 +08:00
package.json chore: pin dependency versions and harden CI caches (#2189) 2026-05-19 13:58:27 +08:00
README.md Add mac packaged runtime and beta release flow (#170) 2026-04-30 20:25:49 +08:00
tsconfig.json Add mac packaged runtime and beta release flow (#170) 2026-04-30 20:25:49 +08:00
tsconfig.tests.json fix(daemon): add legacy data dir migrator 2026-05-07 15:19:04 +08:00
vitest.config.ts fix(daemon): add legacy data dir migrator 2026-05-07 15:19:04 +08:00

apps/packaged

Thin packaged Electron runtime entry for Open Design.

This package starts the packaged daemon and web sidecars, registers the od:// entry protocol, and then delegates to @open-design/desktop/main for the host window. Product logic stays in apps/daemon, apps/web, and apps/desktop.