feat: add custom click tracking subdomain to domain commands#273
Merged
felipefreitag merged 1 commit intomainfrom Apr 15, 2026
Merged
feat: add custom click tracking subdomain to domain commands#273felipefreitag merged 1 commit intomainfrom
felipefreitag merged 1 commit intomainfrom
Conversation
Add --tracking-subdomain flag to `domains create` and `domains update` commands. Display open_tracking, click_tracking, and tracking_subdomain fields in `domains get` output. Upgrade resend SDK to 6.12.0 which includes tracking domain types and TrackingCAA record support.
Contributor
There was a problem hiding this comment.
2 issues found across 10 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/commands/domains/update.ts">
<violation number="1" location="src/commands/domains/update.ts:52">
P2: Use an explicit undefined check for `trackingSubdomain` in the no-change guard instead of a truthiness check.
(Based on your team's feedback about Commander.js option presence checks using `!== undefined`.) [FEEDBACK_USED]</violation>
<violation number="2" location="src/commands/domains/update.ts:74">
P2: Set `payload.trackingSubdomain` when the option is present (`!== undefined`), not only when truthy.
(Based on your team's feedback about Commander.js option presence checks using `!== undefined`.) [FEEDBACK_USED]</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
| if (clickTracking !== undefined) { | ||
| payload.clickTracking = clickTracking; | ||
| } | ||
| if (trackingSubdomain) { |
Contributor
There was a problem hiding this comment.
P2: Set payload.trackingSubdomain when the option is present (!== undefined), not only when truthy.
(Based on your team's feedback about Commander.js option presence checks using !== undefined.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/commands/domains/update.ts, line 74:
<comment>Set `payload.trackingSubdomain` when the option is present (`!== undefined`), not only when truthy.
(Based on your team's feedback about Commander.js option presence checks using `!== undefined`.) </comment>
<file context>
@@ -61,6 +71,9 @@ export const updateDomainCommand = new Command('update')
if (clickTracking !== undefined) {
payload.clickTracking = clickTracking;
}
+ if (trackingSubdomain) {
+ payload.trackingSubdomain = trackingSubdomain;
+ }
</file context>
Suggested change
| if (trackingSubdomain) { | |
| if (trackingSubdomain !== undefined) { |
| !tls && | ||
| openTracking === undefined && | ||
| clickTracking === undefined && | ||
| !trackingSubdomain |
Contributor
There was a problem hiding this comment.
P2: Use an explicit undefined check for trackingSubdomain in the no-change guard instead of a truthiness check.
(Based on your team's feedback about Commander.js option presence checks using !== undefined.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/commands/domains/update.ts, line 52:
<comment>Use an explicit undefined check for `trackingSubdomain` in the no-change guard instead of a truthiness check.
(Based on your team's feedback about Commander.js option presence checks using `!== undefined`.) </comment>
<file context>
@@ -38,13 +43,18 @@ export const updateDomainCommand = new Command('update')
+ !tls &&
+ openTracking === undefined &&
+ clickTracking === undefined &&
+ !trackingSubdomain
+ ) {
outputError(
</file context>
Suggested change
| !trackingSubdomain | |
| trackingSubdomain === undefined |
vcapretz
approved these changes
Apr 15, 2026
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.
Add --tracking-subdomain flag to
domains createanddomains updatecommands. Display open_tracking, click_tracking, and tracking_subdomain fields indomains getoutput. Upgrade resend SDK to 6.12.0 which includes tracking domain types and TrackingCAA record support.Summary by cubic
Add a
--tracking-subdomainoption to domain commands to let users set a custom subdomain for click/open tracking, and surface tracking settings indomains get. Upgrades theresendSDK to 6.12.0 to support tracking domain types and TrackingCAA records.New Features
domains createanddomains update: add--tracking-subdomain <subdomain>(e.g.,track);updateallows this as the only change.domains get: prints open/click tracking status and the tracking subdomain; JSON now includesopen_tracking,click_tracking, andtracking_subdomain.Dependencies
resendfrom 6.11.0 to 6.12.0 for tracking domain types and TrackingCAA record support.Written for commit f5258b5. Summary will update on new commits.