Repository navigation
feat(v2): add and remove squad members - #233
Merged
Merged
Conversation
The picker needs to offer existing workspace members, and v2-server served no way to list them. Implement the contract's members route as a subset: every live account in the caller's workspace, one page, sorted by display name. v2's memberships table has no membership identity of its own, so the row repeats the user id with version 1 and empty provenance; the README records that difference. A caller outside the workspace gets 403 rather than an empty roster, so the route cannot be used to probe a workspace. Co-Authored-By: Claude Code <noreply@anthropic.com>
A maintainer can now open 添加成员, filter the workspace roster by name, add one existing member with an optional role, and remove a live member after a confirmation. Ends only the squad membership: the workspace membership and the member's history are untouched, and the UI says so. Candidates come from the contract's workspace members route, so nothing outside the workspace can be offered. Agent members stay unavailable because v2-server has no Space Agent directory; the picker states that instead of inventing agents. Co-Authored-By: Claude Code <noreply@anthropic.com>
The development login always signs in as the same account, so the browser flow needs a second human. The e2e seeds one workspace member through the database the v2-server uses (with `pg`, a dev dependency), withdraws older runs' seeded members so the picker stays readable, then drives add, reload and remove in the real frontend and snapshots each state. Co-Authored-By: Claude Code <noreply@anthropic.com>
Workspace owners and administrators may edit any squad, so the page now reads the caller's workspace role instead of only squad maintainers. A 409 from an archived squad now says so, leaving the version-conflict wording for the case where another change really landed first.
Merged
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.
v2,不涉及 specs。
运行 issue:ora-space/circus#797(父 issue ora-space/circus#789 的 R3)
做了什么
详情页现在能加人和移除成员;候选只来自正式契约里的工作区成员接口,不另造目录。
v2-server:实现GET /api/v1/tenants/{tid}/members的子集——调用者所在工作区的有效账号,一页返回、按显示名排序;非成员 403forbidden,非法租户 id 404not_found。v2 的memberships没有成员 id、版本和加入来源,所以id用 user id、version恒为 1,joinMethod/joinedAt/actorDisplayName恒为空,这条差异写进了v2-server/README.md。HTTP 测试用api/openapi.json校验响应,契约路由不会和文档漂移。frontend-v2:「添加成员」打开选择器,候选是本工作区里还没加入本队的有效成员,可按姓名筛选、填职责后加入;成员行加「移除」,二次确认,移除后进入「已退出」历史。文案写明移出小队不影响工作区成员资格、也不授予运行时权限。写操作带 version。pg),再在浏览器里走完 加人 → 刷新仍在 → 移除 → 已退出 历史 → 归档。顺带处理 R2 的两条非阻塞意见
squad_archived和版本冲突,前者提示「这个小队已归档,不能再修改」。验证(head
7f7daf00)截图(head
7f7daf00,来自同一 head 的 e2e)添加成员面板:
加入后详情(人类 2、职责「外部协作」):
移除后(人类 1、已退出 1):
未包含
Refs ora-space/circus#797
🤖 Generated with Claude Code