Skip to content

feat: add custom click tracking subdomain to domain commands#273

Merged
felipefreitag merged 1 commit intomainfrom
worktree-feat+custom-click-tracking
Apr 15, 2026
Merged

feat: add custom click tracking subdomain to domain commands#273
felipefreitag merged 1 commit intomainfrom
worktree-feat+custom-click-tracking

Conversation

@felipefreitag
Copy link
Copy Markdown
Contributor

@felipefreitag felipefreitag commented Apr 15, 2026

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.


Summary by cubic

Add a --tracking-subdomain option to domain commands to let users set a custom subdomain for click/open tracking, and surface tracking settings in domains get. Upgrades the resend SDK to 6.12.0 to support tracking domain types and TrackingCAA records.

  • New Features

    • domains create and domains update: add --tracking-subdomain <subdomain> (e.g., track); update allows this as the only change.
    • domains get: prints open/click tracking status and the tracking subdomain; JSON now includes open_tracking, click_tracking, and tracking_subdomain.
    • DNS records output now shows a Tracking CNAME when configured; docs updated.
  • Dependencies

    • Bump resend from 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.

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.
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.)

View Feedback

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) {
Fix with Cubic

!tls &&
openTracking === undefined &&
clickTracking === undefined &&
!trackingSubdomain
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.)

View Feedback

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
Fix with Cubic

@felipefreitag felipefreitag merged commit a640af7 into main Apr 15, 2026
8 checks passed
@felipefreitag felipefreitag deleted the worktree-feat+custom-click-tracking branch April 15, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants