R18-H1: web 成员管理镜像 + 邀请列表读端点 - #10
Merged
Merged
Conversation
R18 批 H1(成员管理面板 · 未过期邀请清单):新增 admin 门控的读端点
GET /api/auth/invites?status=pending,回本工作区未接受∧未撤销∧未过期的邀请
{invites:[{invite_id,email,expires_at,created_at}]}——绝不回 token(服务端只存
sha256,明文取不回)。门控/错误码同 POST /invites。
- db: InviteRepository.listPending(workspaceId, now),最新在前
- contracts: pendingInviteVmSchema / listPendingInvitesResultVmSchema(additive)
- openapi: GET /api/auth/invites additive path + 响应 schema
- test: 列出/排除(已接受/撤销/过期)、无 token、403 非管理员、400 非 pending
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nsole)
R18 批 H1(web 会话镜像成员管理):只读会话镜像 /conversations/:id 新增「参与者」
侧区——SSR 出加载态骨架,browser.ts bindConversationParticipantsPanel 拉 GET
/participants 后按 scope/is_dm 渲:
* main(scope:"workspace")→ 全员会话说明,无动作;
* DM(is_dm)→ 双人说明,无动作;
* 普通群 → 成员条 + 群管理动作:任何参与者可加人(工作区成员选择器,排除已在群者)
与退出(自删);群主额外可移出他人。调 G1 端点,403/409 按错误码人话化,动作落定重拉。
SSE 取舍(G-web 窄化纪律):web 镜像页刻意不订会话 SSE(liveEventTypes 已排除
conversation.*)——参与者变化靠「动作后重拉 + 手动刷新按钮」感知,不把 conversation.*
事件引回 web。
- contracts: conversationParticipantsVmSchema 增 additive/optional is_dm 判别位
- api: listParticipants/addParticipant 从 dm_key 如实推导 is_dm
- ui: 会话镜像 SSR 参与者骨架 + 测试
- web: bindConversationParticipantsPanel(水合 + 群管理动作 + 双语错误矩阵)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
R18 批 H1(web 工作区成员管理):/settings 新增管理员可见的「成员」分区——SSR 出
加载态骨架(isAdmin 由外壳登录态门控,同 memory 团队技能 tab),browser.ts
bindSettingsMembersPanel 水合:
* 成员 roster(昵称/角色/加入时间)+ 移出/改角色(DELETE/PATCH
/api/workspace/members/:userId,last-admin/self 保护按错误码人话化);
* 邀请成员(POST /api/auth/invites,令牌一次性展示 + 复制)+ 未过期邀请清单
(GET /api/auth/invites?status=pending,昵称模式 404 → 诚实说明不渲表单)。
新增窄读端点 GET /api/workspace/members(管理员门控,同增删/改角色):
- contracts: workspaceMemberSummaryVmSchema / listWorkspaceMembersResultVmSchema
- db: memberships.listActiveWithNicknameByWorkspace(join users,取昵称+加入时间)
- api: WorkspaceMemberService.listMembers + assertManager 抽取(读写共用门)
- openapi: GET /api/workspace/members additive path
- ui: renderSettingsRouteComponent 接 isAdmin,成员/邀请分区骨架 + 测试
- web: bindSettingsMembersPanel(roster/角色/移出 + 邀请 + 未过期清单 + 错误矩阵)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
R18 批 H1(项目设置成员分区镜像):项目主页(管理者视角)新增「成员」摘要小块—— SSR 出加载态骨架,browser.ts bindProjectHomeMembersPanel 拉 /api/users(主区全员 计数)与 /api/projects/:id/conversations(协同会话数=collab 非 DM + 主区会话 id)后 填数并链到主区会话镜像 /conversations/:id。轻量镜像,不复制桌面工作台的成员全功能; 取数失败静默降级 + 重试。 - ui: renderProjectHomeRouteComponent 增成员摘要骨架 + 测试 - web: bindProjectHomeMembersPanel(复用既有只读端点,无新增端点) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
G1 遗留的 web 五项镜像:会话镜像参与者管理(加人/退群/移出,main/DM 如实无动作)/设置成员分区(roster/角色/移出/邀请一次性 token+未过期清单)/项目主页成员摘要;新增 GET /api/auth/invites?status=pending 与 GET /api/workspace/members 窄读端点(全 additive)。web 不回引 conversation.* SSE(手动刷新+动作后重拉)。负责人审查+复验绿;施工侧自跑 web smoke 82 步 ok + release-gate exit 0。
🤖 Generated with Claude Code