AIT-385: dedupe alert phone commands — alerts phone is the one surface - #54
Conversation
Delete the top-level `hookmyapp phone` command (never published): its set still carried per-category consent flags from before the consent model changed, and it duplicated `alerts phone` wholesale. The consents subcommand survives as `alerts phone consents` (the opt-out path), and the stale consent fields in the alerts set action type are gone.
|
@codex review |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe CLI adds ChangesAlert phone CLI changes
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant alertPhoneConsents
participant APIClient
CLI->>alertPhoneConsents: provide consent and delivery flags
alertPhoneConsents->>APIClient: PATCH /auth/phone/consents
APIClient-->>alertPhoneConsents: return consent status
alertPhoneConsents-->>CLI: render JSON or table output
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/commands/__tests__/org-profile.test.ts`:
- Around line 44-51: Update the profile help text configured by
registerOrgProfileCommand to reference hookmyapp alerts phone instead of the
removed hookmyapp phone command, and add a regression test in the org profile
command tests that verifies the generated help output contains the corrected
guidance.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 71fb6f50-b4ab-4eeb-9065-c7b7b18da772
📒 Files selected for processing (6)
src/commands/__tests__/alerts.test.tssrc/commands/__tests__/org-profile.test.tssrc/commands/__tests__/phone.test.tssrc/commands/alerts.tssrc/commands/phone.tssrc/index.ts
💤 Files with no reviewable changes (3)
- src/index.ts
- src/commands/tests/phone.test.ts
- src/commands/phone.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82324f5192
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
AIT-385: dedupe alert phone commands — alerts phone is the one surface
Fixes AIT-385
CLI main registered two parallel alert-phone surfaces. The top-level
hookmyapp phone(never published to npm) still shipped per-category consent flags (--no-operational/--product/--marketing) from before the consent model changed, duplicatingalerts phonewholesale.src/commands/phone.tsand its registration;alerts phone {status,set,verify,remove}is the one surface.alerts phone consents(PATCH /auth/phone/consents), same flags and local validation.product?/marketing?fields from thealerts phone setaction type.alerts.test.ts;phone.test.tsbecomesorg-profile.test.ts(org profile tests kept unchanged).1092 tests green, tsc clean. No release yet — rides the pending v0.14.12 tag, so the stale flags never reach npm.
Summary by CodeRabbit
New Features
alerts phone consentscommand for updating operational, product, and marketing alert preferences.Changes
Documentation