feat: add --shutdown option to close command for iOS simulator teardown#176
Merged
feat: add --shutdown option to close command for iOS simulator teardown#176
Conversation
…wn (#172) When --shutdown is passed, close ends the session then runs xcrun simctl shutdown on the associated simulator. Shutdown result (success, exitCode, stdout, stderr) is included in the JSON response data. The option is silently ignored for non-simulator targets (physical iOS devices, Android). A shutdownSimulator override is injected into handleSessionCommands for testability. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
c2a1a2e to
4033408
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #172
Summary
--shutdownflag to theclosecommandxcrun simctl shutdownsuccess,exitCode,stdout,stderr) is included in the JSON responsedata.shutdownChanges
command-schema.ts: addsshutdown?: booleantoCliFlags, registers--shutdownflag, adds it toclose'sallowedFlagssimulator.ts: addsshutdownSimulator(device)— wrapsxcrun simctl shutdown <udid>withallowFailure: truesession.ts: invokesshutdownSimulatorafter session deletion when flag is set and device is a simulator; injectable override for testssessions.md/session-management.md: documents the new flag with usage example and CI/multi-tenant note--shutdownaccepted,--shutdown --jsonno-daemon no-op)Test plan
close --shutdownon iOS simulator ends session and shuts down the simulator;data.shutdown.success === trueclose --shutdownon iOS physical device ends session normally, no shutdown calledclose(no flag) on iOS simulator ends session without calling shutdownclose --shutdown --jsonno-daemon no-op returns same response as without--shutdown🤖 Generated with Claude Code