Skip to content

Add --lang and --clear-lang to emails generate and edit (brew-v2#2225) - #70

Merged
thedogwiththedataonit merged 1 commit into
mainfrom
claude/email-lang
Oct 24, 2026
Merged

thedogwiththedataonit merged 1 commit into
mainfrom
claude/email-lang

Conversation

@thedogwiththedataonit

@thedogwiththedataonit thedogwiththedataonit commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to GetBrew/brew-v2#2225 (merged and deployed 10-23), which added emails.lang: the language of an email's copy, as an ISO 639-1 code or zh-Hans / zh-Hant. Companion PRs: GetBrew/typescript-sdk#81 and GetBrew/docs#350.

The vendored spec and generated types already carry lang on main, and the published @brew.new/sdk 13.3.0 types it. This PR adds the command surface:

  • emails generate --lang <code> sends the body lang. If you omit it, Brew detects the language from the finished body.
  • emails edit --lang <code> sends the body lang. lang joins the envelope fields, so --lang alone is a free in-place patch: no AI run and no new version. The progress line reads "Setting the language…". A language you set is kept from then on.
  • emails edit --clear-lang sends lang: null, which clears a named language so Brew reads it again. It conflicts with --lang (exit 2), mirroring --group-id / --ungroup.
  • emails get prints the API row as-is, so lang appears. A test pins this.
  • docs/commands/README.md regenerated. README and CHANGELOG (Unreleased) updated.
  • Tests match the --subject-line ones: generate --lang, edit lang-only (no generation heartbeat), edit prompt + lang, --clear-lang, the --lang + --clear-lang conflict, and get shows lang. The write tests fail without the command changes.

The flag is not checked against the enum locally. The API's 400 names lang and lists the valid codes.

Checks

  • tsc --noEmit, biome check . and docs:commands:check pass.
  • vitest run: 706/706 passing, on main at 1daa79f.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge after the companion API change is deployed.

Summary

Adds language options to email creation and editing.

  • New email designs can use a language chosen by the writer.
  • Email writers can set or clear the copy language on existing designs.

No actionable issues found. Tests were inspected, not run. The previous-review guard failed because the merge bases differ, so this review covered the full PR diff.

Reviews (2) · Last reviewed commit: "Add --lang and --clear-lang to emails ge..." · Reviewed by Greptile

@thedogwiththedataonit
thedogwiththedataonit marked this pull request as ready for review October 23, 2026 09:50
--lang <code> sends the body lang on emails generate and emails edit;
alone on edit it is a free envelope patch. --clear-lang sends lang: null
so Brew reads the language again. emails get shows lang.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thedogwiththedataonit thedogwiththedataonit changed the title Add --lang to emails generate and edit (brew-v2#2225) Add --lang and --clear-lang to emails generate and edit (brew-v2#2225) Oct 24, 2026
@thedogwiththedataonit
thedogwiththedataonit merged commit 9250732 into main Oct 24, 2026
2 checks passed
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.

1 participant