config: make zprofile integration reversible #29

Merged
wmc merged 1 commit from codex/zprofile-reversible into main 2026-06-23 07:00:20 +00:00
Owner

Summary

  • add a menu-bar footer action that removes the app-managed .zprofile env integration
  • remove only the managed marker and active source line while preserving user shell profile content, commented copies, no-op profiles, and CRLF line endings
  • document the reversible .zprofile behavior and advance TODO.md to the next P2 proxy performance slice

Verification

  • RED: DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer xcodebuild test -project CodexModelSwitcher.xcodeproj -scheme CodexModelSwitcher -configuration Debug -destination platform=macOS -derivedDataPath /tmp/CodexModelSwitcher-DerivedData-zprofile-red CODE_SIGNING_ALLOWED=NO -only-testing:CodexModelSwitcherTests/CodexConfigWriterTests/testRemoveShellProfileIntegrationRemovesManagedSourceLinesOnly -only-testing:CodexModelSwitcherTests/AppStoreTests/testRemoveShellProfileIntegrationReportsStatusAndRemovesManagedLine
  • RED after review: DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer xcodebuild test -project CodexModelSwitcher.xcodeproj -scheme CodexModelSwitcher -configuration Debug -destination platform=macOS -derivedDataPath /tmp/CodexModelSwitcher-DerivedData-zprofile-review-red CODE_SIGNING_ALLOWED=NO -only-testing:CodexModelSwitcherTests/CodexConfigWriterTests/testRemoveShellProfileIntegrationPreservesCRLFAndReportsChangeState -only-testing:CodexModelSwitcherTests/CodexConfigWriterTests/testRemoveShellProfileIntegrationPreservesProfileWhenNoManagedLinesExist -only-testing:CodexModelSwitcherTests/AppStoreTests/testRemoveShellProfileIntegrationReportsNoopWhenNothingChanged
  • GREEN focused: DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer xcodebuild test -project CodexModelSwitcher.xcodeproj -scheme CodexModelSwitcher -configuration Debug -destination platform=macOS -derivedDataPath /tmp/CodexModelSwitcher-DerivedData-zprofile-review-green2 CODE_SIGNING_ALLOWED=NO -only-testing:CodexModelSwitcherTests/CodexConfigWriterTests/testRemoveShellProfileIntegrationRemovesManagedSourceLinesOnly -only-testing:CodexModelSwitcherTests/CodexConfigWriterTests/testRemoveShellProfileIntegrationPreservesCRLFAndReportsChangeState -only-testing:CodexModelSwitcherTests/CodexConfigWriterTests/testRemoveShellProfileIntegrationPreservesProfileWhenNoManagedLinesExist -only-testing:CodexModelSwitcherTests/CodexConfigWriterTests/testRemoveShellProfileIntegrationIsIdempotentAndDoesNotCreateProfile -only-testing:CodexModelSwitcherTests/AppStoreTests/testRemoveShellProfileIntegrationReportsStatusAndRemovesManagedLine -only-testing:CodexModelSwitcherTests/AppStoreTests/testRemoveShellProfileIntegrationReportsNoopWhenNothingChanged
  • git diff --check
  • scripts/verify.sh

Review

  • subagent read-only review found CRLF/status/accessibility issues; fixed before PR
  • subagent read-only re-review: No findings
## Summary - add a menu-bar footer action that removes the app-managed `.zprofile` env integration - remove only the managed marker and active source line while preserving user shell profile content, commented copies, no-op profiles, and CRLF line endings - document the reversible `.zprofile` behavior and advance TODO.md to the next P2 proxy performance slice ## Verification - RED: `DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer xcodebuild test -project CodexModelSwitcher.xcodeproj -scheme CodexModelSwitcher -configuration Debug -destination platform=macOS -derivedDataPath /tmp/CodexModelSwitcher-DerivedData-zprofile-red CODE_SIGNING_ALLOWED=NO -only-testing:CodexModelSwitcherTests/CodexConfigWriterTests/testRemoveShellProfileIntegrationRemovesManagedSourceLinesOnly -only-testing:CodexModelSwitcherTests/AppStoreTests/testRemoveShellProfileIntegrationReportsStatusAndRemovesManagedLine` - RED after review: `DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer xcodebuild test -project CodexModelSwitcher.xcodeproj -scheme CodexModelSwitcher -configuration Debug -destination platform=macOS -derivedDataPath /tmp/CodexModelSwitcher-DerivedData-zprofile-review-red CODE_SIGNING_ALLOWED=NO -only-testing:CodexModelSwitcherTests/CodexConfigWriterTests/testRemoveShellProfileIntegrationPreservesCRLFAndReportsChangeState -only-testing:CodexModelSwitcherTests/CodexConfigWriterTests/testRemoveShellProfileIntegrationPreservesProfileWhenNoManagedLinesExist -only-testing:CodexModelSwitcherTests/AppStoreTests/testRemoveShellProfileIntegrationReportsNoopWhenNothingChanged` - GREEN focused: `DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer xcodebuild test -project CodexModelSwitcher.xcodeproj -scheme CodexModelSwitcher -configuration Debug -destination platform=macOS -derivedDataPath /tmp/CodexModelSwitcher-DerivedData-zprofile-review-green2 CODE_SIGNING_ALLOWED=NO -only-testing:CodexModelSwitcherTests/CodexConfigWriterTests/testRemoveShellProfileIntegrationRemovesManagedSourceLinesOnly -only-testing:CodexModelSwitcherTests/CodexConfigWriterTests/testRemoveShellProfileIntegrationPreservesCRLFAndReportsChangeState -only-testing:CodexModelSwitcherTests/CodexConfigWriterTests/testRemoveShellProfileIntegrationPreservesProfileWhenNoManagedLinesExist -only-testing:CodexModelSwitcherTests/CodexConfigWriterTests/testRemoveShellProfileIntegrationIsIdempotentAndDoesNotCreateProfile -only-testing:CodexModelSwitcherTests/AppStoreTests/testRemoveShellProfileIntegrationReportsStatusAndRemovesManagedLine -only-testing:CodexModelSwitcherTests/AppStoreTests/testRemoveShellProfileIntegrationReportsNoopWhenNothingChanged` - `git diff --check` - `scripts/verify.sh` ## Review - subagent read-only review found CRLF/status/accessibility issues; fixed before PR - subagent read-only re-review: No findings
wmc merged commit 7b89b71343 into main 2026-06-23 07:00:20 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
wmc/CodexModelSwitcher!29
No description provided.