Skip to content

fix(billing): display the true name of each subscription tier - #21313

Merged
Git-on-my-level merged 10 commits into
mainfrom
lane/sub-w1-identity
Oct 12, 2026
Merged

Git-on-my-level merged 10 commits into
mainfrom
lane/sub-w1-identity

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

What changed and why

Display the canonical subscription names: Free, Plus, Pro (operator), Architect, Neo (unlimited), and Unlimited (unlimited_v2). Settings no longer calls every paying mobile subscriber Pro, and plan-change confirmation names both tiers. Keep prices, entitlement fields, storefront filters and the pro → Architect wire alias unchanged.

Preserve Operator in backend paid-plan definitions: released macOS builds infer fallback price ownership from titles and map Pro Monthly/Pro Annual to Architect. Their merger would attach Operator prices to Architect. This compatibility carrier stays unchanged for every client; no version floor is raised without shipped-client evidence. The current macOS client takes card headings, selection labels and billing details from canonical plan IDs, so the retained wire title displays as Pro. Windows billing subtitles also use the owning plan ID. Fix legacy Unlimited Plan Monthly/Annual parsing, the Windows title fallback, and web referral copy.

Current main already has lossless unknown-plan decoders in all four clients (#11979); this PR preserves those contracts. The remap floors are a separate follow-up.

Product invariants affected

none

How it was verified

  • Code-read: confirmed payment suffixes, shipped macOS substring parser, fallback price union, first matching billing-price lookup and price-ID checkout. Keeping the Operator carrier protects installed binaries without changing price ownership or access.
  • Unit test: safe backend runner with BACKEND_PYTEST_MARK_EXPR='not integration' BACKEND_UNIT_TEST_FILE_LIST=/private/tmp/omi-w1-names-focused.list bash backend/test.sh: 89 passed across catalog, subscription and restructure suites. Both wire-title intervals are covered; canonical catalog display name remains Pro.
  • Full web shard: bun run check passed typecheck and 655 Vitest tests in 122 files.
  • Full Windows shard: Node 22 / pnpm@10 test: 5,577 passed, 33 skipped (553 passing files, 6 skipped). Focused billing and plan-usage tests: 71 passed.
  • Unit test: full app xcrun swift test --package-path desktop/macos/Desktop --filter 'SubscriptionInfoDecoderTests|SubscriptionPlanNamesTests|SubscriptionPlanCatalogMergerTests|SubscriptionPlanPresentationTests': 16 XCTest tests passed. swift build alone does not execute Tests.
  • Static check: pinned SwiftLint passed with zero violations across 1,849 files. The initial preflight caught a force unwrap in the new test fixture; it was replaced with XCTUnwrap and all 16 selected XCTest tests passed again.
  • Preflight: make preflight and PR-body validation each passed all 54 selected checks; the normal push hook passed backend typechecking, runtime source closure and its focused backend unit selection.
  • Prior unit tests, not rerun in this review follow-up: Flutter protected spine, selected plan/price/l10n and provider/widget tests passed. Flutter files were not changed in this follow-up.
  • Not run: live authenticated UI, real checkout, production data reads, deployments. This is a draft.

Tests

Regression coverage keeps monthly/annual Operator fallback prices off Architect, verifies ID-derived macOS titles despite stale server names, and covers monthly/annual legacy title parsing. Windows subtitle regression uses stale Architect and Operator titles. Existing decoder suites retain unknown IDs without granting paid capability.

UI evidence

UI-Evidence: none -- Hermetic plan presentation tested; live authenticated UI was not exercised. Review visual presentation before release.

Failure class

Failure-Class: none

Risks for reviewers

  1. Keep the backend Operator wire carrier until release evidence proves the oldest served macOS parser is safe; catalog floors and storefront partitioning stay unchanged.
  2. Check all three macOS ID-derived presentation paths and the fallback price union: retained primary raw titles must not leak into headings or billing labels.
  3. Check legacy Omi Pro/pro still identifies Architect, while Unlimited Plan with both interval suffixes identifies Neo.
  4. Check Windows subtitles resolve by owning catalog ID and price ID, including stale cached titles; checkout price IDs are unchanged.
  5. Review Flutter plan-change interval copy and web referral wording; live UI and actual purchase acceptance remain unverified.

Follow-up integration

The coordinator clarified that LLM-only BYOK must preserve its synthetic Neo feature identity while transcription budgets come from enforcement. #21315 implements that projection; #21314 tests/renders the corrected meter. This name-only draft preserves identity and access semantics. Merge order: #21313, #21315, #21314. All drafts remain unmerged.

Post-refresh main merge parent: c545d6a. Fresh CI is observed separately after push.

@Git-on-my-level
Git-on-my-level marked this pull request as ready for review October 12, 2026 19:27
@Git-on-my-level
Git-on-my-level merged commit 462ec19 into main Oct 12, 2026
64 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/sub-w1-identity branch October 12, 2026 19:27
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T19:35:51.107453Z 5553508 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

return planDisplayName(response.subscription.plan, response.availablePlans, context.l10n);

P1 Badge Resolve remapped mobile plans before displaying names

With the checked-in backend defaults, wire_plan_for_client still maps both plus and unlimited_v2 subscriptions to unlimited for every current mobile version because the capability floor remains 99.0.0. Deriving the label only from response.subscription.plan therefore shows existing Plus and Unlimited subscribers as Neo in the settings row and in plan-change confirmations. Resolve the owning catalog plan through current_price_id before falling back to the remapped wire identity.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 161 to +162
const operator =
catalog.find((p) => p.id === 'operator' || p.title === 'Operator') ?? catalog[0]
catalog.find((p) => p.id === 'operator') ?? catalog[0]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Canonicalize names in the Windows purchase grid

Matching the Operator card by ID fixes this jump target, but the same catalog is passed unchanged to PlanGrid, where both the heading and selection button render plan.title. Because the backend deliberately keeps that wire title as Operator for released macOS compatibility, Windows still offers an “Operator” card while its banner and current-plan card say “Pro”; derive the purchase-card label from plan.id without changing the compatibility title.

Useful? React with 👍 / 👎.

Comment on lines +335 to +336
message:
'${currentPlanDisplayName(context, provider.subscription)} → ${planDisplayName(PlanType.fromWire(targetPlan), plans, l10n)} (${selectedPrice.title})',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Localize the plan-change message

For every non-English locale, this replaces the existing translated planSwitchingDescriptionWithTitle message with hard-coded punctuation and an English billing interval such as Monthly, so the confirmation dialog becomes partially English. Add a localized template that accepts the source tier, target tier, and interval instead of interpolating the complete user-facing sentence here.

AGENTS.md reference: app/AGENTS.md:L116-L120

Useful? React with 👍 / 👎.

Comment on lines 350 to +351
subscription.deprecationMessage
?? "Your Unlimited plan is being retired. Try the new Operator plan — same great features at \(operatorDeprecationFallbackPrice)."
?? "Your Unlimited plan is being retired. Try the new Pro plan — same great features at \(operatorDeprecationFallbackPrice)."

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Normalize legacy deprecation messages before display

When deprecationMessage is populated, this ?? expression always prefers the server text, so the newly corrected Pro fallback is never used. The supported decoder input still includes legacy copy such as “Try the Operator plan,” meaning subscriptions carrying that persisted message continue to show the retired name on macOS; Windows applies the same precedence. Normalize the legacy server copy or migrate it at the backend instead of updating only the nil fallback.

Useful? React with 👍 / 👎.

Comment on lines 93 to +94
case .operator:
return "Operator"
return "Pro"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Rename the remaining macOS Operator copy

The canonical name is updated here, but other user-facing macOS surfaces for the same operator entitlement still say “Operator”: ReferralProgramView.swift advertises “one free month of Operator,” and SettingsSidebar.swift offers “Buy Operator or Architect” and “Share one free month of Operator.” Users therefore see the retired name immediately outside the billing card; update those referral and settings-search strings in the same rename.

Useful? React with 👍 / 👎.

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