-
Notifications
You must be signed in to change notification settings - Fork 6.8k
adjust commercial plans #6008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adjust commercial plans #6008
Conversation
|
There is too much information in the pull request to test. |
Preview mcp_server Image: |
Preview sandbox Image: |
Preview fastgpt Image: |
da6dde6 to
cbdc2ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
跟 app 没关系,应用备案又不是备案我们系统的 app,是别人自己的 app
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements comprehensive adjustments to the commercial subscription plans system, including:
Summary: Refactors the subscription plan structure to support new plan tiers (basic, advanced, custom), adds discount coupon functionality, improves team resource limit management, and enhances the billing/payment UI experience.
Key Changes:
- Introduced discount coupon system with 70% and 90% discount types
- Added app registration tracking and management
- Separated app/tool/folder limit checks into distinct functions
- Restructured plan display to show "remaining" instead of "used" resources
- Enhanced bill management with cancel and detail view capabilities
Reviewed changes
Copilot reviewed 56 out of 66 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
projects/app/src/web/support/wallet/sub/api.ts |
New API endpoint for fetching discount coupon list |
projects/app/src/web/support/wallet/bill/api.ts |
Added bill cancellation and detail retrieval endpoints |
projects/app/src/service/common/system/index.ts |
Added feature flag for discount coupon display |
projects/app/src/pages/price/index.tsx |
Changed back button visibility logic from userInfo to teamSubPlan |
projects/app/src/pages/api/support/user/team/plan/getTeamPlanStatus.ts |
Added app registration count tracking and refined app type filtering |
projects/app/src/pages/api/core/app/*/create.ts |
Replaced checkTeamAppLimit with specific limit checks for apps/tools/folders |
projects/app/src/pages/api/admin/support/appRegistration/create.ts |
New admin API for creating app registration records with quota checks |
projects/app/src/pages/account/* |
UI improvements for plan display showing remaining vs used resources |
projects/app/src/pageComponents/price/Standard.tsx |
Added discount coupon integration, custom plan support, and plan filtering |
projects/app/src/pageComponents/price/ExtraPlan.tsx |
Redesigned to use package-based pricing instead of custom input |
projects/app/src/pageComponents/account/bill/* |
Enhanced bill management with cancel, repay, and detail modal |
projects/app/src/components/support/wallet/StandardPlanContentList.tsx |
Updated plan content display with new features (QPM, audit logs, etc.) |
packages/service/support/permission/teamLimit.ts |
Refactored limit checks into separate functions for apps, tools, and folders |
packages/service/support/wallet/sub/schema.ts |
Added custom level configuration fields to subscription schema |
packages/service/support/wallet/discountCoupon/schema.ts |
New schema for discount coupon management |
packages/service/support/appRegistration/schema.ts |
New schema for app registration tracking |
packages/global/* |
Type definitions and constants for new features |
| i18n files | Added translations for new features across all supported languages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| borderRadius={'sm'} | ||
| transition="width 0.3s" | ||
| w={`${aiPointsUsageMap.rate}%`} | ||
| bg={`${aiPointsUsageMap.rate > 50 ? 'primary' : aiPointsUsageMap.rate > 20 ? 'yellow' : 'red'}.500`} |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The progress bar logic is inverted. When rate > 50, it shows 'primary' (full), but rate represents the remaining percentage, not used percentage. The colors should be:
rate > 50(more than 50% remaining) → greenrate > 20(20-50% remaining) → yellowrate <= 20(less than 20% remaining) → red
The condition aiPointsUsageMap.rate > 50 ? 'primary' : aiPointsUsageMap.rate > 20 ? 'yellow' : 'red' should be aiPointsUsageMap.rate > 50 ? 'green' : aiPointsUsageMap.rate > 20 ? 'yellow' : 'red'.
e64b9a5 to
b03712b
Compare
b03712b to
a598994
Compare
* plan frontend * plan limit * coupon * discount coupon * fix * type * fix audit * type * plan name * legacy plan * track * feat: add discount coupon * fix * fix discount coupon * openapi * type * type * env * api type * fix
* plan frontend * plan limit * coupon * discount coupon * fix * type * fix audit * type * plan name * legacy plan * track * feat: add discount coupon * fix * fix discount coupon * openapi * type * type * env * api type * fix
* feat: add query optimize and bill (#6021) * add query optimize and bill * perf: query extension * fix: embe model * remove log * remove log * fix: test --------- Co-authored-by: xxyyh <2289112474@qq> Co-authored-by: archer <545436317@qq.com> * feat: notice (#6013) * feat: record user's language * feat: notice points/dataset indexes; support count limit; update docker-compose.yml * fix: ts error * feat: send auth code i18n * chore: dataset notice limit * chore: adjust * fix: ts * fix: countLimit race condition; i18n en-prefix locale fallback to en --------- Co-authored-by: archer <545436317@qq.com> * perf: comment * perf: send inform code * fix: type error (#6029) * feat: add ip region for chat logs (#6010) * feat: add ip region for chat logs * refactor: use Geolite2.mmdb * fix: export chat logs * fix: return location directly * test: add unit test * perf: log show ip data * adjust commercial plans (#6008) * plan frontend * plan limit * coupon * discount coupon * fix * type * fix audit * type * plan name * legacy plan * track * feat: add discount coupon * fix * fix discount coupon * openapi * type * type * env * api type * fix * fix: simple agent plugin input & agent dashboard card (#6034) * refactor: remove gridfs (#6031) * fix: replace gridfs multer operations with s3 compatible ops * wip: s3 features * refactor: remove gridfs * fix * perf: mock test * doc * doc * doc * fix: test * fix: s3 * fix: mock s3 * remove invalid config * fix: init query extension * initv4144 (#6037) * chore: initv4144 * fix * version * fix: new plans (#6039) * fix: new plans * qr modal tip * fix: buffer raw text filename (#6040) * fix: initv4144 (#6041) * fix: pay refresh (#6042) * fix: migration shell * rename collection * clear timerlock * clear timerlock * perf: faq * perf: bill schema * fix: openapi * doc * fix: share var render * feat: delete dataset queue * plan usage display (#6043) * plan usage display * text * fix * fix: ts * perf: remove invalid code * perf: init shell * doc * perf: rename field * perf: avatar presign * init * custom plan text (#6045) * fix plans * fix * fixed * computed --------- Co-authored-by: archer <545436317@qq.com> * init shell * plan text & price page back button (#6046) * init * index * delete dataset * delete dataset * perf: delete dataset * init --------- Co-authored-by: YeYuheng <57035043+YYH211@users.noreply.github.com> Co-authored-by: xxyyh <2289112474@qq> Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com> Co-authored-by: Roy <whoeverimf5@gmail.com> Co-authored-by: heheer <heheer@sealos.io>
No description provided.