(container: HTMLElement, workspaceId: string)
| 48 | } |
| 49 | |
| 50 | function getSubagentConnector(container: HTMLElement, workspaceId: string): HTMLElement | null { |
| 51 | // Find all connector elements and match by shared parent with the target workspace row. |
| 52 | // This avoids fragile sibling/parent traversal assumptions. |
| 53 | const connectors = container.querySelectorAll('[data-testid="subagent-connector"]'); |
| 54 | for (const connector of connectors) { |
| 55 | const wrapper = connector.parentElement; |
| 56 | if (!wrapper) continue; |
| 57 | if (wrapper.querySelector(`[data-workspace-id="${workspaceId}"]`)) { |
| 58 | return connector as HTMLElement; |
| 59 | } |
| 60 | } |
| 61 | return null; |
| 62 | } |
| 63 | |
| 64 | async function findWorkspaceActionsButton(params: { |
| 65 | container: HTMLElement; |
no outgoing calls
no test coverage detected