Skip to content

feat(subscription): add cross-platform subscription support for mobile IAP#13413

Merged
sudongyuer merged 1 commit into
canaryfrom
LOBE-6521
Apr 10, 2026
Merged

feat(subscription): add cross-platform subscription support for mobile IAP#13413
sudongyuer merged 1 commit into
canaryfrom
LOBE-6521

Conversation

@sudongyuer

Copy link
Copy Markdown
Collaborator

Summary

  • Add crossPlatform.title/desc/manageOnMobile translations for 18 languages
  • Register mobileSubscriptionRouter in mobile tRPC router for IAP sync
  • Add mobileSubscription business router placeholder (implementation in lobehub-cloud)

Test plan

  • Translations verified for all 18 languages
  • Mobile router registration confirmed

🤖 Generated with Claude Code

@vercel

vercel Bot commented Mar 30, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

You don't have permission to create a Preview Deployment for this Vercel project: lobehub.

View Documentation: https://vercel.com/docs/accounts/team-members-and-roles

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We've reviewed this pull request using the Sourcery rules engine

@lobehubbot

Copy link
Copy Markdown
Member

@tcmonster - This is a mobile subscription (IAP) feature with cross-platform support. Please take a look.

@codecov

codecov Bot commented Mar 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.55%. Comparing base (cd49e98) to head (30463db).

Additional details and impacted files
@@            Coverage Diff             @@
##           canary   #13413      +/-   ##
==========================================
- Coverage   66.55%   66.55%   -0.01%     
==========================================
  Files        2023     2023              
  Lines      170859   170859              
  Branches    16563    17330     +767     
==========================================
- Hits       113710   113708       -2     
- Misses      57025    57027       +2     
  Partials      124      124              
Flag Coverage Δ
app 58.55% <ø> (-0.01%) ⬇️
database 92.66% <ø> (ø)
packages/agent-runtime 79.72% <ø> (ø)
packages/context-engine 83.33% <ø> (ø)
packages/conversation-flow 92.36% <ø> (ø)
packages/file-loaders 87.02% <ø> (ø)
packages/memory-user-memory 74.74% <ø> (ø)
packages/model-bank 99.86% <ø> (ø)
packages/model-runtime 84.29% <ø> (ø)
packages/prompts 70.05% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/utils 90.14% <ø> (ø)
packages/web-crawler 88.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Store 65.79% <ø> (ø)
Services 52.12% <ø> (ø)
Server 66.35% <ø> (-0.01%) ⬇️
Libs 52.82% <ø> (ø)
Utils 91.01% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sudongyuer

Copy link
Copy Markdown
Collaborator Author

@claude review this

@claude

claude Bot commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Claude finished @sudongyuer's task in 1m 33s —— View job


Code Review

  • Gather context
  • Read source code changes
  • Review locale changes
  • Post review feedback

This PR makes minimal, focused changes: 3 source files and 78 locale files for translation coverage. Here's the review:


Source Code (src/)

src/business/server/mobile-routers/mobileSubscription.ts (new)

import { router } from '@/libs/trpc/lambda';
export const mobileSubscriptionRouter = router({});

This is identical in structure to the existing src/business/server/lambda-routers/subscription.ts — a placeholder router awaiting cloud implementation. The pattern is consistent with the codebase. No issues here.

src/server/routers/mobile/index.ts

The subscription: mobileSubscriptionRouter registration is clean and alphabetically ordered correctly in the router object. The import is added at the top appropriately.

src/locales/default/subscription.ts

Three new keys added:

'crossPlatform.desc': 'This subscription was purchased through the mobile app...'
'crossPlatform.manageOnMobile': 'Manage on mobile device'
'crossPlatform.title': 'Cross-Platform Subscription'

The keys follow existing naming conventions and the copy is clear and user-friendly.


Locale Files

78 locale files across 18 languages were updated. The crossPlatform.* keys are present and consistent across all languages. The other locale changes (models.json, providers.json, etc.) appear to be routine i18n sync from the CI pipeline, not manually authored.


Observations

  1. Empty router is intentional — The placeholder router({}) will get procedures merged in from lobehub-cloud. This is a valid pattern already used in this codebase. Worth noting that since the router has no procedures, adding it to the mobile router causes no behavioral change until cloud extends it.

  2. No type-check risk — The empty router is valid TypeScript and tRPC will handle it correctly. The import path @/business/server/mobile-routers/mobileSubscription is consistent with neighboring files.

  3. Unrelated locale diffs — Some locale files (e.g., models.json, plugin.json, onboarding.json) include diffs beyond the crossPlatform.* keys. These appear to be auto-generated i18n sync changes, which is expected per the CLAUDE.md workflow ("CI handles it"). Not a concern, but the PR scope is wider than the summary suggests.


Verdict

Looks good. The implementation is minimal, correct, and consistent with existing patterns. The i18n keys are well-formed and properly translated. No bugs, security issues, or structural concerns.

…ubscription router

- Add crossPlatform.title/desc/manageOnMobile translations for 18 languages
- Register mobileSubscriptionRouter in mobile tRPC router
- Add mobileSubscription business router placeholder

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sudongyuer sudongyuer force-pushed the LOBE-6521 branch 2 times, most recently from 30463db to c6882ee Compare April 10, 2026 16:09
@sudongyuer sudongyuer merged commit 17b3ace into canary Apr 10, 2026
32 of 33 checks passed
@sudongyuer sudongyuer deleted the LOBE-6521 branch April 10, 2026 16:27
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.

2 participants