From 45be62276a60e31ca0e7e5316dcaa5e8dd204826 Mon Sep 17 00:00:00 2001 From: lyingbug Date: Wed, 26 Aug 2026 18:19:42 +0800 Subject: [PATCH] ui(sandbox): explain who still holds a config (#2816) * ui(sandbox): explain who still holds a config instead of occupancy metrics The occupancy drawer was a three-stat dashboard plus truncated session IDs, which did not say why a config could not be deleted. Show a plain summary, named sessions, and bound agents; slim the card menu to edit / who-is-using / delete. * ui(sandbox): tighten occupancy chrome and rename running instances Drop TDesign's extra divider (it stacked a second line), compact the card menu and drawer, and replace the colloquial copy with a single sentence plus the session list. * ui(sandbox): match occupancy UI to settings chrome Drop the homemade menu divider and occupancy-only drawer styling that stacked extra hairlines. Use the same dropdown as other setting cards, and label occupying chats as sessions so the drawer is readable. --- frontend/src/i18n/locales/en-US.ts | 9 +- frontend/src/i18n/locales/ko-KR.ts | 9 +- frontend/src/i18n/locales/ru-RU.ts | 9 +- frontend/src/i18n/locales/zh-CN.ts | 9 +- .../src/views/settings/SandboxSettings.vue | 269 ++++++++++++------ 5 files changed, 205 insertions(+), 100 deletions(-) diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.ts index bf98ad97..de2b7a5a 100755 --- a/frontend/src/i18n/locales/en-US.ts +++ b/frontend/src/i18n/locales/en-US.ts @@ -1106,13 +1106,18 @@ export default { identityFieldHint: 'While this config owns sandboxes, these cannot be changed: backend type, API endpoint, API key, sandbox domain, proxy endpoint.', connectionLockedBySkills: 'This sandbox already has skills. Connection, credentials, and DNS would retarget the skill snapshot, and DNS only applies after a template rebuild. Create a new sandbox instead.', connectionLockedByInFlight: 'A skill is still installing or being removed. Connection, credentials, and DNS cannot change until that finishes.', - viewSandboxes: 'View sandbox usage', - inventoryTitle: 'Sandbox usage', + viewSandboxes: 'Running instances', + inventoryTitle: 'Running instances', inventoryDrawerDesc: 'Sandboxes this config still holds, plus the sessions and agents affected.', inventoryFailed: 'Failed to load sandbox usage', sandboxCount: 'Sandboxes', sandboxCountUnknown: 'Unknown (backend unreachable)', inventoryUnverifiableHint: 'The backend is unreachable, so the sandbox count is unknown — that is not the same as none.', + inventorySessions: 'Sessions', + inventorySessionKind: 'Conversation', + inventoryEmpty: 'No occupying sessions', + inventoryAgentsTitle: 'Linked agents', + inventoryUntitledSession: 'Untitled session', sandboxesStillLive: 'This config still owns {count} running or paused sandbox(es), so identity fields cannot be changed yet.', blockedHint: 'End or delete those sessions (deleting a session destroys its sandbox), or create a second config and point the agents at it.', unverifiableBlocked: 'The backend cannot be reached to verify whether sandboxes remain, so the stored credentials will not be overwritten.', diff --git a/frontend/src/i18n/locales/ko-KR.ts b/frontend/src/i18n/locales/ko-KR.ts index 341c3611..46e24219 100755 --- a/frontend/src/i18n/locales/ko-KR.ts +++ b/frontend/src/i18n/locales/ko-KR.ts @@ -4959,13 +4959,18 @@ export default { identityFieldHint: 'While this config owns sandboxes, these cannot be changed: backend type, API endpoint, API key, sandbox domain, proxy endpoint.', connectionLockedBySkills: '이 샌드박스에는 이미 Skill이 있습니다. 연결, 자격 증명, DNS를 바꾸면 스킬 스냅샷의 환경이 달라지고, DNS는 템플릿을 재구축해야 적용됩니다. 새 샌드박스를 만드세요.', connectionLockedByInFlight: 'Skill을 설치하거나 제거하는 중입니다. 끝날 때까지 연결, 자격 증명, DNS를 바꿀 수 없습니다.', - viewSandboxes: 'View sandbox usage', - inventoryTitle: 'Sandbox usage', + viewSandboxes: '실행 인스턴스', + inventoryTitle: '실행 인스턴스', inventoryDrawerDesc: '이 설정이 아직 점유한 샌드박스와 영향을 받는 세션·에이전트입니다.', inventoryFailed: 'Failed to load sandbox usage', sandboxCount: 'Sandboxes', sandboxCountUnknown: 'Unknown (backend unreachable)', inventoryUnverifiableHint: 'The backend is unreachable, so the sandbox count is unknown — that is not the same as none.', + inventorySessions: '세션', + inventorySessionKind: '대화', + inventoryEmpty: '점유 중인 세션이 없습니다', + inventoryAgentsTitle: '연결된 에이전트', + inventoryUntitledSession: '제목 없는 세션', sandboxesStillLive: 'This config still owns {count} running or paused sandbox(es), so identity fields cannot be changed yet.', blockedHint: 'End or delete those sessions (deleting a session destroys its sandbox), or create a second config and point the agents at it.', unverifiableBlocked: 'The backend cannot be reached to verify whether sandboxes remain, so the stored credentials will not be overwritten.', diff --git a/frontend/src/i18n/locales/ru-RU.ts b/frontend/src/i18n/locales/ru-RU.ts index f18713ec..4a154f33 100755 --- a/frontend/src/i18n/locales/ru-RU.ts +++ b/frontend/src/i18n/locales/ru-RU.ts @@ -4959,13 +4959,18 @@ export default { identityFieldHint: 'While this config owns sandboxes, these cannot be changed: backend type, API endpoint, API key, sandbox domain, proxy endpoint.', connectionLockedBySkills: 'В этой песочнице уже установлены навыки. Смена подключения, учётных данных или DNS меняет среду снимка, а DNS применяется только после пересборки шаблона. Создайте новую песочницу.', connectionLockedByInFlight: 'Навык ещё устанавливается или удаляется. Подключение, учётные данные и DNS нельзя менять, пока это не закончится.', - viewSandboxes: 'View sandbox usage', - inventoryTitle: 'Sandbox usage', + viewSandboxes: 'Запущенные экземпляры', + inventoryTitle: 'Запущенные экземпляры', inventoryDrawerDesc: 'Песочницы, которые всё ещё занимает эта конфигурация, а также затронутые сессии и агенты.', inventoryFailed: 'Failed to load sandbox usage', sandboxCount: 'Sandboxes', sandboxCountUnknown: 'Unknown (backend unreachable)', inventoryUnverifiableHint: 'The backend is unreachable, so the sandbox count is unknown — that is not the same as none.', + inventorySessions: 'Сессии', + inventorySessionKind: 'Чат', + inventoryEmpty: 'Нет занимающих сессий', + inventoryAgentsTitle: 'Связанные агенты', + inventoryUntitledSession: 'Сессия без названия', sandboxesStillLive: 'This config still owns {count} running or paused sandbox(es), so identity fields cannot be changed yet.', blockedHint: 'End or delete those sessions (deleting a session destroys its sandbox), or create a second config and point the agents at it.', unverifiableBlocked: 'The backend cannot be reached to verify whether sandboxes remain, so the stored credentials will not be overwritten.', diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.ts index f578e264..6dd82afd 100755 --- a/frontend/src/i18n/locales/zh-CN.ts +++ b/frontend/src/i18n/locales/zh-CN.ts @@ -4961,13 +4961,18 @@ export default { identityFieldHint: '该配置下有沙箱运行时,以下项无法修改:后端类型、API 端点、API Key、沙箱域名、Proxy 端点。', connectionLockedBySkills: '该沙箱已安装 Skill。连接地址、凭据和 DNS 会改变技能快照所属环境,且 DNS 需重建模板才能生效;请新建一份沙箱。', connectionLockedByInFlight: '该沙箱正在安装或移除 Skill,完成前不能更换连接、凭据或 DNS。', - viewSandboxes: '查看沙箱占用', - inventoryTitle: '沙箱占用', + viewSandboxes: '运行实例', + inventoryTitle: '运行实例', inventoryDrawerDesc: '该配置当前占用的沙箱,以及受影响的会话与智能体。', inventoryFailed: '获取沙箱占用失败', sandboxCount: '沙箱数量', sandboxCountUnknown: '未知(无法连接该后端)', inventoryUnverifiableHint: '无法连接该后端,因此沙箱数量未知——这不代表没有沙箱。', + inventorySessions: '会话', + inventorySessionKind: '对话', + inventoryEmpty: '暂无占用的会话', + inventoryAgentsTitle: '关联智能体', + inventoryUntitledSession: '未命名会话', sandboxesStillLive: '该配置仍有 {count} 个运行中或已暂停的沙箱,暂时无法修改身份字段。', blockedHint: '可结束或删除这些会话(删除会话会销毁其沙箱),或新建一份配置并把智能体指过去。', unverifiableBlocked: '无法连接该后端核实是否仍有沙箱,因此不能覆盖现有凭据。', diff --git a/frontend/src/views/settings/SandboxSettings.vue b/frontend/src/views/settings/SandboxSettings.vue index d25977b2..759e3d22 100644 --- a/frontend/src/views/settings/SandboxSettings.vue +++ b/frontend/src/views/settings/SandboxSettings.vue @@ -78,8 +78,13 @@ {{ $t('settings.sandbox.legacyConfig') }}
- + @@ -144,63 +149,71 @@ @saved="load" @skills-changed="onSkillsChanged" /> - + -
- + - +
+
+ +
-