Skip to content

Fix account.me test after Stack billing removal - #7807

Closed
lawrencecchen wants to merge 1 commit into
mainfrom
fix-main-account-me-test
Closed

lawrencecchen wants to merge 1 commit into
mainfrom
fix-main-account-me-test

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • remove the stale PRO_PRODUCT_ID test import deleted by the Stack billing removal
  • verify the real account.me procedure ignores a legacy Stack Pro product and returns the Stripe-only Free state

Testing

  • cd web && bun test tests/account-me-orpc.test.ts
  • cd web && bun run typecheck

Context


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Note

Low Risk
Test-only changes with no production code touched.

Overview
Updates account-me-orpc.test.ts so it matches Stripe-only Pro resolution after Stack billing was removed.

The test that used to assert Stack Pro users get planId: "pro" now asserts a user with only a legacy Stack pro product gets free, isPro: false, and billingManagement: "none". The PRO_PRODUCT_ID import is dropped; the fake user helper uses legacyStackPro and a hardcoded product id instead of pro: true.

Reviewed by Cursor Bugbot for commit 4203094. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Update the account.me test to remove the stale PRO_PRODUCT_ID from Stack billing and verify that a legacy Stack “Pro” product no longer grants Pro status. The test now expects the Stripe-only Free state (planId: "free", isPro: false, billingManagement: "none").

Written for commit 4203094. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Updated account plan handling so legacy Stack billing products correctly remain on the Free plan rather than receiving Pro access.
    • Confirmed expected Free-plan behavior for users without an active Pro subscription, including users without an email address.

@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Building Building Preview, Comment Jul 10, 2026 4:36am
cmux-staging Building Building Preview, Comment Jul 10, 2026 4:36am

@coderabbitai

coderabbitai Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f8737985-f550-4914-b244-0f41284359b5

📥 Commits

Reviewing files that changed from the base of the PR and between 06c9978 and 4203094.

📒 Files selected for processing (1)
  • web/tests/account-me-orpc.test.ts

📝 Walkthrough

Walkthrough

Changes

Legacy Stack Pro eligibility

Layer / File(s) Summary
Update legacy Stack eligibility coverage
web/tests/account-me-orpc.test.ts
Replaces the pro fixture and PRO_PRODUCT_ID dependency with legacyStackPro, and verifies legacy Stack users receive the Free plan without Pro billing management.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

Possibly related PRs

  • manaflow-ai/cmux#7479 — Related billing classification changes distinguish Stripe-managed and legacy Pro states.
  • manaflow-ai/cmux#7662 — Related removal of legacy Stack billing entitlement from Pro determination.
🚥 Pre-merge checks | ✅ 25
✅ Passed checks (25 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the test-only change after Stack billing removal and is concise and specific.
Description check ✅ Passed The description includes a clear summary and testing section and is sufficiently complete for this test-only PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Swift Actor Isolation ✅ Passed Diff only changes a TypeScript test file; no Swift code was introduced or modified, so actor-isolation rules are not implicated.
Cmux Swift Blocking Runtime ✅ Passed PR only changes web/tests/account-me-orpc.test.ts; no Swift files or blocking-runtime synchronization changes are in the diff.
Cmux Browser Automation Off-Main ✅ Passed Only web/tests/account-me-orpc.test.ts changed; no browser automation code, routing, or policy tests were touched.
Cmux Expensive Synchronous Load ✅ Passed Only web/tests/account-me-orpc.test.ts changed; no Swift files or main-actor sync load paths were modified.
Cmux Cache Substitution Correctness ✅ Passed Only a test file changed; no production Swift/TS/JS persistence, history, undo, or snapshot code was altered.
Cmux No Hacky Sleeps ✅ Passed Changed code is test-only and adds no sleeps, timers, polling, or wall-clock waits; the updated test file contains no timing primitives.
Cmux Algorithmic Complexity ✅ Passed Only a test file changed; the new collection logic is fixed-size test scaffolding, with no production hot-path scans or scalable joins introduced.
Cmux Swift Concurrency ✅ Passed The commit only changes web/tests/account-me-orpc.test.ts; no Swift files or concurrency patterns were introduced.
Cmux Swift @Concurrent ✅ Passed No Swift files are changed in this PR; the only modified file is a TypeScript test, so the @concurrent rule is not applicable.
Cmux Swift File And Package Boundaries ✅ Passed PR changes only web/tests/account-me-orpc.test.ts; no Swift production files or package-boundary issues are touched.
Cmux Swiftpm Lockfiles ✅ Passed Diff only changes web/tests/account-me-orpc.test.ts; no SwiftPM/Xcode/.gitignore/workflow/dependency files are touched.
Cmux Swift Logging ✅ Passed Diff only changes a web test; no Swift files or runtime logging additions are present.
Cmux User-Facing Error Privacy ✅ Passed The only affected file is a test, and the new/updated strings are developer-only test assertions, not user-facing errors or copy.
Cmux Full Internationalization ✅ Passed Only web/tests/account-me-orpc.test.ts changed; no web/messages, routing, Swift, or locale catalog files were touched, and the change is test-only.
Cmux Swiftui State Layout ✅ Passed PR only changes a TypeScript test file; no SwiftUI code or layout/state patterns from the rule are touched.
Cmux Architecture Rethink ✅ Passed This commit only changes a TypeScript web test; no Swift code or lifecycle/synchronization patches are introduced, so the Swift-specific rule doesn’t apply.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed Only web/tests/account-me-orpc.test.ts changed; no Swift window code or cmuxAuxiliaryWindowIdentifiers usage is in the diff, so the rule is not applicable.
Cmux Source Artifacts ✅ Passed Only web/tests/account-me-orpc.test.ts changed, and it’s an intentional hand-written test file, not a generated or scratch artifact.
Cmux No Test Or Debug Seam In Production Source ✅ Passed Only web/tests/account-me-orpc.test.ts changed; no Swift files under Sources/ were touched, so the production-source seam rule is not applicable.
Cmux No Ambient Global State ✅ Passed Commit changes only web/tests/account-me-orpc.test.ts; no Swift files were modified, so the Swift ambient-global-state rule is not implicated.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-main-account-me-test

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates the account.me test after Stack billing removal. The main changes are:

  • Removed the stale PRO_PRODUCT_ID test import.
  • Renamed the fake user option to model a legacy Stack Pro product.
  • Updated the expected result to Stripe-only Free billing state.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
web/tests/account-me-orpc.test.ts Updates test coverage so a legacy Stack product no longer grants Pro through account.me.

Reviews (1): Last reviewed commit: "Fix account.me billing test after Stack ..." | Re-trigger Greptile

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Superseded by #7808, which landed the same account.me test repair on main.

This branch was successfully deployed

1 active deployment
Preview – cmux — 4203094a Deployed Jul 10, 2026 by vercel[bot]
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