fix: use actionCommand for telemetry command tracking#472
Conversation
The preAction hook receives (thisCommand, actionCommand) where thisCommand is the root program and actionCommand is the actual subcommand being run. Using thisCommand was incorrectly tracking the root command instead of the actual subcommand executed by the user.
📝 WalkthroughWalkthroughThe preAction hook callback in the CLI now accepts two parameters (thisCommand, actionCommand) instead of one, using actionCommand to correctly track the actual subcommand path. Clarifying comments were added. No exported signatures or core behavior changed. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (2)
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 |
Review CompleteYour review story is ready! Comment !reviewfast on this PR to re-generate the story. |
The preAction hook receives (thisCommand, actionCommand) where thisCommand is the root program and actionCommand is the actual subcommand being run. Using thisCommand was incorrectly tracking the root command instead of the actual subcommand executed by the user.
The preAction hook receives (thisCommand, actionCommand) where thisCommand is the root program and actionCommand is the actual subcommand being run. Using thisCommand was incorrectly tracking the root command instead of the actual subcommand executed by the user.
Summary
preActionhook receives(thisCommand, actionCommand)wherethisCommandis the root program andactionCommandis the actual subcommand being executedthisCommandwould incorrectly track the root command instead of the actual subcommand run by the userTest plan
openspec initand verify telemetry tracks "init" not the root command🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.