Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions components/hoxay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 11 additions & 4 deletions components/hoxay/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down