Skip to content

macOS: honor stable Nix defaults suite#12205

Merged
joshp123 merged 4 commits intomainfrom
fix/nix-mode-defaults-domain
Feb 9, 2026
Merged

macOS: honor stable Nix defaults suite#12205
joshp123 merged 4 commits intomainfrom
fix/nix-mode-defaults-domain

Conversation

@joshp123
Copy link
Contributor

@joshp123 joshp123 commented Feb 9, 2026

Human written summary:

The intent of this change is, as written by a human:

fix nix mode after our rename churn!

The rest of this PR was written by ChatGPT-unknown, running in the pi harness. Full environment + prompt history appear at the end.

Changes

  • macOS app: treat ai.openclaw.mac as the stable defaults suite for Nix-managed deployments and consult it when determining Nix mode (only when running as a .app bundle).
  • Tests: add regression coverage for stable-suite nixMode resolution.

Tests

  • cd apps/macos && swift test --filter NixModeStableSuiteTests (pass)
  • cd apps/macos && swift test --filter WideAreaGatewayDiscoveryTests (pass)

Risks

  • Nix mode will now be enabled if openclaw.nixMode=true is set in the stable suite while running the app bundle; that’s intended for Nix deployments, but could surprise users who set it manually.

Follow-ups

  • Fill in Prompt History metadata fields if you want them to be exact (model / thinking level / terminal).

Prompt History

Environment

Harness: pi-coding-agent
Model: unknown
Thinking level: unknown
Terminal: unknown
System: macOS 26.1 (25B78)

Prompts

ISO-8601 Prompt
2026-02-08T16:51:16-08:00 onboarding flow still triggers when i open it. also the app should auto open imo.
2026-02-08T16:51:16-08:00 command hanging?
2026-02-08T16:51:16-08:00 fix nix mode after our rename churn!

Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain.

Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false).
Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging.
@openclaw-barnacle openclaw-barnacle bot added the app: macos App: macos label Feb 9, 2026
@joshp123 joshp123 added the maintainer Maintainer-authored PR label Feb 9, 2026
@joshp123 joshp123 marked this pull request as ready for review February 9, 2026 00:54
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines 18 to 21
static func applyIfNeeded() {
guard ProcessInfo.processInfo.isNixMode else { return }
guard let nixSuite = UserDefaults(suiteName: nixDefaultsSuiteName) else { return }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nix mode check can recurse
NixDefaultsBridge.applyIfNeeded() calls ProcessInfo.processInfo.isNixMode, but isNixMode now consults the stable nixDefaultsSuiteName (via resolveNixMode). That means when Nix mode is only enabled in the stable suite, isNixMode becomes true (because the stable suite says so), and then applyIfNeeded() runs and copies that same openclaw.nixMode into UserDefaults.standard, making the app permanently think it’s in Nix mode even if the stable suite was set unintentionally. If the intent is “bridge only after we already know we’re in Nix mode”, this check needs to rely on env/standard only (or otherwise avoid promoting stable-suite nixMode into standard).

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/macos/Sources/OpenClaw/NixDefaultsBridge.swift
Line: 18:21

Comment:
**Nix mode check can recurse**
`NixDefaultsBridge.applyIfNeeded()` calls `ProcessInfo.processInfo.isNixMode`, but `isNixMode` now consults the stable `nixDefaultsSuiteName` (via `resolveNixMode`). That means when Nix mode is *only* enabled in the stable suite, `isNixMode` becomes true (because the stable suite says so), and then `applyIfNeeded()` runs and copies that same `openclaw.nixMode` into `UserDefaults.standard`, making the app permanently think it’s in Nix mode even if the stable suite was set unintentionally. If the intent is “bridge only after we already know we’re in Nix mode”, this check needs to rely on env/standard only (or otherwise avoid promoting stable-suite nixMode into standard).


How can I resolve this? If you propose a fix, please make it concise.

Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience.
@joshp123 joshp123 merged commit 69aa3df into main Feb 9, 2026
6 checks passed
@joshp123 joshp123 deleted the fix/nix-mode-defaults-domain branch February 9, 2026 01:28
@joshp123
Copy link
Contributor Author

joshp123 commented Feb 9, 2026

Landed via squash.

  • Merge commit: 69aa3df
  • What: macOS app now treats ai.openclaw.mac as a stable defaults suite for openclaw.nixMode (only when running as a .app bundle) to prevent onboarding reappearing after bundle-id churn.
  • Tests (local):
    • pnpm build
    • pnpm check
    • pnpm test
    • cd apps/macos && swift test --filter NixModeStableSuiteTests
    • cd apps/macos && swift test --filter WideAreaGatewayDiscoveryTests

zendizmo pushed a commit to zendizmo/openclaw that referenced this pull request Feb 9, 2026
* macOS: honor Nix defaults suite; auto launch in Nix mode

Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain.

Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false).

* macOS: keep Nix mode fix focused

Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging.

* macOS: simplify nixMode fix

Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience.

* macOS: fix nixMode defaults suite churn (openclaw#12205)
yeboster pushed a commit to yeboster/openclaw that referenced this pull request Feb 9, 2026
* macOS: honor Nix defaults suite; auto launch in Nix mode

Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain.

Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false).

* macOS: keep Nix mode fix focused

Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging.

* macOS: simplify nixMode fix

Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience.

* macOS: fix nixMode defaults suite churn (openclaw#12205)
NikolasP98 pushed a commit to NikolasP98/openclaw that referenced this pull request Feb 9, 2026
* macOS: honor Nix defaults suite; auto launch in Nix mode

Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain.

Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false).

* macOS: keep Nix mode fix focused

Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging.

* macOS: simplify nixMode fix

Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience.

* macOS: fix nixMode defaults suite churn (openclaw#12205)
NikolasP98 added a commit to NikolasP98/openclaw that referenced this pull request Feb 9, 2026
Integrated upstream improvements:
- CRITICAL: Fix bundled hooks broken since 2026.2.2 (openclaw#9295)
- Grok web search provider (xAI) with inline citations
- Telegram video note support with tests and docs
- QMD model cache sharing optimization (openclaw#12114)
- Context overflow false positive fix (openclaw#2078)
- Model failover 400 status handling (openclaw#1879)
- Dynamic config loading per-message (openclaw#11372)
- Gateway post-compaction amnesia fix (openclaw#12283)
- Skills watcher: ignore Python venvs and caches
- Telegram send recovery from stale thread IDs
- Cron job parameter recovery (openclaw#12124)
- Auto-reply weekday timestamps (openclaw#12438)
- Utility consolidation refactoring (PNG, JSON, errors)
- Cross-platform test normalization (openclaw#12212)
- macOS Nix defaults support (openclaw#12205)

Preserved DEV enhancements:
- Docker multi-stage build with enhanced tooling (gh, gog, obsidian-cli, uv, nano-pdf, mcporter, qmd)
- Comprehensive .env.example documentation (371 lines)
- Multi-environment docker-compose support (DEV/PRD)
- GOG/Tailscale integration
- Fork-sync and openclaw-docs skills
- UI config editor (Svelte)
- Fork workflow documentation

Merge strategy: Cherry-picked 22 upstream commits, preserved DEV Docker architecture.
Docker files unchanged: Dockerfile, docker-compose.yml, docker-setup.sh, .env.example

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Ethermious pushed a commit to Ethermious/openclaw that referenced this pull request Feb 9, 2026
* macOS: honor Nix defaults suite; auto launch in Nix mode

Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain.

Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false).

* macOS: keep Nix mode fix focused

Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging.

* macOS: simplify nixMode fix

Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience.

* macOS: fix nixMode defaults suite churn (openclaw#12205)
lucasmpramos pushed a commit to butley/openclaw that referenced this pull request Feb 10, 2026
* macOS: honor Nix defaults suite; auto launch in Nix mode

Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain.

Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false).

* macOS: keep Nix mode fix focused

Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging.

* macOS: simplify nixMode fix

Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience.

* macOS: fix nixMode defaults suite churn (openclaw#12205)
slathrop referenced this pull request in slathrop/openclaw-js Feb 11, 2026
- Add resolveNixMode() reading from stable defaults suite ai.openclaw.mac
- Add NixModeStableSuiteTests for reliable nixMode detection
- Update Constants.swift with stable suite name constant
- Fix onboarding suppression and rename churn resilience in Nix mode
slathrop referenced this pull request in slathrop/openclaw-js Feb 11, 2026
Tasks completed: 2/2
- Port iOS alpha node app + setup-code onboarding (#11756)
- Port macOS Nix defaults suite (#12205)

SUMMARY: .planning/phases/16-gateway-cron-ios/16-06-SUMMARY.md
yeboster pushed a commit to yeboster/openclaw that referenced this pull request Feb 13, 2026
* macOS: honor Nix defaults suite; auto launch in Nix mode

Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain.

Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false).

* macOS: keep Nix mode fix focused

Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging.

* macOS: simplify nixMode fix

Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience.

* macOS: fix nixMode defaults suite churn (openclaw#12205)
skyhawk14 pushed a commit to skyhawk14/openclaw that referenced this pull request Feb 13, 2026
* macOS: honor Nix defaults suite; auto launch in Nix mode

Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain.

Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false).

* macOS: keep Nix mode fix focused

Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging.

* macOS: simplify nixMode fix

Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience.

* macOS: fix nixMode defaults suite churn (openclaw#12205)
mbelinky pushed a commit that referenced this pull request Feb 14, 2026
* macOS: honor Nix defaults suite; auto launch in Nix mode

Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain.

Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false).

* macOS: keep Nix mode fix focused

Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging.

* macOS: simplify nixMode fix

Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience.

* macOS: fix nixMode defaults suite churn (#12205)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos maintainer Maintainer-authored PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments