Fix empty org canvas, editable Studio reserve agents, and org/collab sync - #14
Merged
Merged
Conversation
Empty organizations can create nested departments on the org canvas without a depth cap. Studio-pushed agents in 备选员工 are editable and, after a department match, appear in both 组织架构 and 沟通协作 via a shared workforce refresh. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: XYAI Labs <haoboy8@gmail.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.
Summary
Empty business-space orgs and Studio-pushed agents were unusable: the org canvas had no empty-state create path, deep nesting was effectively hidden, reserve/Studio agents could not be edited, and assigning a department did not keep 组织架构 and 沟通协作 in sync.
This change extends the existing org/employee APIs (no parallel talent model):
workforcestore revision (no full page reload).Demo login / tenant seed is unchanged.
Studio interop contract (for XYAI Studio
components/openxyos)POST /api/xyai/agents/importis the Studio → 备选员工 path.Headers
Authorization: Bearer <tenant JWT>X-XYAI-Interop: studio(required)Body (aliases accepted so Studio can keep current field names)
name(required)roleortitledescription(optionalpositioning/industryare folded in when description is empty)department/department_name(exact tenant name match) ordepartment_idagent_typeskills(string or string[])capabilities(string or string[])avatar_emojiemployee_type(aidefault, orhuman)external_id/source_id/studio_id(idempotency key)Result
talent_pool(source=studio) and anemployeesrow withemployment_category=reserve.external_idupdates the same reserve employee (no duplicate).If Studio needs an additional payload field, mirror it into the parent
components/openxyossubmodule using the aliases above.Security and data impact
talent_pool.external_id,employees.source.X-XYAI-InteropandAccept-Language.Verification
Ran after opening this draft:
All of the above passed. Browser click-through of 组织架构 / 备选员工 / 沟通协作 was not run in this environment (no seeded demo login).
Checklist
zh-CNandencopy.npm run verify:open-sourcepassed.Signed-off-byline.