Skip to content

Rename subject variable to title in message shortcut#246

Merged
jeremy merged 2 commits intomainfrom
message-subject-to-title
Mar 11, 2026
Merged

Rename subject variable to title in message shortcut#246
jeremy merged 2 commits intomainfrom
message-subject-to-title

Conversation

@jeremy
Copy link
Copy Markdown
Member

@jeremy jeremy commented Mar 11, 2026

Summary

  • Renames internal subject variable to title in NewMessageCmd shortcut
  • Fixes stale test comments that still referenced "subject"
  • SDK field Subject unchanged (API-level name)

Context

DHH feedback card 9660630993 — the CLI surface (Use strings, flags, create subcommand) already says "title" everywhere; only the shortcut's internal variable name was inconsistent.

Test plan

  • bin/ci passes
  • Grep for subject in messages.go — only SDK-level req.Subject remains

Summary by cubic

Renamed the internal subject variable to title in the NewMessageCmd shortcut to match CLI terminology. Updated test function names and comments to use "title" (and "body" where relevant); the SDK request still sets Subject for the API field.

Written for commit 06158cf. Summary will update on new commits.

@jeremy jeremy requested a review from a team as a code owner March 11, 2026 03:23
Copilot AI review requested due to automatic review settings March 11, 2026 03:23
@github-actions github-actions bot added commands CLI command implementations tests Tests (unit and e2e) labels Mar 11, 2026
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.

No issues found across 2 files

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aligns the message shortcut implementation with the CLI’s “title” terminology by renaming the internal positional argument variable from subject to title, while keeping the SDK request field name Subject unchanged (API-level).

Changes:

  • Rename the local subject variable to title inside NewMessageCmd.
  • Update stale test comments that referenced “subject” to “title”.
  • Preserve SDK request field naming (req.Subject) for compatibility.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
internal/commands/messages.go Renames the message shortcut’s internal positional arg variable to title and wires it to CreateMessageRequest.Subject.
internal/commands/messages_test.go Updates test comments to refer to “title” instead of “subject”.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions bot added the breaking Breaking change label Mar 11, 2026
@github-actions
Copy link
Copy Markdown

⚠️ Potential breaking changes detected:

  • Renamed 'subject' argument to 'title' in CLI commands, which is a breaking change as it modifies expected input arguments.

Review carefully before merging. Consider a major version bump.

jeremy added 2 commits March 10, 2026 21:46
The create subcommand and all CLI flags already say "title" — only the
shortcut's internal variable name was still called subject. Aligns
code with the user-facing terminology. SDK field remains Subject
(the API-level name).
TestMessagesCreateShowsHelpWithoutSubject → WithoutTitle
TestMessageShortcutShowsHelpWithoutSubject → WithoutTitle
Copilot AI review requested due to automatic review settings March 11, 2026 04:48
@jeremy jeremy force-pushed the message-subject-to-title branch from 845b1d4 to 06158cf Compare March 11, 2026 04:48
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jeremy jeremy merged commit 6d31997 into main Mar 11, 2026
29 checks passed
@jeremy jeremy deleted the message-subject-to-title branch March 11, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking change commands CLI command implementations tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants