Skip to content

protable config via .nixmac/settings.json#230

Closed
cooper (czxtm) wants to merge 2 commits into
cm/derive-config-uifrom
cm/portable-derive-settings
Closed

protable config via .nixmac/settings.json#230
cooper (czxtm) wants to merge 2 commits into
cm/derive-config-uifrom
cm/portable-derive-settings

Conversation

@czxtm
Copy link
Copy Markdown
Member

Summary

Test Plan

Docs

  • Docs updated (companion PR in darkmatter/nixmac-web: #___)
  • No docs update needed

cooper (czxtm) and others added 2 commits May 28, 2026 15:12
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…settings.json)

EvolutionLimits (max iterations, max build attempts) now persists in
<config_dir>/.nixmac/settings.json instead of the OS app data directory.
Because the config dir is the user's nix-darwin repo and already syncs
via git, these settings ride along across machines without an explicit
backup/restore step.

Per-device settings (developerMode, pinnedVersion, updateChannel, model
cache, prompt history) stay in the OS app data dir where they belong.

How it works:

- New storage::configurable_scope module exposes repo_store_path(app),
  which returns the absolute path to .nixmac/settings.json and lazily
  creates the directory plus a short README.md the first time it's
  called.

- configurable-derive learns #[config(store_path_fn = <path>)]: instead
  of a hard-coded string, the generated load() method calls a resolver
  function each time. Keeps the derive decoupled from nixmac — any
  consumer can plug in their own path resolver.

- EvolutionLimits opts into the new mode via store_path_fn.

- store::get_max_iterations / set_max_iterations and the
  max_build_attempts pair now read/write the repo store, with a
  best-effort migration from the legacy local store on first read so
  existing users don't see their values reset to defaults. Falls back
  to defaults if config_dir isn't set yet (during onboarding).

- Tuning UI section copy clarifies that values sync via the repo. The
  Backup & Restore section copy clarifies that repo-scoped values are
  versioned by git, not included in the local export.

Also includes the user's separate rename of "vLLM / LiteLLM" → "OpenAI
Compatible" in ai-models-tab.tsx and api-keys-tab.tsx.

Closes: nixmac-gr3

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Member Author

cooper (czxtm) commented May 28, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • automerge - adds this PR to the back of the merge queue
  • urgent - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown
Contributor

Fails
🚫

Your ## Test Plan section is empty. Describe the steps a reviewer should take to verify this change.

🚫

New Rust modules were added without tests. Add a #[cfg(test)] mod tests { … } block or a file under apps/native/src-tauri/tests/:

  • apps/native/src-tauri/src/storage/configurable_scope.rs
🚫

This PR touches behavior-sensitive code that is documented in darkmatter/nixmac-web. Please either:

  • Open a companion docs PR and check Docs updated in the PR description, or
  • Check No docs update needed if the change doesn't affect user-facing behavior.
Warnings
⚠️ Please assign this PR to someone (usually yourself).

📋 PR Overview

Lines changed 201 (+168 / -33)
Files 1 added, 9 modified, 0 deleted
Draft / WIP no
Has Test Plan yes
New UI components no
New Storybook stories no
New Rust modules yes (1)
New TS source files no
New tests no
package.json touched no
Cargo.toml touched no
Infra / CI touched no

🔬 Coverage

Report Lines Statements Functions Branches
apps/native/coverage/coverage-summary.json 17.8% 17.8% 30.9% 54.1%

Generated by 🚫 dangerJS against d57567b

@czxtm
Copy link
Copy Markdown
Member Author

Superseded by the rebuilt Graphite stack starting at #244 and ending at #255.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant