Skip to content

Support persisting custom env vars in session defaults#207

Open
kamal wants to merge 2 commits intocameroncooke:mainfrom
kamal:allow-set-env-on-session-defaults
Open

Support persisting custom env vars in session defaults#207
kamal wants to merge 2 commits intocameroncooke:mainfrom
kamal:allow-set-env-on-session-defaults

Conversation

@kamal
Copy link
Contributor

@kamal kamal commented Feb 8, 2026

As a follow up to #203, this adds support for persisting custom environment variables into session defaults

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 8, 2026

Open in StackBlitz

npm i https://pkg.pr.new/cameroncooke/XcodeBuildMCP/xcodebuildmcp@207

commit: eb2f4ff

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 8, 2026

Walkthrough

This pull request introduces support for environment variables in session defaults. The changes extend the session defaults schema by adding an optional env field to store environment variable mappings as records of strings. The SessionDefaults type is updated to include the new env property, and the sessionDefaultKeys array is extended with the 'env' key. Test coverage is added to verify that environment defaults are stored correctly and persisted to configuration files when required. Additionally, the version is updated from '2.0.0-beta.1' to '2.0.0', marking a stable release.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding support for persisting custom environment variables in session defaults.
Description check ✅ Passed The description is directly related to the changeset, referencing issue #203 and explaining the purpose of adding environment variable persistence to session defaults.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
src/utils/session-store.ts (1)

30-31: Shallow merge replaces the entire env object on each setDefaults call.

Because setDefaults uses object spread ({ ...this.defaults, ...partial }), calling it with a new env value will replace — not merge — the previous environment variables map. For example, setting { env: { A: '1' } } followed by { env: { B: '2' } } results in only { B: '2' }.

This is consistent with how all other keys behave, but worth confirming it matches the intended UX for environment variables, where users might expect additive/incremental updates.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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