Skip to content

feat: first login flow - #7553

Open
shortlight5980 wants to merge 1 commit into
labring:mainfrom
shortlight5980:first-login
Open

feat: first login flow#7553
shortlight5980 wants to merge 1 commit into
labring:mainfrom
shortlight5980:first-login

Conversation

@shortlight5980

Copy link
Copy Markdown
Collaborator
  1. 增加了进入首页的弹窗编排器,弹窗按顺序弹出
  2. 当加入团队时必须设置成员名
  3. 通知接收 -> 联系方式,并修改弹窗样式
  4. 当处于同步模式时,后台禁止新增用户

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 33.42% 3351 / 10025
🔵 Statements 33.31% 3537 / 10616
🔵 Functions 27.97% 670 / 2395
🔵 Branches 28.05% 1672 / 5960
File CoverageNo changed files found.
Generated in workflow #2950 for commit 01830d1 by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown

Admin Preview Image Ready!

ghcr.io/labring/fastgpt-pr:admin_01830d1cc877f36cf0456f1be89a8297595df69c

🕒 Time: 2026-09-04 11:25:02 (UTC+8)

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown

Build and publish successful - Preview fastgpt Image:

ghcr.io/labring/fastgpt-pr:fastgpt_01830d1cc877f36cf0456f1be89a8297595df69c

🕒 Time: 2026-09-04 11:28:40 (UTC+8)

@shortlight5980
shortlight5980 force-pushed the first-login branch 8 times, most recently from 9f372ce to e47640e Compare August 27, 2026 12:36
@shortlight5980
shortlight5980 force-pushed the first-login branch 2 times, most recently from b740795 to 1bd16e1 Compare August 31, 2026 03:14
@FinleyGe

FinleyGe commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

[P1] Preserve the legacy invitation acceptance API

This change removes POST /proApi/support/user/team/invitationLink/accept and replaces it with acceptWithMemberName (see packages/global/openapi/support/user/team/invitationLink/index.ts:17 and the Pro submodule change). Existing clients and SDKs that still send the legacy { linkId } request will receive a 404 after upgrading. The new OpenAPI test at packages/global/test/openapi/support/user/api.test.ts:89 also explicitly asserts that the legacy route is absent.

Please keep the old route and contract as a compatibility adapter while retaining the new endpoint. The adapter should preserve the legacy request/empty-response behavior and username-based member name semantics, without applying the new interactive 20-character member-name validation.

@shortlight5980

Copy link
Copy Markdown
Collaborator Author

[P1] Preserve the legacy invitation acceptance API

This change removes POST /proApi/support/user/team/invitationLink/accept and replaces it with acceptWithMemberName (see packages/global/openapi/support/user/team/invitationLink/index.ts:17 and the Pro submodule change). Existing clients and SDKs that still send the legacy { linkId } request will receive a 404 after upgrading. The new OpenAPI test at packages/global/test/openapi/support/user/api.test.ts:89 also explicitly asserts that the legacy route is absent.

Please keep the old route and contract as a compatibility adapter while retaining the new endpoint. The adapter should preserve the legacy request/empty-response behavior and username-based member name semantics, without applying the new interactive 20-character member-name validation.

无需解决

Comment thread projects/app/src/components/Layout/PostLoginActionOrchestrator.tsx Outdated
Comment thread packages/web/i18n/en/account_team.json
Comment thread projects/app/src/components/Layout/PostLoginActionOrchestrator.tsx Outdated
@FinleyGe

FinleyGe commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

[P1] Make the team capacity check atomic

checkTeamMemberLimit(invitation.teamId, 1) at pro/admin/src/service/support/user/team/invitationLink/controller.ts:44 runs before mongoSessionRun, while the findOneAndUpdate that creates or activates the member runs inside the transaction. Two concurrent accepts for different invitations can both observe the same free slot and then both insert, exceeding maxTeamMember. Please reserve capacity atomically or serialize invitation acceptance per team, and re-check under the same concurrency control.

@FinleyGe

FinleyGe commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

[P2] Avoid the post-commit invitation lookup for audit data

After acceptInvitationWithMemberName succeeds and its transaction commits, the handler performs a second MongoInvitationLink.findOne at pro/admin/src/pages/api/support/user/team/invitationLink/acceptWithMemberName.ts:33 solely to read description. A transient read failure then returns 500 even though the member was already added, causing clients to retry a successful join and producing misleading failure behavior. Please return the audit description from the controller result, or capture it before commit, so the successful mutation does not depend on an extra post-commit database read.

@shortlight5980
shortlight5980 force-pushed the first-login branch 2 times, most recently from f82a3a1 to 60378aa Compare September 3, 2026 06:34
@shortlight5980

shortlight5980 commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator Author

[P1] Make the team capacity check atomic

checkTeamMemberLimit(invitation.teamId, 1) at pro/admin/src/service/support/user/team/invitationLink/controller.ts:44 runs before mongoSessionRun, while the findOneAndUpdate that creates or activates the member runs inside the transaction. Two concurrent accepts for different invitations can both observe the same free slot and then both insert, exceeding maxTeamMember. Please reserve capacity atomically or serialize invitation acceptance per team, and re-check under the same concurrency control.

resolved

@shortlight5980

Copy link
Copy Markdown
Collaborator Author

[P2] Avoid the post-commit invitation lookup for audit data

After acceptInvitationWithMemberName succeeds and its transaction commits, the handler performs a second MongoInvitationLink.findOne at pro/admin/src/pages/api/support/user/team/invitationLink/acceptWithMemberName.ts:33 solely to read description. A transient read failure then returns 500 even though the member was already added, causing clients to retry a successful join and producing misleading failure behavior. Please return the audit description from the controller result, or capture it before commit, so the successful mutation does not depend on an extra post-commit database read.

resolved

@FinleyGe FinleyGe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Avaliable for testing.

@shortlight5980
shortlight5980 force-pushed the first-login branch 2 times, most recently from b3d1cd0 to 6dea495 Compare September 4, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants