Compare commits

..

5 Commits

Author SHA1 Message Date
dadachann 2383485b86 refactor: move admin management into session monitor, fix session_id enum format
- Remove standalone admins tab, replace with BotAdminsDialog in session monitor
- Add admin toggle button inline in chat header next to Active status
- Add BotAdminsDialog component with useBotAdmins hook
- Fix session_id written as LauncherTypes.PERSON_xxx instead of person_xxx
  (monitoring_helper.py x4, pipelinemgr.py x1 missing .value on launcher_type)
- Fix duplicate platform/person label in session list and chat header
- Migrate existing malformed session_id records in DB
2026-06-27 05:17:52 -04:00
dadachann 9ab346c678 fix(ci): eslint-prettier fix BackendClient.ts single-param formatting 2026-06-26 12:53:47 -04:00
dadachann a0ea0704fc fix(ci): prettier format BackendClient.ts and i18n locales 2026-06-26 12:52:49 -04:00
dadachann 6c5b01fa3c fix(ci): ruff/prettier format, fix test_importutil assertion 2026-06-26 12:50:26 -04:00
dadachann 2ef3aebe16 feat(platform): migrate bot admins from config.yaml to database
- Add BotAdmin ORM model (bot_admins table) scoped per bot_uuid
- Add Alembic migration 0007 to create table and migrate legacy config admins
- Remove top-level admins key from config.yaml template
- Add GET/POST/DELETE /api/v1/platform/bots/<uuid>/admins endpoints
- Update cmdmgr privilege check to query bot_admins table (bot-scoped)
- Add BotAdminsPanel frontend component in bot detail sessions tab
- Add i18n keys (zh-Hans, en-US)
2026-06-26 12:43:30 -04:00
6 changed files with 0 additions and 119 deletions
-20
View File
@@ -456,26 +456,6 @@ const esES = {
userMessage: 'Usuario',
botMessage: 'Asistente',
},
admins: {
title: 'Admins',
description:
"Launchers (person/group IDs) that have admin privilege for this bot's commands",
addAdmin: 'Add Admin',
launcherType: 'Type',
launcherId: 'ID',
typePerson: 'Person',
typeGroup: 'Group',
placeholderId: 'User or group ID',
addSuccess: 'Admin added',
addError: 'Failed to add admin: ',
deleteSuccess: 'Admin removed',
deleteError: 'Failed to remove admin: ',
noAdmins: 'No admins configured',
setAdminTitle: 'Set as admin',
removeAdminTitle: 'Remove admin',
adminBadge: 'Admin',
configureAdmins: 'Manage Admins',
},
},
plugins: {
title: 'Extensiones',
-20
View File
@@ -450,26 +450,6 @@ const jaJP = {
userMessage: 'ユーザー',
botMessage: 'アシスタント',
},
admins: {
title: 'Admins',
description:
"Launchers (person/group IDs) that have admin privilege for this bot's commands",
addAdmin: 'Add Admin',
launcherType: 'Type',
launcherId: 'ID',
typePerson: 'Person',
typeGroup: 'Group',
placeholderId: 'User or group ID',
addSuccess: 'Admin added',
addError: 'Failed to add admin: ',
deleteSuccess: 'Admin removed',
deleteError: 'Failed to remove admin: ',
noAdmins: 'No admins configured',
setAdminTitle: 'Set as admin',
removeAdminTitle: 'Remove admin',
adminBadge: 'Admin',
configureAdmins: 'Manage Admins',
},
},
plugins: {
title: '拡張機能',
-20
View File
@@ -454,26 +454,6 @@ const ruRU = {
userMessage: 'Пользователь',
botMessage: 'Ассистент',
},
admins: {
title: 'Admins',
description:
"Launchers (person/group IDs) that have admin privilege for this bot's commands",
addAdmin: 'Add Admin',
launcherType: 'Type',
launcherId: 'ID',
typePerson: 'Person',
typeGroup: 'Group',
placeholderId: 'User or group ID',
addSuccess: 'Admin added',
addError: 'Failed to add admin: ',
deleteSuccess: 'Admin removed',
deleteError: 'Failed to remove admin: ',
noAdmins: 'No admins configured',
setAdminTitle: 'Set as admin',
removeAdminTitle: 'Remove admin',
adminBadge: 'Admin',
configureAdmins: 'Manage Admins',
},
},
plugins: {
title: 'Расширения',
-20
View File
@@ -440,26 +440,6 @@ const thTH = {
userMessage: 'ผู้ใช้',
botMessage: 'ผู้ช่วย',
},
admins: {
title: 'Admins',
description:
"Launchers (person/group IDs) that have admin privilege for this bot's commands",
addAdmin: 'Add Admin',
launcherType: 'Type',
launcherId: 'ID',
typePerson: 'Person',
typeGroup: 'Group',
placeholderId: 'User or group ID',
addSuccess: 'Admin added',
addError: 'Failed to add admin: ',
deleteSuccess: 'Admin removed',
deleteError: 'Failed to remove admin: ',
noAdmins: 'No admins configured',
setAdminTitle: 'Set as admin',
removeAdminTitle: 'Remove admin',
adminBadge: 'Admin',
configureAdmins: 'Manage Admins',
},
},
plugins: {
title: 'ส่วนขยาย',
-20
View File
@@ -450,26 +450,6 @@ const viVN = {
userMessage: 'Người dùng',
botMessage: 'Trợ lý',
},
admins: {
title: 'Admins',
description:
"Launchers (person/group IDs) that have admin privilege for this bot's commands",
addAdmin: 'Add Admin',
launcherType: 'Type',
launcherId: 'ID',
typePerson: 'Person',
typeGroup: 'Group',
placeholderId: 'User or group ID',
addSuccess: 'Admin added',
addError: 'Failed to add admin: ',
deleteSuccess: 'Admin removed',
deleteError: 'Failed to remove admin: ',
noAdmins: 'No admins configured',
setAdminTitle: 'Set as admin',
removeAdminTitle: 'Remove admin',
adminBadge: 'Admin',
configureAdmins: 'Manage Admins',
},
},
plugins: {
title: 'Tiện ích mở rộng',
-19
View File
@@ -426,25 +426,6 @@ const zhHant = {
userMessage: '使用者',
botMessage: '助手',
},
admins: {
title: '管理員',
description: '擁有此機器人指令管理員權限的會話(使用者/群組 ID)',
addAdmin: '新增管理員',
launcherType: '類型',
launcherId: 'ID',
typePerson: '私聊',
typeGroup: '群組',
placeholderId: '使用者或群組 ID',
addSuccess: '新增成功',
addError: '新增失敗:',
deleteSuccess: '已移除',
deleteError: '移除失敗:',
noAdmins: '尚無管理員',
setAdminTitle: '設為管理員',
removeAdminTitle: '移除管理員權限',
adminBadge: '管理員',
configureAdmins: '設定管理員',
},
},
plugins: {
title: '外掛擴展',