feat(web): surface Box disabled/unavailable state across consumers

When Box is disabled in config (``box.enabled = false``) or fails to
connect, every dependent UI surface now degrades visibly:

- ``useBoxStatus`` hook: shared, polled 30s, exposes ``available``,
  ``disabled`` (config-off) and a single ``hint`` key so callers don't
  have to re-derive the three states
- ``BoxUnavailableNotice`` reusable Alert banner driven by that hint
- Dashboard SystemStatusCards: three-state dot + label
  (connected / disabled-gray / disconnected-red); disabled state shows
  the ``boxDisabled`` hint, failed state continues to show the connector
  error. Plugin block kept untouched
- Skills page (create view) and SkillDetailContent (edit view):
  Save button disabled and banner inserted above the form when Box is
  unavailable — matches the backend gate added in the previous commit
- PipelineExtension skill section: ``enable_all_skills`` switch, Add
  Skill button and Remove buttons all gate on Box availability;
  banner inline under the section header
- PipelineFormComponent: banner above the ``local-agent`` stage card
  when Box is unavailable, since that stage carries the sandbox-bound
  ``box-session-id-template`` field
- Box status payload type (``ApiRespBoxStatus.enabled``) and 8 locale
  files updated with ``boxDisabled`` / ``boxUnavailable`` /
  ``boxRequiredHint`` strings

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Junyan Qin
2026-05-20 17:18:44 +08:00
parent ec2d21fe63
commit 446099ecda
16 changed files with 285 additions and 42 deletions
+6
View File
@@ -1303,6 +1303,12 @@ const enUS = {
disabled: 'Disabled',
statusDetail: 'Status',
pluginDisabled: 'Plugin system is disabled',
boxDisabled:
'Box sandbox is disabled in config — sandbox tools, skill add/edit, and stdio MCP are unavailable',
boxUnavailable:
'Box sandbox is unavailable — sandbox tools, skill add/edit, and stdio MCP are unavailable',
boxRequiredHint:
'This feature requires the Box runtime. Enable it in config (box.enabled = true) and ensure the runtime is healthy.',
boxBackend: 'Backend',
boxProfile: 'Profile',
boxSandboxes: 'Sandboxes',
+6
View File
@@ -1336,6 +1336,12 @@ const esES = {
disabled: 'Desactivado',
statusDetail: 'Estado',
pluginDisabled: 'El sistema de plugins está desactivado',
boxDisabled:
'El sandbox de Box está desactivado en la configuración — herramientas de sandbox, alta/edición de skills y MCP stdio no están disponibles',
boxUnavailable:
'El sandbox de Box no está disponible — herramientas de sandbox, alta/edición de skills y MCP stdio no están disponibles',
boxRequiredHint:
'Esta función requiere el runtime de Box. Actívelo en la configuración (box.enabled = true) y asegúrese de que el runtime está conectado.',
boxBackend: 'Backend',
boxProfile: 'Perfil',
boxSandboxes: 'Sandboxes',
+6
View File
@@ -1308,6 +1308,12 @@ const jaJP = {
disabled: '無効',
statusDetail: 'ステータス',
pluginDisabled: 'プラグインシステムが無効です',
boxDisabled:
'Box サンドボックスは設定で無効化されています — サンドボックスツール / スキルの追加・編集 / stdio MCP は利用できません',
boxUnavailable:
'Box サンドボックスは利用できません — サンドボックスツール / スキルの追加・編集 / stdio MCP は利用できません',
boxRequiredHint:
'この機能には Box ランタイムが必要です。設定で有効化(box.enabled = true)し、ランタイムが正常に接続できることを確認してください。',
boxBackend: 'バックエンド',
boxProfile: 'プロファイル',
boxSandboxes: 'サンドボックス',
+6
View File
@@ -1311,6 +1311,12 @@ const ruRU = {
disabled: 'Отключено',
statusDetail: 'Статус',
pluginDisabled: 'Система плагинов отключена',
boxDisabled:
'Песочница Box отключена в конфигурации — инструменты песочницы, добавление/редактирование навыков и stdio MCP недоступны',
boxUnavailable:
'Песочница Box недоступна — инструменты песочницы, добавление/редактирование навыков и stdio MCP недоступны',
boxRequiredHint:
'Для этой функции требуется среда Box. Включите её в конфигурации (box.enabled = true) и убедитесь, что соединение работает.',
boxBackend: 'Бэкенд',
boxProfile: 'Профиль',
boxSandboxes: 'Песочницы',
+6
View File
@@ -1282,6 +1282,12 @@ const thTH = {
disabled: 'ปิดใช้งาน',
statusDetail: 'สถานะ',
pluginDisabled: 'ระบบปลั๊กอินถูกปิดใช้งาน',
boxDisabled:
'Sandbox Box ถูกปิดใช้งานในการตั้งค่า — เครื่องมือ sandbox, การเพิ่ม/แก้ไข skill และ stdio MCP ใช้งานไม่ได้',
boxUnavailable:
'Sandbox Box ไม่พร้อมใช้งาน — เครื่องมือ sandbox, การเพิ่ม/แก้ไข skill และ stdio MCP ใช้งานไม่ได้',
boxRequiredHint:
'ฟีเจอร์นี้ต้องใช้ Box runtime กรุณาเปิดใช้งานในการตั้งค่า (box.enabled = true) และตรวจสอบว่าการเชื่อมต่อปกติ',
boxBackend: 'แบ็กเอนด์',
boxProfile: 'โปรไฟล์',
boxSandboxes: 'แซนด์บ็อกซ์',
+6
View File
@@ -1305,6 +1305,12 @@ const viVN = {
disabled: 'Đã tắt',
statusDetail: 'Trạng thái',
pluginDisabled: 'Hệ thống plugin đã tắt',
boxDisabled:
'Sandbox Box đã tắt trong cấu hình — công cụ sandbox, thêm/chỉnh sửa skill và stdio MCP đều không khả dụng',
boxUnavailable:
'Sandbox Box không khả dụng — công cụ sandbox, thêm/chỉnh sửa skill và stdio MCP đều không khả dụng',
boxRequiredHint:
'Tính năng này cần Box runtime. Hãy bật trong cấu hình (box.enabled = true) và đảm bảo runtime đang hoạt động.',
boxBackend: 'Backend',
boxProfile: 'Hồ sơ',
boxSandboxes: 'Sandbox',
+6
View File
@@ -1249,6 +1249,12 @@ const zhHans = {
disabled: '已禁用',
statusDetail: '状态',
pluginDisabled: '插件系统已禁用',
boxDisabled:
'Box 沙箱已在配置中禁用——沙箱工具、技能添加/编辑与 stdio MCP 均不可用',
boxUnavailable:
'Box 沙箱不可用——沙箱工具、技能添加/编辑与 stdio MCP 均不可用',
boxRequiredHint:
'此功能依赖 Box 运行时。请在配置中启用(box.enabled = true)并确认运行时连接正常。',
boxBackend: '后端',
boxProfile: '配置',
boxSandboxes: '沙箱数',
+6
View File
@@ -1248,6 +1248,12 @@ const zhHant = {
disabled: '已停用',
statusDetail: '狀態',
pluginDisabled: '外掛系統已停用',
boxDisabled:
'Box 沙箱已在設定中停用——沙箱工具、技能新增/編輯與 stdio MCP 均無法使用',
boxUnavailable:
'Box 沙箱無法使用——沙箱工具、技能新增/編輯與 stdio MCP 均無法使用',
boxRequiredHint:
'此功能需要 Box 執行時。請在設定中啟用(box.enabled = true)並確認執行時連線正常。',
boxBackend: '後端',
boxProfile: '設定檔',
boxSandboxes: '沙箱數',