Skip to content

[RoleX V2] Organization membership not displaying in UI after hire/appoint operations #561

@Amasun93

Description

@Amasun93

问题描述

在使用RoleX V2的组织管理功能时,通过和操作成功将角色加入组织并分配岗位后,PromptX桌面客户端的UI界面无法正确显示组织成员关系。

复现步骤

  1. 创建组织: action(operation: 'found', role: '_', name: 'ideaLab', source: ...)
  2. 建立岗位: action(operation: 'establish', role: '_', name: '内容传播总监', org: 'ideaLab', source: ...)
  3. 招聘角色: action(operation: 'hire', role: '_', name: 'dabaihua', org: 'ideaLab')
  4. 任命岗位: action(operation: 'appoint', role: '_', name: 'dabaihua', org: 'ideaLab', position: '内容传播总监')

预期行为

  • 角色应该从"独立角色"列表移动到"ideaLab"组织下
  • 在角色详情的"组织"标签页应该显示所属组织和岗位信息
  • 在左侧组织树中应该能看到该成员

实际行为

  • directory 操作返回的数据显示角色在 positions 列表中,但不在 members 列表中
  • 角色的 identity 中包含了 [organization][position] 信息
  • 但PromptX UI的"组织"标签页显示"未加入任何组织"
  • 角色仍然显示在"独立角色"列表中

系统信息

  • PromptX版本: v2.2.1
  • 操作系统: Windows
  • 数据库: ~/.rolex/rolex.db (SQLite)

额外信息

directory 操作返回的数据结构:

{
  "organizations": [
    {
      "name": "ideaLab",
      "members": [
        {
          "name": "大老师",
          "position": "教学总监"
        }
      ],
      "positions": [
        {
          "name": "dabaihua",
          "description": "内容传播总监"
        },
        {
          "name": "huashuo",
          "description": "画说创作者"
        }
      ]
    }
  ]
}

角色 dabaihuahuashuo 应该出现在 members 列表中,而不是 positions 列表中。

尝试过的解决方法

  1. 多次执行 firehireappoint 操作
  2. 刷新PromptX客户端界面
  3. 重启PromptX应用

以上方法均无效。

影响范围

这个问题阻止了用户正常使用RoleX V2的组织管理功能,无法在UI中查看和管理组织成员关系。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions