refactor: split session handler modules - #268
Conversation
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e1946e872
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }; | ||
| } | ||
|
|
||
| const device = await refreshSessionDeviceIfNeeded(session.device, resolveDevice); |
There was a problem hiding this comment.
Validate relaunch args before refreshing/resolving device
prepareExistingOpenCommand now calls refreshSessionDeviceIfNeeded (and prepareNewOpenCommand calls resolveDevice) before validatePreparedOpenRequest runs in prepareResolvedOpenCommand. That means invalid relaunch inputs such as open --relaunch https://... or Android APK targets can be masked by DEVICE_NOT_FOUND when the device is unavailable, instead of returning the expected deterministic INVALID_ARGS error about the bad relaunch target.
Useful? React with 👍 / 👎.
Summary
Refactor the session handler family by extracting command-specific modules and shrinking the remaining routers.
session.tsCloses #267
Validation
pnpm typecheckpnpm test:unitpnpm test:smokepnpm format