Skip to content

feat: align plan tiers with upstream /status naming - #202

Merged
Loongphy merged 3 commits into
mainfrom
feat/plan-tiers
Nov 13, 2026
Merged

Loongphy merged 3 commits into
mainfrom
feat/plan-tiers

Conversation

@Loongphy

Copy link
Copy Markdown
Owner

Summary

  • Extend PlanType with promax, business_premium, enterprise_automation, edu_plus, edu_pro, sci, sci_plus so wire values upstream added no longer collapse to unknown.
  • planLabel mirrors upstream /status names: prolite→Pro 100, pro→Pro 200, promax→Pro 500, plus Business Premium, Enterprise (Automation), Edu Plus/Edu Pro, Academic Researchers (Plus).
  • normalizePlanType recognizes the new wire aliases (promax, self_serve_business_prolite, enterprise_cbp_automation, ent26, edu_plus, edu_pro, sci, sci_plus); parseStoredPlanType keeps the schema-4 split so stored tag names and wire values stay distinct ("business" reads .business at v4, .enterprise pre-v4).
  • list --json keeps emitting normalized tag names for the new tiers; isWorkspaceAccount covers every workspace tier.
  • writeTruncated trims a prefix ending on a word boundary so Pro 200 truncates to Pro. instead of Pro ., which read as a dot-only cell.

Test plan

  • zig build
  • zig build test test-helpers — full suite green
  • zig build -Doptimize=ReleaseSafe
  • Isolated CODEX_HOME e2e: schema-4 tag round-trip, schema-2 wire-alias normalization, TUI labels
  • Greptile CLI review: 5/5 confidence, zero comments

Upstream added ProMax and finer-grained business/edu/research wire
values; /status now shows the pro family as Pro 100/Pro 200/Pro 500
and labels tiers like Business Premium and Enterprise (Automation).
codex-auth normalized everything past prolite to unknown and still
printed "Pro Lite"/"Pro".

- PlanType gains promax, business_premium, enterprise_automation,
  edu_plus, edu_pro, sci, sci_plus; planLabel mirrors upstream
  /status display names
- normalizePlanType recognizes the new wire aliases (promax,
  self_serve_business_prolite, enterprise_cbp_automation, ent26,
  edu_plus, edu_pro, sci, sci_plus); parseStoredPlanType keeps the
  schema-4 split so stored tag names and wire values stay distinct
- list --json keeps emitting normalized tag names for the new tiers;
  isWorkspaceAccount treats every workspace tier as workspace
- writeTruncated trims a prefix ending on a word boundary so
  "Pro 200"-style labels truncate to "Pro." instead of "Pro .",
  which read as a standalone dot-only cell
@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the latest change preserves JSON output.

Summary

Adds the new plan tiers and aligns their display labels with upstream /status names.

  • The CLI recognizes new plan tiers and shows their upstream names.
  • The JSON account list emits normalized names for every known plan tier.
  • Workspace checks include the new business, education, and researcher tiers.
  • Truncated table labels keep the dot beside the visible text.

Reviews (3) · Last reviewed commit: "refactor: inline the single planName cal..." · Reviewed by Greptile

@pkg-pr-new

pkg-pr-new Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@loongphy/codex-auth-darwin-arm64

npx https://pkg.pr.new/@loongphy/codex-auth-darwin-arm64@d6fd5c7

@loongphy/codex-auth-darwin-x64

npx https://pkg.pr.new/@loongphy/codex-auth-darwin-x64@d6fd5c7

@loongphy/codex-auth-linux-arm64

npx https://pkg.pr.new/@loongphy/codex-auth-linux-arm64@d6fd5c7

@loongphy/codex-auth-linux-x64

npx https://pkg.pr.new/@loongphy/codex-auth-linux-x64@d6fd5c7

@loongphy/codex-auth-win32-arm64

npx https://pkg.pr.new/@loongphy/codex-auth-win32-arm64@d6fd5c7

@loongphy/codex-auth-win32-x64

npx https://pkg.pr.new/@loongphy/codex-auth-win32-x64@d6fd5c7

@loongphy/codex-auth

npx https://pkg.pr.new/@loongphy/codex-auth@d6fd5c7

commit: d6fd5c7

The explicit switch returned the tag spelling for every variant, and
the registry file already derives the same contract from Stringify's
default enum serialization, so the table only duplicated @TagName.
The Option adapter had exactly one caller; @TagName reads fine at the
call site with the contract note moved alongside.
@Loongphy
Loongphy merged commit dd64986 into main Nov 13, 2026
13 checks passed
@Loongphy
Loongphy deleted the feat/plan-tiers branch November 13, 2026 09:32
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