fix: accept session names after option terminator - #3222
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe session name parser now supports ChangesSession name parsing
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized CLI parser change allows session names beginning with dashes to be handled after 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Issue
A user can create a session named
-hor--json, but cannot delete it from the CLI. Even the escaped command with--prints usage and leaves the session behind.Problem
The session command parser treated
--as a session name. It also treated every--jsontoken as an output option, even after the option terminator.How did we fix it?
Herdr now ends option parsing at
--. The following token is passed to the existing stop or delete operation as the literal session name. Bare help flags and normal--jsonoutput remain unchanged.Verification
The focused parser test failed before because
-- -hreturned usage error 2. It passes afterward, and isolated CLI checks deleted both-hand--jsonwhile bare-hstill showed help. Formatting, clippy, Windows clippy, maintenance, architecture, and asset checks passed. Full nextest had nine environment failures that reproduce unchanged on the base commit; the remaining 3,516 tests passed.refs #3220