From 10aded99c394dc53d3da613b64f8d58a219f88cd Mon Sep 17 00:00:00 2001 From: rebuildup Date: Sun, 29 Nov 2026 21:21:24 +0900 Subject: [PATCH] feat(#279): default fresh macOS hoxay installs to native flavor hoxay ADR-0040 makes the GPUI shell the canonical desktop path. A stateless install now builds native; an existing managed install without a flavor record stays electron so no backend switches silently. Recorded flavor, flags and HOXAY_FLAVOR keep their precedence; update.sh is unchanged. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- components/hoxay/README.md | 17 ++++++++++------- components/hoxay/install.sh | 15 +++++++++++---- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/components/hoxay/README.md b/components/hoxay/README.md index bef02ca..5317275 100644 --- a/components/hoxay/README.md +++ b/components/hoxay/README.md @@ -68,15 +68,18 @@ and re-stages it. `install.sh` builds one of two backends, recorded in `$STATE_DIR/flavor`: -- `electron` (default): `desktop:pack` bundle — the web/terminal fallback - path. This is what every existing install already is. -- `native`: `native:pack` bundle — the GPUI shell (`herdr-ui`) staged as - `hoxay.app` by hoxay's `scripts/build-native.ts`. Requires the Rust - toolchain the repo `mise.toml` pins (rebuildup/hoxay#734); ad-hoc - signed, local distribution only. +- `electron`: `desktop:pack` bundle — the web/terminal fallback path, + and the default for legacy installs that predate flavor recording. +- `native` (default for fresh installs, hoxay ADR-0040): `native:pack` + bundle — the GPUI shell (`herdr-ui`) staged as `hoxay.app` by hoxay's + `scripts/build-native.ts`. Requires the Rust toolchain the repo + `mise.toml` pins (rebuildup/hoxay#734); ad-hoc signed, local + distribution only. Selection order: `--flavor`/`--native`/`--electron` flag, `HOXAY_FLAVOR` -env, the recorded flavor, then `electron`. `update.sh` forwards its +env, the recorded flavor, then the fallback — `native` when no managed +install exists yet, `electron` when a `current` pointer predates flavor +recording (never silently switch an existing install's backend). `update.sh` forwards its arguments to `install.sh`, so it keeps whichever flavor is recorded — passing `--flavor`/`--native`/`--electron` to `update.sh` switches backend deliberately. Both flavors produce the same bundle id diff --git a/components/hoxay/install.sh b/components/hoxay/install.sh index f5fa6db..42b5477 100755 --- a/components/hoxay/install.sh +++ b/components/hoxay/install.sh @@ -36,11 +36,18 @@ INSTALLED_FILE="$STATE_DIR/installed" LOG_DIR="$STATE_DIR/logs" mkdir -p "$RELEASES_DIR" "$LOG_DIR" "$APPS_DIR" -# Product flavor: electron (default, web fallback) or native (GPUI shell). -# Resolution order: --flavor/--native/--electron flag, HOXAY_FLAVOR env, -# the recorded install flavor, then electron. The chosen flavor is written +# Product flavor: electron (web fallback) or native (GPUI shell, the +# canonical desktop path per hoxay ADR-0040). Resolution order: +# --flavor/--native/--electron flag, HOXAY_FLAVOR env, the recorded +# install flavor, then the default — native for a fresh install, electron +# for a legacy managed install that predates flavor recording (an +# existing `current` pointer means the user already runs electron and a +# silent backend switch would be wrong). The chosen flavor is written # back to $STATE_DIR/flavor so update.sh keeps the same backend. -flavor="${HOXAY_FLAVOR:-$(current_flavor "$STATE_DIR")}" +flavor_fallback="electron" +[[ -f "$CURRENT_FILE" ]] || flavor_fallback="native" +flavor="${HOXAY_FLAVOR:-$(cat "$STATE_DIR/flavor" 2>/dev/null)}" +flavor="${flavor:-$flavor_fallback}" ref_arg="" while [[ $# -gt 0 ]]; do case "$1" in