-
[OPIK-5885] [BE][FE] feat: add agent sandbox disconnect from UI (#6238)
发布于
2026-04-14 12:48:24 +00:00 - [OPIK-5885] [BE][FE] feat: add agent sandbox disconnect from UI
- Add DELETE /v1/private/local-runners/{runnerId} endpoint (idempotent)
- Implement disconnectRunner in RunnerService: deletes heartbeat, marks
disconnected_at, fails orphaned jobs/bridge commands, clears Redis sets - Inject RequestContext into RunnerServiceImpl to avoid cascading
workspaceId/userName through the call stack - Add useDisconnectRunnerMutation hook that invalidates connection-status
on success - Add Disconnect button (Unplug icon) to Agent Sandbox header toolbar,
visible only when agent is connected
Implements OPIK-5885: Agent Sandbox and Ollie should let you disconnect
- address PR review comments on disconnect runner
- fix: cleanupOrphanedRunner now always runs even when runner hash is
empty, so orphaned jobs and bridge commands are never silently skipped - refactor: extract cleanupOrphanedRunner helper shared by
disconnectRunner and evictExistingRunner - fix: remove stale 404 ApiResponse from disconnectRunner (no-op
behaviour means 404 is never returned) - feat: gate Disconnect button behind canConfigureWorkspaceSettings
permission so only workspace admins can disconnect agents
-
fix(test): pass RequestContext provider to RunnerServiceImpl in unit tests
-
fix(typecheck): destructure permissions correctly from usePermissions
-
fix(test): wrap AgentRunnerContent tests with PermissionsProvider
下载附件