@ai-development-environment/server 0.0.130 → 0.0.131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/standalone/.next/BUILD_ID +1 -1
- package/standalone/.next/build-manifest.json +3 -3
- package/standalone/.next/prerender-manifest.json +3 -3
- package/standalone/.next/server/app/[locale]/(auth)/register/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(auth)/register/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(auth)/sign-in/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(auth)/sign-in/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/costs/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/costs/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/drafts/new/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/drafts/new/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/drafts/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/drafts/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/plans/[runId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/plans/[runId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/plans/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/plans/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/sessions/[runId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/sessions/[runId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/sessions/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/sessions/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/[skillId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/groups/[groupId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/groups/[groupId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/groups/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/groups/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/sync/[runId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/sync/[runId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/usage/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/ai/usage/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/action-center/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/action-center/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/agents/[id]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/agents/[id]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/agents/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/agents/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/apps/[appId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/apps/[appId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/apps/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/apps/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/[buildId]/coverage/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/[buildId]/coverage/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/[buildId]/output/route.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/[buildId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/[buildId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/configurations/[configurationId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/configurations/[configurationId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/changes/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/changes/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/codebases/[codebaseId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/codebases/[codebaseId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/codebases/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/codebases/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/codebases/repositories/[repositoryId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/codebases/repositories/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/[commandId]/edit/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/[commandId]/edit/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/new/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/new/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/runs/[runId]/output/route.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/runs/[runId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/runs/[runId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/jobs/[jobId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/jobs/[jobId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/notifications/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/notifications/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/[workflowId]/edit/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/[workflowId]/edit/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/[workflowId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/[workflowId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/new/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/new/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/runs/[runId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/runs/[runId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/worktrees/[worktreeId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/worktrees/[worktreeId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/worktrees/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/worktrees/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/analytics-events/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/analytics-events/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/console-logs/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/console-logs/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/crashes/[crashId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/crashes/[crashId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/crashes/dsyms/[dsymId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/crashes/dsyms/[dsymId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/crashes/dsyms/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/crashes/dsyms/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/crashes/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/crashes/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/push-notifications/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/push-notifications/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/[endpointId]/mocks/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/[endpointId]/mocks/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/[endpointId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/[endpointId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/breakpoints/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/breakpoints/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/history/[requestId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/history/[requestId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/history/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/history/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/new/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/new/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/storage/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/storage/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/unified-events/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/debugging/unified-events/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/github/actions/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/github/actions/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/github/actions-cache/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/github/actions-cache/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/github/cache/entries/[id]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/github/cache/entries/[id]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/github/cache/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/github/cache/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/github/comments/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/github/comments/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/github/pull-requests/[owner]/[repository]/[number]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/github/pull-requests/[owner]/[repository]/[number]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/github/pull-requests/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/github/pull-requests/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/github/webhooks/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/github/webhooks/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/cache/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/cache/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/comments/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/comments/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/merge-requests/[projectId]/[iid]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/merge-requests/[projectId]/[iid]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/merge-requests/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/merge-requests/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/pipelines/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/pipelines/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/webhooks/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/webhooks/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/jira/cache/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/jira/cache/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/jira/cache/tickets/[issueKey]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/jira/cache/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/jira/tickets/[issueKey]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/jira/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/jira/tickets/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/jira/tickets/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/jira/webhooks/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/jira/webhooks/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/api-keys/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/api-keys/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/build-data/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/build-data/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/connected-applications/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/connected-applications/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/credentials/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/credentials/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/devices/[id]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/devices/[id]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/devices/enroll/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/devices/enroll/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/devices/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/devices/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/polling/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/polling/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/prepare/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/prepare/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/provisioning-profiles/[profileId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/provisioning-profiles/[profileId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/provisioning-profiles/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/provisioning-profiles/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/settings/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/settings/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/status/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/status/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/tailscale/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/tailscale/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/tools/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/tools/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/users/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(dashboard)/system/users/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(mcp)/mcp/consent/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(mcp)/mcp/consent/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/(mcp)/mcp/sign-in/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/(mcp)/mcp/sign-in/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/_global-error.html +1 -1
- package/standalone/.next/server/app/_global-error.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.html +1 -1
- package/standalone/.next/server/app/_not-found.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/complete/route.js +1 -1
- package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/complete/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/download/route.js +1 -1
- package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/download/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/route.js +1 -1
- package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/upload/route.js +1 -1
- package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/upload/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/agent/dsyms/[dsymId]/dwarf/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/agent/run-attachments/[attachmentId]/route.js +1 -1
- package/standalone/.next/server/app/api/agent/run-attachments/[attachmentId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/build-artifact-uploads/[uploadId]/route.js +1 -1
- package/standalone/.next/server/app/api/build-artifact-uploads/[uploadId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/codebases/by-path/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/codebases/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/crash-files/dsyms/[dsymId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/crash-files/reports/[crashId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/dsyms/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/dsyms/uploads/[uploadId]/complete/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/dsyms/uploads/[uploadId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/dsyms/uploads/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/graphql/route.js +1 -1
- package/standalone/.next/server/app/api/graphql/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/ios/apns-devices/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/ios/devices/export.tsv/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/ios/enrollment/start/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/ios/notification-devices/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/public/builds/[buildId]/artifacts/[artifactId]/manifest.plist/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/public/builds/[buildId]/artifacts/[artifactId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/public/crashes/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/public/github/webhook/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/public/gitlab/webhook/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/public/ios/enrollment-profile/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/public/ios/profile-response/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/public/jira/webhook/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/public/sse/[token]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/run-attachments/[attachmentId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/run-attachments/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/sse/history/export/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/telemetry/analytics-events/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/telemetry/console-logs/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/telemetry/export/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/tools/call/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/tools/catalog/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/worktrees/[worktreeId]/diff-image/route.js.nft.json +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0hjegpvurx-qp._.js → [root-of-the-server]__01yq1kxt3tcs5._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0jt869r42yzkz._.js → [root-of-the-server]__03ybdczxg_r56._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0-w9hau1wg6x5._.js → [root-of-the-server]__08liq7hjy8jkd._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0i9dbzy7vmjvf._.js → [root-of-the-server]__0axkrpt5jvo9a._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__06m2gjiyrca2o._.js → [root-of-the-server]__0cf7tu_v4i5j5._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0_ksvmf449oku._.js → [root-of-the-server]__0d31pdi_y1ygv._.js} +2 -2
- package/standalone/.next/server/chunks/{[root-of-the-server]__06s9z4voulm-7._.js → [root-of-the-server]__0d4btvbueeds8._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__07uncdie_3fqz._.js → [root-of-the-server]__0h374zchua6u5._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0s5kgn705_xrt._.js → [root-of-the-server]__0jbflrhpa5dzs._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__00aamhqamrwhq._.js → [root-of-the-server]__0ksbjlakayjeg._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__09-xatwq-ud3p._.js → [root-of-the-server]__0l1cpvoby8l9z._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__1f-ybvd_fhf-2._.js → [root-of-the-server]__0p10jubmns5pq._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0tnhbz9uikd7p._.js → [root-of-the-server]__0vneehawylqdb._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0xgsj7g8ww_t6._.js → [root-of-the-server]__0vnunsj1tqxhs._.js} +2 -2
- package/standalone/.next/server/chunks/{[root-of-the-server]__0e39hkkur4tdq._.js → [root-of-the-server]__0z_4chwbw4ivu._.js} +2 -2
- package/standalone/.next/server/chunks/{[root-of-the-server]__0a4uce2kn3f18._.js → [root-of-the-server]__1-hzfko3529pb._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0z1y-zgh7bupn._.js → [root-of-the-server]__10qxafo8vhitg._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0f8-5blroj8l4._.js → [root-of-the-server]__16fb5l-iz58fr._.js} +2 -2
- package/standalone/.next/server/chunks/{[root-of-the-server]__0vpjsl35ie7o9._.js → [root-of-the-server]__1bgml5ria00_k._.js} +1 -1
- package/standalone/.next/server/chunks/[root-of-the-server]__1c62psuih4_k9._.js +3 -0
- package/standalone/.next/server/chunks/{[root-of-the-server]__0569g2n-iqtqj._.js → [root-of-the-server]__1coqpqjqxmhrb._.js} +1 -1
- package/standalone/.next/server/chunks/[root-of-the-server]__1fsgcggwi0snx._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__1fyf_moef6p8l._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__1hj1mebpn4mih._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__1o9xlhi4bgklz._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__1p089st69lou0._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__1phofmej0zr1s._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__1qtcmyz3cocuh._.js +3 -0
- package/standalone/.next/server/chunks/{[root-of-the-server]__0sr3mpfw4r8gc._.js → [root-of-the-server]__1ri8d3qvfyvec._.js} +2 -2
- package/standalone/.next/server/chunks/{[root-of-the-server]__03f5b6bkl6aix._.js → [root-of-the-server]__1rj3o65kiko3b._.js} +2 -2
- package/standalone/.next/server/chunks/[root-of-the-server]__1sor2nihj-gu9._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__1tdosp26vh-cm._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__1ts9z7hmp0x0v._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__1w0t_x3ytpo4c._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__1z7ya5ehncn-c._.js +3 -0
- package/standalone/.next/server/chunks/_02mipoz3yx326._.js +108 -14
- package/standalone/.next/server/chunks/_05-0fg3-6nxfz._.js +2 -2
- package/standalone/.next/server/chunks/_09yoi7vle8-p8._.js +2 -2
- package/standalone/.next/server/chunks/_0e09pfc4ngmjt._.js +2 -2
- package/standalone/.next/server/chunks/_0s9ju0jh3bjvv._.js +2 -2
- package/standalone/.next/server/chunks/_0wf0plgfred1s._.js +108 -14
- package/standalone/.next/server/chunks/_0yt0ag8ogzkpo._.js +2 -2
- package/standalone/.next/server/chunks/_159jskugflhe1._.js +3 -3
- package/standalone/.next/server/chunks/_16mi1fdjv-ttu._.js +2 -2
- package/standalone/.next/server/chunks/_16tl-jjvokalw._.js +2 -2
- package/standalone/.next/server/chunks/_1_2y0u7fotnj9._.js +2 -2
- package/standalone/.next/server/chunks/{_1tjxax0udpzpp._.js → _1_wh1ec-2o48m._.js} +96 -2
- package/standalone/.next/server/chunks/_1dvaeoxy6mi-5._.js +3 -3
- package/standalone/.next/server/chunks/_1k1f9a5th4_mf._.js +2 -2
- package/standalone/.next/server/chunks/_1uk_t2708atwy._.js +2 -2
- package/standalone/.next/server/chunks/_1wycw9ka35xs9._.js +3 -3
- package/standalone/.next/server/chunks/_1xmq6bnjsnu8v._.js +2 -2
- package/standalone/.next/server/chunks/src_06620x_9xof19._.js +1 -1
- package/standalone/.next/server/chunks/src_services_0shipcub2yhy6._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_003c9h921os5x._.js +11 -2
- package/standalone/.next/server/chunks/ssr/_09frr_x9sj064._.js +22 -20
- package/standalone/.next/server/chunks/ssr/_0wpoapzcyfgyq._.js +22 -20
- package/standalone/.next/server/chunks/ssr/_0x-yk4-j0jzr_._.js +22 -20
- package/standalone/.next/server/chunks/ssr/{_0vju6f-hf9vvn._.js → _1ar2yl573rmcg._.js} +1 -1
- package/standalone/.next/server/chunks/ssr/_1c2l10eipkbhb._.js +11 -2
- package/standalone/.next/server/chunks/ssr/_1j4th2umomnn-._.js +11 -2
- package/standalone/.next/server/chunks/ssr/_1jjtult-x-57z._.js +11 -2
- package/standalone/.next/server/chunks/ssr/_1nq6rrkcdihtp._.js +3 -0
- package/standalone/.next/server/chunks/ssr/_1sxiiw_mgqyi0._.js +11 -2
- package/standalone/.next/server/chunks/ssr/_1ujnuzin3idis._.js +3 -0
- package/standalone/.next/server/chunks/ssr/messages_de_json_[json]_cjs_1uig1ud36h5oz._.js +1 -1
- package/standalone/.next/server/chunks/ssr/messages_en_json_[json]_cjs_206072-e4clp3._.js +1 -1
- package/standalone/.next/server/chunks/ssr/messages_es_json_[json]_cjs_082yukd_h99n8._.js +1 -1
- package/standalone/.next/server/chunks/ssr/messages_fr_json_[json]_cjs_0j6-w0ix_w_ac._.js +1 -1
- package/standalone/.next/server/chunks/ssr/{node_modules_124_-_72356a1._.js → node_modules_1gzler2prpvuu._.js} +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_agents_1h2c2ip6jqvl0._.js +5 -0
- package/standalone/.next/server/chunks/ssr/src_components_agents_1tuxa3sue04gs._.js +5 -0
- package/standalone/.next/server/chunks/ssr/src_components_agents_agent-detail_tsx_0lfa4uiys5oxb._.js +22 -22
- package/standalone/.next/server/chunks/ssr/src_components_agents_agents-list_tsx_0hz7m22l4--2j._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_lib_control-plane-client_ts_1ovfa4nqxphuc._.js +1 -1
- package/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/standalone/.next/server/pages/404.html +1 -1
- package/standalone/.next/server/pages/500.html +1 -1
- package/standalone/.next/server/preview-props.json +3 -3
- package/standalone/.next/server/server-reference-manifest.js +1 -1
- package/standalone/.next/server/server-reference-manifest.json +1 -1
- package/standalone/.next/static/chunks/{0yyibsmc1x0fk.js → 03ul-f7fkx6-m.js} +18 -9
- package/standalone/.next/static/chunks/06i8z2n00eta3.js +173 -0
- package/standalone/.next/static/chunks/{2e-ygqo0s_u13.js → 0nd5w69eookzq.js} +18 -9
- package/standalone/.next/static/chunks/1v3l2hnge_w44.js +1 -0
- package/standalone/.next/static/chunks/1vohvf2mi4wbp.js +46 -0
- package/standalone/.next/static/chunks/{39xqauhnlx-3n.js → 26gh6vsm1kt0w.js} +23 -14
- package/standalone/.next/static/chunks/2h15blliw-aid.js +54 -0
- package/standalone/.next/static/chunks/2kblq31r4mka3.js +7 -0
- package/standalone/.next/static/chunks/2m96kfrw0imb4.js +24 -0
- package/standalone/.next/static/chunks/{1pipry6ng09bb.css → 2n--68blak0tt.css} +1 -1
- package/standalone/.next/static/chunks/{13623d3jab6vm.js → 2y99aa6snk535.js} +17 -8
- package/standalone/.next/server/chunks/[root-of-the-server]__11adibsl0kbap._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1_e1dwxjxs7t-._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1ari69u0znx5n._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1j4iu2f41p-yo._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1krmyi73tn6ow._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1nyz09_tss7yf._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1o4t76d95ijtz._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1okr1gcw9fgal._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1q84qtcvzi1g9._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1r1o47_vtjr_-._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1sok4i2j1u-1v._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__20bjknlxmt1ci._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__211wb05m63g37._.js +0 -3
- package/standalone/.next/server/chunks/ssr/_0ens5u1l-_vah._.js +0 -3
- package/standalone/.next/server/chunks/ssr/_17xtkxgta8j84._.js +0 -3
- package/standalone/.next/server/chunks/ssr/src_components_agents_0gz1a35-7zct2._.js +0 -3
- package/standalone/.next/static/chunks/0iuc4fye_mkuc.js +0 -52
- package/standalone/.next/static/chunks/1isxygn8ix7sp.js +0 -171
- package/standalone/.next/static/chunks/1qqmiyzd071fl.js +0 -1
- package/standalone/.next/static/chunks/1xrrl3ex_ybkf.js +0 -46
- package/standalone/.next/static/chunks/3j25esleqxt4a.js +0 -15
- package/standalone/.next/static/chunks/3ueflsd9w92bi.js +0 -5
- /package/standalone/.next/static/{RUNUd01nvm8SEzNBz3axk → 1I2pKdbSCeykSYjiSoyzQ}/_buildManifest.js +0 -0
- /package/standalone/.next/static/{RUNUd01nvm8SEzNBz3axk → 1I2pKdbSCeykSYjiSoyzQ}/_clientMiddlewareManifest.js +0 -0
- /package/standalone/.next/static/{RUNUd01nvm8SEzNBz3axk → 1I2pKdbSCeykSYjiSoyzQ}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,939050,868401,e=>{var t=e.i(456420);let s={name:"move-right",size:24,node:[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]]};s.node;let r=(0,t.f)(s);e.s(["f",0,r],939050);let a={name:"tags",size:24,node:[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]]};a.node;let i=(0,t.f)(a);e.s(["f",0,i],868401)},448295,e=>{var t=e.i(843476),s=e.i(630338),r=e.i(723408),a=e.i(481217),i=e.i(688194),n=e.i(93384),l=e.i(741120),o=e.i(456420);let d={name:"test-tube-diagonal",size:24,node:[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]],aliases:["test-tube-2"]};d.node;let c=(0,o.f)(d);var u=e.i(986206),h=e.i(446513),p=e.i(861745),m=e.i(948148),x=e.i(271645),g=e.i(929592),f=e.i(487486),b=e.i(519455),j=e.i(515288),v=e.i(257428),w=e.i(776639),k=e.i(793479),y=e.i(110204),I=e.i(337822),S=e.i(967489),N=e.i(987968),C=e.i(677572),E=e.i(456430),R=e.i(624687),A=e.i(520133),T=e.i(462777),D=e.i(637611),W=e.i(360583),$=e.i(975157),P=e.i(54810),B=e.i(687862),O=e.i(52253);let L=`
|
|
2
|
+
id type
|
|
3
|
+
configurations {
|
|
4
|
+
id name iconKey scheme buildConfiguration defaultAction advancedSettings autoExport exportSettings createdAt updatedAt
|
|
5
|
+
source { id kind relativePath }
|
|
6
|
+
observation { id scopeKey status schemes configurations testPlans error stale headSha xcodeVersion lastParseAttemptAt lastParsedAt }
|
|
7
|
+
}
|
|
8
|
+
allowedScripts {
|
|
9
|
+
position
|
|
10
|
+
script { id name iconKey preBuildScript postBuildScript enabledByDefault timeoutSeconds failureBehavior }
|
|
11
|
+
}
|
|
12
|
+
`,q=`
|
|
13
|
+
id scopeKey status schemes configurations testPlans error stale headSha xcodeVersion lastParseAttemptAt lastParsedAt
|
|
14
|
+
`,U=["BUILD","TEST","ANALYZE","ARCHIVE","BUILD_FOR_TESTING","TEST_WITHOUT_BUILDING"];function _({codebaseId:e,worktreeId:n,open:o,onOpenChange:d,onStarted:c,destinationCache:I,coverageMode:A=!1}){let{settings:M,error:K}=(0,s.f)(),[F,V]=(0,x.useState)(null),z=(0,m.f)("builds"),H=(0,p.X)(),J=(0,x.useId)(),[G,Y]=(0,x.useState)(null),[X,Q]=(0,x.useState)(null),[Z,ee]=(0,x.useState)([]),[et,es]=(0,x.useState)(!1),[er,ea]=(0,x.useState)(""),[ei,en]=(0,x.useState)(null),[el,eo]=(0,x.useState)(!1),ed=e=>"__custom__"===e.id?{customConfiguration:{sourceKind:e.source.kind,sourcePath:e.source.relativePath,scheme:e.scheme,buildConfiguration:e.buildConfiguration}}:{configurationId:e.id},[ec,eu]=(0,x.useState)("BUILD"),[eh,ep]=(0,x.useState)({}),[em,ex]=(0,x.useState)([]),[eg,ef]=(0,x.useState)(!1),[eb,ej]=(0,x.useState)("SIMULATOR"),[ev,ew]=(0,x.useState)(""),[ek,ey]=(0,x.useState)(new Set),[eI,eS]=(0,x.useState)({}),[eN,eC]=(0,x.useState)(!1),[eE,eR]=(0,x.useState)(O.A),[eA,eT]=(0,x.useState)("{}"),[eD,eW]=(0,x.useState)(!0),[e$,eP]=(0,x.useState)(!1),[eB,eO]=(0,x.useState)(!1),[eL,eq]=(0,x.useState)(null),[eU,e_]=(0,x.useState)(null),eM=(0,x.useRef)(0),eK=(0,x.useRef)("SIMULATOR"),eF=(0,x.useRef)(""),eV=(0,x.useRef)(!1),ez="__custom__"===er?ei:G?.configurations.find(e=>e.id===er),eH=el?"__custom__":er,eJ=ez?eh[ez.id]??ez.observation:null;(0,x.useEffect)(()=>{let t=!1;return(0,D.W)(`query StartBuildProject($codebaseId: ID!) {
|
|
15
|
+
iosAppProject(codebaseId: $codebaseId) { ${L} }
|
|
16
|
+
codebase(id: $codebaseId) { agent { id name hostname } }
|
|
17
|
+
}`,{codebaseId:e}).then(e=>{if(t)return;Y(e.iosAppProject),Q(e.codebase?.agent??null),ey(new Set(e.iosAppProject?.allowedScripts.filter(({script:e})=>e.enabledByDefault).map(({script:e})=>e.id)??[]));let s=e.iosAppProject?.configurations[0];!s&&e.iosAppProject&&(ea("__custom__"),eo(!0)),s&&(ea(s.id),eu(A?"TEST":s.defaultAction),eS(s.advancedSettings??{}),eT(JSON.stringify(s.advancedSettings?.buildSettingOverrides??{})),eC(!!(!A&&"ARCHIVE"===s.defaultAction&&s.autoExport)),eR({...O.A,...s.exportSettings??{}}),ey(new Set(e.iosAppProject.allowedScripts.filter(e=>e.script.enabledByDefault).map(e=>e.script.id))))}).catch(e=>eq(e instanceof Error?e.message:String(e))).finally(()=>{t||eW(!1)}),()=>{t=!0}},[e,A,n]),(0,x.useEffect)(()=>{"TEST_WITHOUT_BUILDING"!==ec||eV.current||(eV.current=!0,es(!0),(0,D.W)(`query StartBuildPriorBuilds($worktreeId: ID!) {
|
|
18
|
+
builds(first: 50, status: SUCCEEDED, worktreeId: $worktreeId) {
|
|
19
|
+
items { id action destinationType snapshot createdAt }
|
|
20
|
+
}
|
|
21
|
+
}`,{worktreeId:n}).then(e=>ee(e.builds.items)).catch(e=>{eV.current=!1,eq(e instanceof Error?e.message:String(e))}).finally(()=>es(!1)))},[ec,n]);let eG=(0,x.useMemo)(()=>Z.filter(e=>{if("BUILD_FOR_TESTING"!==e.action||e.destinationType!==eb)return!1;let t=e.snapshot.configuration,s="string"==typeof eI.testPlan?eI.testPlan:null,r=t?.advancedSettings?.testPlan;return("__custom__"===er?t?.kind==="CUSTOM"&&t.source?.kind===ei?.source.kind&&t.source?.relativePath===ei?.source.relativePath&&t.scheme===ei?.scheme&&t.buildConfiguration===ei?.buildConfiguration:t?.id===er)&&(!s||!r||s===r)}),[eI.testPlan,er,ei,eb,Z]),eY=eG.find(e=>e.id===eI.priorBuildForTestingId)?.id??eG[0]?.id??null,eX=(e,t,s)=>{let r="ARCHIVE"===t?"PHYSICAL_DEVICE":e.some(e=>"SIMULATOR"===e.type)?"SIMULATOR":"PHYSICAL_DEVICE",a=s&&e.some(e=>e.type===eK.current)?eK.current:r,i=s&&e.some(e=>e.id===eF.current&&e.type===a)?eF.current:e.find(e=>e.type===a)?.id??"";eK.current=a,eF.current=i,ex(e),ej(a),ew(i)},eQ=async(e,t)=>{let s=++eM.current;ef(!0);let r=`${n}:${JSON.stringify(ed(e))}:${t}`,a=I.get(r);a&&a.expiresAt<=Date.now()&&I.delete(r);let l=a&&a.expiresAt>Date.now()?a.destinations:(0,i.G)(t);eq(null),e_(null),eX(l,t,!1);try{let a=await (0,D.W)(`mutation InspectStartBuildDestinations($input: InspectBuildDestinationsInput!) {
|
|
22
|
+
inspectBuildDestinations(input: $input)
|
|
23
|
+
}`,{input:{worktreeId:n,...ed(e),action:t,requestId:(0,T.e)()}});if(s!==eM.current)return;let l=(0,i.G)(t),o="ARCHIVE"===t?l:[...l,...a.inspectBuildDestinations.filter(e=>!l.some(t=>t.type===e.type&&t.id===e.id))];I.set(r,{destinations:o,expiresAt:Date.now()+15e3}),eX(o,t,!0)}catch(t){if(s!==eM.current)return;let e=t instanceof Error?t.message:String(t);l.length?e_(z("destinationRefreshWarning",{error:e})):eq(e)}finally{s===eM.current&&ef(!1)}},eZ=async e=>{eP(!0),eq(null);try{let t=(await (0,D.W)(`mutation ReparseStartBuild($configurationId: ID!, $worktreeId: ID!, $requestId: ID!) {
|
|
24
|
+
reparseBuildConfiguration(configurationId: $configurationId, worktreeId: $worktreeId, requestId: $requestId) {
|
|
25
|
+
${q}
|
|
26
|
+
}
|
|
27
|
+
}`,{configurationId:e.id,worktreeId:n,requestId:(0,T.e)()})).reparseBuildConfiguration;if(ep(s=>({...s,[e.id]:t})),"VALID"!==t.status)throw Error(t.error||z("configurationInvalid"));eQ(e,ec)}catch(e){eq(e instanceof Error?e.message:String(e))}finally{eP(!1)}},e0=async()=>{if(!ez)throw Error(z("selectSigningSourceFirst"));return(await (0,D.W)(`mutation InspectStartBuildSigningRequirements($input: InspectBuildSourceInput!) {
|
|
28
|
+
inspectBuildSource(input: $input) {
|
|
29
|
+
signingRequirements {
|
|
30
|
+
bundleId name target platform teamId provisioningProfileSpecifier
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}`,{input:{worktreeId:n,sourceKind:ez.source.kind,sourcePath:ez.source.relativePath,scheme:ez.scheme,configuration:ez.buildConfiguration,requestId:(0,T.e)()}})).inspectBuildSource.signingRequirements};(0,x.useEffect)(()=>{if(!ez||eD)return;let e=window.setTimeout(()=>void eQ(ez,ec),0);return()=>{window.clearTimeout(e),eM.current+=1}},[er,ei,ec,eD]);let e1=(0,x.useMemo)(()=>em.filter(e=>e.type===eb),[em,eb]),e5=em.find(e=>e.id===ev),e2=ez?`xcrun xcodebuild ${"PROJECT"===ez.source.kind?`-project ${ez.source.relativePath}`:"WORKSPACE"===ez.source.kind?`-workspace ${ez.source.relativePath}`:""} -scheme ${JSON.stringify(ez.scheme)} -configuration ${JSON.stringify(ez.buildConfiguration)} -destination ${JSON.stringify(e5?.name??"<destination>")} -hideShellScriptEnvironment ${ec.toLowerCase().replaceAll("_","-")}${"TEST_WITHOUT_BUILDING"===ec&&eY?` \xb7 ${z("priorBuildSummary",{id:eY})}`:""}`:"",e4=async()=>{if(ez&&e5&&M){eO(!0),eq(null);try{let e={};try{let t=JSON.parse(eA);if(!t||"object"!=typeof t||Array.isArray(t))throw Error();e=t}catch{throw Error(z("overridesInvalid"))}let t=await (0,D.W)(`mutation StartIosBuild($input: StartBuildInput!) {
|
|
34
|
+
${A?"startWorktreeCoverage":"startBuild"}(input: $input) { id }
|
|
35
|
+
}`,{input:{worktreeId:n,serverUrlKind:F??(M?(0,r.b)(M,eb):null),...ed(ez),destination:e5,scriptIds:[...ek],action:ec,advancedSettings:{...eI,buildSettingOverrides:e,...A?{codeCoverage:!0,parseTestResults:!0}:{},..."TEST_WITHOUT_BUILDING"===ec?{priorBuildForTestingId:eY,priorTestProductsPath:null,priorXctestrunPath:null}:{}},exportWhenComplete:!A&&"ARCHIVE"===ec&&eN,exportSettings:"ARCHIVE"===ec?eE:null,requestId:(0,T.e)()}});d(!1);let s=t.startBuild??t.startWorktreeCoverage;if(!s)throw Error(z("startBuildFailed"));c(s.id)}catch(e){eq(e instanceof Error?e.message:String(e))}finally{eO(!1)}}};return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(w.N,{onOpenChange:d,open:o,children:(0,t.jsxs)(w.d,{className:"max-h-[90vh] grid-cols-[minmax(0,1fr)] overflow-y-auto sm:max-w-5xl",children:[(0,t.jsxs)(w.s,{children:[(0,t.jsx)(w.F,{children:z(A?"startWorktreeCoverage":"startBuild")}),(0,t.jsx)(w.C,{children:z(A?"startWorktreeCoverageDescription":"startBuildDescription")})]}),eL&&(0,t.jsx)(g.J,{variant:"destructive",children:(0,t.jsx)(g.p,{children:eL})}),eU&&(0,t.jsx)(g.J,{children:(0,t.jsx)(g.p,{children:eU})}),eD?(0,t.jsxs)("p",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(N.f,{})," ",z("loading")]}):G?(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsxs)("section",{className:"space-y-2",children:[(0,t.jsx)(y.f,{children:z("configuration")}),(0,t.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[G.configurations.map(e=>(0,t.jsxs)("button",{className:`rounded-xl border p-3 text-left transition-colors ${e.id===eH?"border-primary bg-primary/5":"hover:bg-muted/50"}`,"aria-pressed":e.id===eH,onClick:()=>{e.id!==er&&(eM.current+=1),eo(!1),ea(e.id),eu(A?"TEST":e.defaultAction),eS(e.advancedSettings??{}),eT(JSON.stringify(e.advancedSettings?.buildSettingOverrides??{})),eC(!!(!A&&"ARCHIVE"===e.defaultAction&&e.autoExport)),eR({...O.A,...e.exportSettings??{}})},type:"button",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(B.f,{iconKey:e.iconKey}),e.name]}),(0,t.jsx)(f.f,{variant:(eh[e.id]??e.observation)?.status==="VALID"?"success":"outline",children:z(`parseStatuses.${(eh[e.id]??e.observation)?.status??"UNPARSED"}`)})]}),(0,t.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:[e.scheme," · ",e.buildConfiguration]})]},e.id)),(0,t.jsxs)("button",{type:"button","aria-pressed":"__custom__"===eH,className:`rounded-xl border p-3 text-left ${"__custom__"===eH?"border-primary bg-primary/5":"hover:bg-muted/50"}`,onClick:()=>eo(!0),children:[(0,t.jsx)("span",{className:"font-medium",children:z("custom")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:z("customDescription")})]})]})]}),el&&(0,t.jsx)(E.B,{inline:!0,codebaseId:e,worktreeId:n,configuration:ei,open:el,onOpenChange:eo,onSaved:async()=>{},onCustom:e=>{en(e),ea("__custom__"),eu(A?"TEST":e.defaultAction),eS(e.advancedSettings),eT(JSON.stringify(e.advancedSettings.buildSettingOverrides??{})),eC(!!e.autoExport),eR({...O.A,...e.exportSettings})}}),!el&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(y.f,{children:z("destinationType")}),(0,t.jsx)(C.i,{value:eb,onValueChange:e=>{eK.current=e,ej(e);let t=em.find(t=>t.type===e)?.id??"";eF.current=t,ew(t)},children:(0,t.jsxs)(C.U,{children:[(0,t.jsxs)(C.k,{value:"PHYSICAL_DEVICE",children:[(0,t.jsx)(u.f,{}),z("physicalDevice")]}),(0,t.jsxs)(C.k,{value:"SIMULATOR",disabled:"ARCHIVE"===ec,children:[(0,t.jsx)(h.f,{}),z("simulator")]})]})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.f,{htmlFor:J,children:z("device")}),eg&&(0,t.jsx)(N.f,{"aria-hidden":!1,"aria-label":z("loadingDevices")})]}),(0,t.jsxs)(S.d,{disabled:!e1.length,onValueChange:e=>{eF.current=e,ew(e)},value:ev,children:[(0,t.jsx)(S.P,{"aria-busy":eg,id:J,children:(0,t.jsx)(S.U,{placeholder:z("selectDevice")})}),(0,t.jsx)(S.r,{children:e1.map(e=>(0,t.jsxs)(S.T,{value:e.id,children:[e.generic?"SIMULATOR"===e.type?z("anySimulator"):z("anyPhysicalDevice"):e.name,e.osVersion?` \xb7 ${e.osVersion}`:""]},e.id))})]})]})]}),G.allowedScripts.length>0&&(0,t.jsxs)("section",{className:"space-y-2",children:[(0,t.jsx)(y.f,{children:z("scripts")}),(0,t.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:G.allowedScripts.map(({script:e})=>(0,t.jsxs)("label",{className:"flex items-start gap-2 rounded-lg border p-2",children:[(0,t.jsx)(v.f,{checked:ek.has(e.id),onCheckedChange:t=>{ey(s=>{let r=new Set(s);return t?r.add(e.id):r.delete(e.id),r})}}),(0,t.jsxs)("span",{children:[(0,t.jsxs)("span",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,t.jsx)(B.f,{iconKey:e.iconKey??null})," ",e.name]}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[e.preBuildScript?z("preBuild"):"",e.preBuildScript&&e.postBuildScript?" · ":"",e.postBuildScript?z("postBuild"):""]})]})]},e.id))})]}),(0,t.jsxs)("details",{className:"rounded-xl border p-3",children:[(0,t.jsx)("summary",{className:"cursor-pointer font-medium",children:z("details")}),(0,t.jsxs)("div",{className:"mt-4 space-y-4",children:[ez&&(0,t.jsx)(j.N,{children:(0,t.jsxs)(j.O,{className:"space-y-2 text-sm",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate font-mono text-xs",title:ez.source.relativePath,children:ez.source.relativePath}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[ez.scheme," ·"," ",ez.buildConfiguration]}),X&&(0,t.jsxs)("p",{className:"truncate text-xs text-muted-foreground",title:`${X.name} (${X.hostname})`,children:[z("agent"),": ",X.name]})]}),(0,t.jsxs)(b.K,{disabled:e$,onClick:()=>"__custom__"===ez.id?eo(!0):void eZ(ez),size:"sm",type:"button",variant:"outline",children:[e$?(0,t.jsx)(N.f,{}):(0,t.jsx)(l.f,{})," ",z("reparse")]})]}),eJ?.error&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:eJ.error})]})}),(0,t.jsxs)("div",{className:(0,$.f)("space-y-2",A&&"hidden"),children:[(0,t.jsx)(y.f,{children:z("action")}),(0,t.jsxs)(S.d,{onValueChange:e=>{e!==ec&&(eM.current+=1),eu(e),"ARCHIVE"!==e&&eC(!1)},value:ec,children:[(0,t.jsx)(S.P,{children:(0,t.jsx)(S.U,{})}),(0,t.jsx)(S.r,{children:U.map(e=>(0,t.jsx)(S.T,{value:e,children:z(`actions.${e}`)},e))})]})]}),!A&&"ARCHIVE"===ec&&(0,t.jsxs)("section",{className:"space-y-3",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(v.f,{checked:eN,onCheckedChange:e=>eC(!!e)}),z("exportWhenComplete")]}),eN&&(0,t.jsx)(O.O,{onChange:eR,onParseSigningRequirements:e0,value:eE},er)]}),"TEST_WITHOUT_BUILDING"===ec&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(y.f,{children:z("priorBuildForTesting")}),(0,t.jsxs)(S.d,{disabled:et||!eG.length,onValueChange:e=>eS(t=>({...t,priorBuildForTestingId:e,priorTestProductsPath:null,priorXctestrunPath:null})),value:eY??"",children:[(0,t.jsx)(S.P,{children:(0,t.jsx)(S.U,{placeholder:z("selectPriorBuildForTesting")})}),(0,t.jsx)(S.r,{children:eG.map(e=>(0,t.jsxs)(S.T,{value:e.id,children:[(0,W.l)(e.createdAt,"short",{locale:H})," ","· ",e.id]},e.id))})]}),et&&(0,t.jsxs)("p",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,t.jsx)(N.f,{})," ",z("loading")]}),!et&&!eG.length&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:z("noPriorBuildForTesting")})]}),["TEST","BUILD_FOR_TESTING","TEST_WITHOUT_BUILDING"].includes(ec)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(y.f,{children:z("testPlan")}),(0,t.jsxs)(S.d,{onValueChange:e=>eS(t=>({...t,testPlan:"__SCHEME_DEFAULT__"===e?null:e})),value:String(eI.testPlan??"__SCHEME_DEFAULT__"),children:[(0,t.jsx)(S.P,{children:(0,t.jsx)(S.U,{})}),(0,t.jsxs)(S.r,{children:[(0,t.jsx)(S.T,{value:"__SCHEME_DEFAULT__",children:z("schemeDefaultTestPlan")}),"string"==typeof eI.testPlan&&eI.testPlan&&!eJ?.testPlans.includes(eI.testPlan)&&(0,t.jsxs)(S.T,{value:eI.testPlan,children:[eI.testPlan," ·"," ",z("savedValueUnavailable")]}),eJ?.testPlans.map(e=>(0,t.jsx)(S.T,{value:e,children:e},e))]})]})]}),(0,t.jsxs)("div",{className:"mt-4 grid gap-4 sm:grid-cols-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(y.f,{htmlFor:"development-team",children:z("developmentTeam")}),(0,t.jsx)(k.f,{id:"development-team",onChange:e=>eS(t=>({...t,developmentTeam:e.target.value||null})),value:String(eI.developmentTeam??"")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(y.f,{children:z("packageResolution")}),(0,t.jsxs)(S.d,{onValueChange:e=>eS(t=>({...t,packageResolution:e})),value:String(eI.packageResolution??"DEFAULT"),children:[(0,t.jsx)(S.P,{children:(0,t.jsx)(S.U,{})}),(0,t.jsx)(S.r,{children:["DEFAULT","RESOLVED_ONLY","SKIP_UPDATES","DISABLE_AUTOMATIC"].map(e=>(0,t.jsx)(S.T,{value:e,children:e},e))})]})]}),(0,t.jsxs)("label",{className:"flex items-center gap-2",children:[(0,t.jsx)(v.f,{checked:A||!!eI.codeCoverage,disabled:A,onCheckedChange:e=>eS(t=>({...t,codeCoverage:!!e}))}),z("codeCoverage")]}),["TEST","TEST_WITHOUT_BUILDING"].includes(ec)&&(0,t.jsxs)("label",{className:"flex items-center gap-2",children:[(0,t.jsx)(v.f,{checked:A||!1!==eI.parseTestResults,disabled:A,onCheckedChange:e=>eS(t=>({...t,parseTestResults:!!e}))}),z("parseTestResults")]}),(0,t.jsxs)("label",{className:"flex items-center gap-2",children:[(0,t.jsx)(v.f,{checked:!!eI.allowProvisioningUpdates,onCheckedChange:e=>eS(t=>({...t,allowProvisioningUpdates:!!e}))}),z("allowProvisioningUpdates")]}),(0,t.jsx)(P.f,{id:"collect-dsyms",onChange:e=>eS(t=>({...t,collectDsyms:e})),value:eI.collectDsyms}),(0,t.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,t.jsx)(y.f,{htmlFor:"build-setting-overrides",children:z("buildSettingOverrides")}),(0,t.jsx)(R.f,{className:"font-mono text-xs",id:"build-setting-overrides",onChange:e=>eT(e.target.value),rows:4,value:eA})]})]}),(0,t.jsxs)("section",{className:"space-y-2",children:[(0,t.jsx)(y.f,{children:z("commandPreview")}),(0,t.jsx)("pre",{className:"overflow-x-auto rounded-lg bg-muted p-3 text-xs whitespace-pre-wrap",children:e2})]})]})]})]})]}):(0,t.jsx)(g.J,{children:(0,t.jsx)(g.p,{children:z("noConfigurations")})}),(0,t.jsxs)("div",{className:"space-y-2",children:[M?(0,t.jsx)(a.n,{settings:M,value:F??(0,r.b)(M,eb),onValueChange:e=>{"INHERIT"!==e&&V(e)}}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:K??"Loading server URLs…"}),(0,t.jsx)(a.s,{})]}),(0,t.jsxs)(w.c,{children:[(0,t.jsx)(b.K,{onClick:()=>d(!1),type:"button",variant:"outline",children:z("cancel")}),(0,t.jsxs)(b.K,{disabled:eD||eB||el||!ez||!M||!(0,r.C)(M).some(e=>e.kind===(F??(0,r.b)(M,eb)))||!e5||"TEST_WITHOUT_BUILDING"===ec&&!eY,onClick:()=>void e4(),type:"button",children:[eB&&(0,t.jsx)(N.f,{})," ",z("startBuild")]})]})]})})})}e.s(["G",0,function({codebaseId:e,worktreeId:s,disabled:r,disabledReason:a,buildSettingsHref:i,onStarted:l,size:o="sm"}){let d=(0,m.f)("builds"),[c,u]=(0,x.useState)(!1),[h,p]=(0,x.useState)(!1),g=(0,x.useRef)(null),[f]=(0,x.useState)(()=>new Map),j=()=>{null!==g.current&&(window.clearTimeout(g.current),g.current=null)},v=()=>{j(),p(!0)},w=()=>{j(),g.current=window.setTimeout(()=>p(!1),150)};return(0,x.useEffect)(()=>()=>{null!==g.current&&window.clearTimeout(g.current)},[]),(0,t.jsxs)(t.Fragment,{children:[r&&i?(0,t.jsxs)(I.V,{onOpenChange:p,open:h,children:[(0,t.jsx)(I.r,{asChild:!0,children:(0,t.jsxs)(b.K,{"aria-disabled":"true","aria-expanded":h,"aria-haspopup":"dialog",className:"cursor-not-allowed opacity-50",onClick:v,onFocus:v,onMouseEnter:v,onMouseLeave:w,size:o,title:a??void 0,type:"button",children:[(0,t.jsx)(n.f,{})," ",d("build")]})}),(0,t.jsx)(I.T,{align:"start",className:"w-auto max-w-64 p-2 text-xs",onBlurCapture:w,onFocusCapture:j,onMouseEnter:j,onMouseLeave:w,onOpenAutoFocus:e=>e.preventDefault(),side:"top",children:(0,t.jsx)(A.L,{className:"font-medium underline-offset-4 hover:underline",href:i,children:d("configureBuilds")})})]}):(0,t.jsxs)(b.K,{disabled:r,onClick:()=>u(!0),size:o,title:a??void 0,type:"button",children:[(0,t.jsx)(n.f,{})," ",d("build")]}),c&&(0,t.jsx)(_,{codebaseId:e,destinationCache:f,onOpenChange:u,onStarted:e=>l?.(e),open:c,worktreeId:s})]})},"H",0,function({codebaseId:e,worktreeId:s,disabled:r,onStarted:a}){let i=(0,m.f)("builds"),[n,l]=(0,x.useState)(!1),[o]=(0,x.useState)(()=>new Map);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(b.K,{disabled:r,onClick:()=>l(!0),type:"button",children:[(0,t.jsx)(c,{})," ",i("generateWorktreeCoverage")]}),n&&(0,t.jsx)(_,{codebaseId:e,coverageMode:!0,destinationCache:o,onOpenChange:l,onStarted:e=>a?.(e),open:n,worktreeId:s})]})}],448295)},792856,622558,227286,539531,e=>{var t=e.i(843476),s=e.i(741120),r=e.i(456420);let a={name:"shuffle",size:24,node:[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]]};a.node;let i=(0,r.f)(a);var n=e.i(357443),l=e.i(948148),o=e.i(271645),d=e.i(929592),c=e.i(487486),u=e.i(519455),h=e.i(317056),p=e.i(337822),m=e.i(987968),x=e.i(637611),g=e.i(277671),f=e.i(976219);e.s(["f",0,function({worktree:e,onCompleted:r}){let a=(0,l.f)("reviewers"),[b,j]=(0,o.useState)(!1),[v,w]=(0,o.useState)(null),[k,y]=(0,o.useState)([]),[I,S]=(0,o.useState)(!1),[N,C]=(0,o.useState)(!1),[E,R]=(0,o.useState)(null),[A,T]=(0,o.useState)(0);(0,o.useEffect)(()=>{if(!b)return;let t=new AbortController,s=window.setTimeout(()=>{S(!0),R(null),w(null),y([]),(0,x.W)(`query WorktreeReviewerAssignment($worktreeId: ID!) {
|
|
36
|
+
worktreeReviewerAssignment(worktreeId: $worktreeId) {
|
|
37
|
+
${f.J}
|
|
38
|
+
}
|
|
39
|
+
}`,{worktreeId:e.id},{signal:t.signal}).then(e=>{t.signal.aborted||(w(e.worktreeReviewerAssignment),y(e.worktreeReviewerAssignment.selectedReviewerIds))}).catch(e=>{t.signal.aborted||R(e instanceof Error?e.message:String(e))}).finally(()=>{t.signal.aborted||S(!1)})},0);return()=>{window.clearTimeout(s),t.abort()}},[b,e.id,A]);let D=async()=>{if(v&&!N){C(!0),R(null);try{let t=await (0,x.W)(`query PreviewRandomWorktreeReviewers($worktreeId: ID!, $requestId: ID!, $selectedReviewerIds: [ID!]) {
|
|
40
|
+
previewRandomWorktreeReviewers(worktreeId: $worktreeId, requestId: $requestId, selectedReviewerIds: $selectedReviewerIds) {
|
|
41
|
+
${f.J}
|
|
42
|
+
}
|
|
43
|
+
}`,{worktreeId:e.id,requestId:v.requestId,selectedReviewerIds:k});w(t.previewRandomWorktreeReviewers),y(t.previewRandomWorktreeReviewers.selectedReviewerIds)}catch(e){R(e instanceof Error?e.message:String(e))}finally{C(!1)}}},W=async()=>{if(v&&k.length&&!N){C(!0),R(null);try{let t=await (0,x.W)(`mutation AssignWorktreeReviewers($input: AssignWorktreeReviewersInput!) {
|
|
44
|
+
assignWorktreeReviewers(input: $input) { ${f.J} }
|
|
45
|
+
}`,{input:{worktreeId:e.id,requestId:v.requestId,reviewerIds:k}});w(t.assignWorktreeReviewers),y([]),j(!1),await r()}catch(e){R(e instanceof Error?e.message:String(e))}finally{C(!1)}}};if(!e.canAssignReviewers)return null;let $=new Map(v?.reviewers.map(e=>[e.id,e])),P=new Set(v?.requirements.flatMap(e=>[...e.candidateReviewerIds,...e.requestedReviewerIds,...e.approvedReviewerIds])),B=[...new Set([...v?.currentReviewerIds??[],...v?.approvedReviewerIds??[]])].flatMap(e=>!P.has(e)&&$.has(e)?[$.get(e)]:[]),O=!v?.requestOpen||I||N;return(0,t.jsxs)(p.V,{onOpenChange:e=>{N||j(e)},open:b,children:[(0,t.jsx)(p.J,{asChild:!0,children:(0,t.jsxs)(u.K,{"aria-label":a("assignReviewers"),onClick:e=>e.stopPropagation(),size:"sm",type:"button",variant:"outline",children:[(0,t.jsx)(n.f,{})," ",a("assign")]})}),(0,t.jsxs)(p.T,{align:"start","aria-label":a("assignReviewers"),className:"max-h-[min(85dvh,var(--radix-popover-content-available-height))] w-[min(30rem,calc(100vw-2rem))] gap-3 overflow-y-auto",collisionPadding:16,onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-start justify-between gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"font-semibold",children:a("assignReviewers")}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:a("assignmentDescription")})]}),(0,t.jsx)(u.K,{"aria-label":a("reload"),disabled:I||N,onClick:()=>T(e=>e+1),size:"icon-sm",type:"button",variant:"ghost",children:(0,t.jsx)(s.f,{})})]}),I&&(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)(m.f,{}),a("loading")]}),E&&(0,t.jsx)(d.J,{variant:"destructive",children:(0,t.jsx)(d.p,{children:E})}),v&&(0,t.jsxs)(t.Fragment,{children:[!v.requestOpen&&(0,t.jsx)(d.J,{children:(0,t.jsx)(d.p,{children:a("requestClosed")})}),(!v.discoveryComplete||v.issues.length>0)&&(0,t.jsx)(d.J,{children:(0,t.jsxs)(d.p,{className:"space-y-1",children:[!v.discoveryComplete&&(0,t.jsx)("p",{children:a("incompleteDiscovery")}),v.issues.map(e=>(0,t.jsx)("p",{children:e},e))]})}),(0,t.jsxs)(h.s,{className:"min-h-0 flex-1 [&_[data-slot=command-input-wrapper]]:shrink-0",children:[(0,t.jsx)(h.H,{disabled:O,placeholder:a("searchPeople")}),(0,t.jsxs)(h.X,{className:"min-h-0 flex-1",children:[(0,t.jsx)(h.e,{children:a("noPeople")}),v.requirements.map(e=>{let s=new Set(e.approvedReviewerIds),r=new Set(e.requestedReviewerIds.filter(e=>!s.has(e))),i=new Set(k.filter(t=>e.eligibleReviewerIds.includes(t)&&!s.has(t)&&!r.has(t))),n=[...new Set([...e.candidateReviewerIds,...e.requestedReviewerIds,...e.approvedReviewerIds])].flatMap(e=>$.has(e)?[$.get(e)]:[]);return(0,t.jsxs)(h.W,{heading:e.name,children:[(0,t.jsx)("p",{className:"px-2 pb-2 text-xs text-muted-foreground",children:a("requirementCounts",{required:e.requiredApprovals,approved:s.size,requested:r.size,selected:i.size})}),n.map(r=>{let i=s.has(r.id),n=v.currentReviewerIds.includes(r.id);return(0,t.jsxs)(h.J,{"aria-label":a("selectReviewer",{name:r.username,group:e.name}),"data-checked":k.includes(r.id),disabled:O||i||n||r.id===v.authorId,keywords:[r.name,r.username,e.name],onSelect:()=>y(e=>(0,f.x)(e,r.id)),value:`${e.id}:${r.id}`,children:[(0,t.jsx)(g.f,{person:r}),(i||n)&&(0,t.jsx)(c.f,{variant:"secondary",children:i?a("approved"):a("requested")})]},r.id)}),!n.length&&(0,t.jsx)("p",{className:"px-2 py-2 text-xs text-muted-foreground",children:a("noConfiguredCandidates")})]},e.id)}),B.length>0&&(0,t.jsx)(h.W,{heading:a("existingReviewers"),children:B.map(e=>(0,t.jsxs)(h.J,{"aria-label":a("existingReviewer",{name:e.username}),disabled:!0,keywords:[e.name,e.username],value:`existing:${e.id}`,children:[(0,t.jsx)(g.f,{person:e}),(0,t.jsx)(c.f,{variant:"secondary",children:v.approvedReviewerIds.includes(e.id)?a("approved"):a("requested")})]},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 flex-wrap items-center justify-between gap-2 border-t pt-3",children:[(0,t.jsxs)(u.K,{disabled:O,onClick:()=>void D(),size:"sm",type:"button",variant:"outline",children:[N?(0,t.jsx)(m.f,{}):(0,t.jsx)(i,{})," ",a("random")]}),(0,t.jsxs)(u.K,{disabled:O||!k.length,onClick:()=>void W(),size:"sm",type:"button",children:[N?(0,t.jsx)(m.f,{}):(0,t.jsx)(n.f,{})," ",a("assignSelected",{count:k.length})]})]})]})]})]})}],792856);var b=e.i(482022);function j({ids:e,people:s,approvedIds:r=[],requestedIds:a=[]}){let i=(0,l.f)("reviewers");return(0,t.jsx)("ul",{className:"space-y-2",children:[...new Set(e)].map(e=>{let n=s.get(e);return(0,t.jsxs)("li",{className:"flex items-center gap-2",children:[n?(0,t.jsx)(g.f,{person:n}):(0,t.jsx)("span",{className:"min-w-0 flex-1 break-words text-xs text-muted-foreground",children:i("unavailablePerson",{id:e})}),(0,t.jsxs)("span",{className:"flex shrink-0 flex-col items-end gap-1",children:[r.includes(e)&&(0,t.jsx)(c.f,{variant:"success",children:i("approved")}),a.includes(e)&&(0,t.jsx)(c.f,{variant:"secondary",children:i("requested")})]})]},e)})})}e.s(["f",0,function({worktreeId:e,requestId:r,requestUrl:a,requestLabel:i,children:n}){let h=(0,l.f)("reviewers"),[g,v]=(0,o.useState)(!1),[w,k]=(0,o.useState)(null),[y,I]=(0,o.useState)(!0),[S,N]=(0,o.useState)(null),[C,E]=(0,o.useState)(0),R=h("status.requestChanged");(0,o.useEffect)(()=>{if(!g)return;let t=new AbortController,s=window.setTimeout(()=>{I(!0),N(null),(0,x.W)(`query WorktreeReviewStatus($worktreeId: ID!) {
|
|
46
|
+
worktreeReviewStatus(worktreeId: $worktreeId) { ${f.o} }
|
|
47
|
+
}`,{worktreeId:e},{signal:t.signal}).then(s=>{if(!t.signal.aborted){if(s.worktreeReviewStatus.requestId!==r||s.worktreeReviewStatus.worktreeId!==e)throw k(null),Error(R);k(s.worktreeReviewStatus)}}).catch(e=>{t.signal.aborted||N(e instanceof Error?e.message:String(e))}).finally(()=>{t.signal.aborted||I(!1)})},0);return()=>{window.clearTimeout(s),t.abort()}},[g,e,r,C,R]);let A=w?.requestId===r&&w.worktreeId===e?w:null,T=new Map(A?.reviewers.map(e=>[e.id,e])),D=h("status.open",{request:i});return(0,t.jsxs)(p.V,{open:g,onOpenChange:e=>{e&&(k(null),N(null),I(!0)),v(e)},children:[(0,t.jsx)(p.J,{asChild:!0,children:(0,t.jsx)("button",{"aria-label":D,className:"inline-flex cursor-pointer rounded-full outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50",onClick:e=>e.stopPropagation(),type:"button",children:n})}),(0,t.jsxs)(p.T,{align:"start","aria-label":D,className:"max-h-[min(70dvh,42rem,var(--radix-popover-content-available-height))] w-[min(26rem,calc(100vw-1rem))] gap-3 overflow-y-auto",collisionPadding:8,onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)(p.S,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)(p.q,{children:h("status.title")}),(0,t.jsx)(u.K,{"aria-label":h("status.refresh"),disabled:y,onClick:()=>E(e=>e+1),size:"icon-sm",type:"button",variant:"ghost",children:(0,t.jsx)(s.f,{})})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsxs)("a",{className:"inline-flex items-center gap-1 text-xs hover:underline",href:A?.requestUrl??a,rel:"noreferrer",target:"_blank",children:[h("status.openProvider",{request:i})," ",(0,t.jsx)(b.f,{className:"size-3"})]}),n]})]}),y&&(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm",role:"status",children:[(0,t.jsx)(m.f,{"aria-hidden":"true"}),h("loading")]}),S&&(0,t.jsx)(d.J,{variant:"destructive",children:(0,t.jsx)(d.p,{children:S})}),A&&(0,t.jsxs)(t.Fragment,{children:[!A.requestOpen&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:h("status.closed")}),(!A.discoveryComplete||A.issues.length>0)&&(0,t.jsx)(d.J,{children:(0,t.jsxs)(d.p,{className:"space-y-1",children:[!A.discoveryComplete&&(0,t.jsx)("p",{children:h("incompleteDiscovery")}),A.issues.map(e=>(0,t.jsx)("p",{className:"break-words",children:e},e))]})}),(0,t.jsxs)("section",{"aria-label":h("status.approvers"),className:"space-y-2 border-t pt-3",children:[(0,t.jsx)("h3",{className:"text-sm font-medium",children:h("status.approvers")}),A.approvedReviewerIds.length?(0,t.jsx)(j,{ids:A.approvedReviewerIds,people:T}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:h("status.noApprovers")})]}),(0,t.jsxs)("section",{"aria-label":h("status.requested"),className:"space-y-2 border-t pt-3",children:[(0,t.jsx)("h3",{className:"text-sm font-medium",children:h("status.requested")}),A.currentReviewerIds.length?(0,t.jsx)(j,{ids:A.currentReviewerIds,people:T}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:h("status.noRequested")})]}),(0,t.jsxs)("section",{"aria-label":h("status.rules"),className:"space-y-2 border-t pt-3",children:[(0,t.jsx)("h3",{className:"text-sm font-medium",children:h("status.rules")}),!A.requirements.length&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:h(A.discoveryComplete?"status.noRules":"status.rulesUnavailable")}),A.requirements.map(e=>(0,t.jsxs)("section",{"aria-label":e.name,className:"space-y-2 rounded-md border p-2.5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsx)("h4",{className:"min-w-0 break-words text-sm font-medium",children:e.name}),!e.isRequired&&(0,t.jsx)(c.f,{variant:"secondary",children:h("status.suggested")})]}),e.groups.filter(e=>"GENERAL"!==e.kind).map(e=>(0,t.jsx)("p",{className:"break-words text-xs text-muted-foreground",children:e.name},e.key)),e.patterns.length>0&&(0,t.jsx)("p",{className:"break-words font-mono text-xs text-muted-foreground",children:e.patterns.join(", ")}),e.isRequired&&(0,t.jsx)("p",{className:"text-xs font-medium",children:h("status.progress",{approved:new Set(e.approvedReviewerIds).size,required:e.requiredApprovals})}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:h("status.requestedCount",{count:new Set(e.requestedReviewerIds).size})}),(0,t.jsxs)("details",{className:"text-xs",children:[(0,t.jsx)("summary",{className:"cursor-pointer rounded-sm focus-visible:outline-ring",children:h("status.members",{count:e.eligibleReviewerIds.length})}),(0,t.jsx)("div",{className:"pt-3",children:e.eligibleReviewerIds.length?(0,t.jsx)(j,{ids:e.eligibleReviewerIds,people:T,approvedIds:e.approvedReviewerIds,requestedIds:e.requestedReviewerIds}):(0,t.jsx)("p",{className:"text-muted-foreground",children:h("status.noMembers")})})]})]},e.id))]})]})]})]})}],622558);var v=e.i(716327),w=e.i(395925),k=e.i(755146),y=e.i(390673),I=e.i(90575);e.s(["f",0,function({pipelines:e,onChanged:s}){let r=(0,l.f)("gitlabPages"),a=(0,l.f)("pullRequests"),[i,n]=(0,o.useState)(null),[d,c]=(0,o.useState)(null),[h,p]=(0,o.useState)(null),g=(0,o.useRef)(!1);if(!e.length)return null;let f=(0,I.r)(e.map(e=>e.status)),b=e=>e.stopPropagation(),j=async e=>{if(!g.current&&e.canRetry){g.current=!0,n(e.id),c(null),p(null);try{let t=(await (0,x.W)("mutation GitLabWorktreePipelineRetry($projectId: ID!, $pipelineId: ID!) { runGitLabPipelineAction(projectId: $projectId, pipelineId: $pipelineId, action: RETRY) { pipeline { id } execution { id status message } } }",{projectId:e.projectId,pipelineId:e.id})).runGitLabPipelineAction.execution;if(t){let e=`${t.status}: ${t.message??""}`;["FAILED","PARTIAL","UNCERTAIN"].includes(t.status)?c(e):p(e)}await s?.()}catch(e){c(e instanceof Error?e.message:String(e))}finally{g.current=!1,n(null)}}};return(0,t.jsxs)(k.G,{children:[(0,t.jsx)(k.X,{asChild:!0,children:(0,t.jsxs)(u.K,{"aria-label":`${r("pipelines")}: ${r(`pipelineStatuses.${f}`)}`,className:`h-5 rounded-full px-2 py-0.5 text-xs ${(0,I.d)(f)}`,onClick:b,variant:"outline",children:[r(`pipelineStatuses.${f}`),(0,t.jsx)(v.f,{className:"size-3"})]})}),(0,t.jsxs)(k.L,{align:"start",className:"w-80 max-w-[calc(100vw-2rem)]",onClick:b,children:[(0,t.jsx)(k.B,{children:r("pipelines")}),(0,t.jsx)(k.U,{}),d&&(0,t.jsx)("p",{className:"px-2 py-1.5 text-xs break-words text-destructive",role:"alert",children:d}),h&&(0,t.jsx)("p",{className:"px-2 py-1.5 text-xs break-words text-muted-foreground",role:"status",children:h}),(0,t.jsx)("div",{className:"space-y-1 p-1",children:e.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-md px-2 py-2 hover:bg-muted",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)(k.r,{asChild:!0,className:"gap-1 p-0 font-medium",children:(0,t.jsx)("a",{className:"hover:underline",href:e.webUrl,rel:"noreferrer",target:"_blank",children:(0,t.jsxs)("span",{className:"truncate",children:["#",e.iid??e.id," · ",e.ref]})})}),(0,t.jsxs)("span",{className:"block text-xs text-muted-foreground",children:[(0,t.jsx)(y.g,{source:e.source})," ·"," ",(0,t.jsx)(y.a,{status:e.status})]})]}),(0,t.jsxs)(k.r,{"aria-busy":i===e.id,className:(0,u.i)({size:"sm",variant:"outline"}),disabled:null!==i||!e.canRetry,onSelect:t=>{t.preventDefault(),j(e)},children:[i===e.id?(0,t.jsx)(m.f,{"aria-hidden":"true"}):(0,t.jsx)(w.f,{}),i===e.id?a("retrying"):r("retry")]})]},e.id))})]})]})}],227286);var S=e.i(772436),N=e.i(975157);e.s(["f",0,function({first:e,second:s}){let r=(0,o.useRef)(null),[a,i]=(0,o.useState)({paired:!1,inline:!1});return(0,o.useEffect)(()=>{let e=r.current;if(!e)return;let t=()=>{let t=[...e.children].filter(e=>e instanceof HTMLElement&&void 0===e.dataset.quickActionsSeparator),s=2===t.length,[r,a]=t,n=s&&r.getBoundingClientRect().bottom>a.getBoundingClientRect().top;i(e=>e.paired===s&&e.inline===n?e:{paired:s,inline:n})};t();let s=new ResizeObserver(t);for(let t of(s.observe(e),e.children))s.observe(t);let a=new MutationObserver(t);return a.observe(e,{childList:!0,subtree:!0}),()=>{s.disconnect(),a.disconnect()}}),(0,t.jsxs)("div",{className:"flex w-full flex-wrap items-center gap-2",ref:r,children:[e,a.paired&&(0,t.jsx)(S.f,{className:(0,N.f)(!a.inline&&"invisible"),"data-quick-actions-separator":"",orientation:"vertical"}),s]})}],539531)},501416,e=>{let t,s,r,a,i,n,l,o,d,c,u;var h=e.i(843476),p=e.i(119002),m=e.i(489002),x=e.i(482022),g=e.i(948148),f=e.i(271645),b=e.i(929592),j=e.i(519455),v=e.i(755146),w=e.i(987968),k=e.i(687862),y=e.i(520133),I=e.i(637611),S=e.i(975157),N=e.i(997778);let C={activeRuns:[],error:null,loaded:!1},E=e=>({resourceKind:e.resourceKind.trim().toUpperCase(),resourceId:e.resourceId.trim()}),R=e=>{let t=E(e);return JSON.stringify([t.resourceKind,t.resourceId])},A=`query WorkflowTargetSummaries($targets: [WorkflowTargetSummaryInput!]!) {
|
|
48
|
+
workflowTargetSummaries(targets: $targets) {
|
|
49
|
+
resourceKind resourceId
|
|
50
|
+
activeRuns { id workflowId displayNumber status }
|
|
51
|
+
}
|
|
52
|
+
}`,T=(r=new Map,a=new Set,i=e=>r.get(R(e.target))===e&&e.consumers.size>0,n=e=>{for(let t of e.consumers)t()},l=e=>{if(!e.dirty&&!e.inFlight){for(let t of e.waiters)t();e.waiters.clear()}},o=()=>{void 0===t&&[...r.values()].some(e=>e.dirty&&!e.inFlight)&&(t=setTimeout(()=>{t=void 0,u()},0))},d=e=>{i(e)&&(e.dirty=!0,o())},c=async e=>{let t={entries:e,controller:new AbortController};for(let s of(a.add(t),e))s.dirty=!1,s.inFlight=!0;try{let s=await (0,I.W)(A,{targets:e.map(e=>e.target)},{signal:t.controller.signal}),r=new Map(s.workflowTargetSummaries.map(e=>[R(e),e]));for(let t of e){if(!i(t))continue;let e=r.get(R(t.target));if(!e)throw Error("Workflow target summary missing from response");t.snapshot={activeRuns:e.activeRuns,error:null,loaded:!0},n(t)}}catch(s){if(!t.controller.signal.aborted)for(let t of e)i(t)&&(t.snapshot={...t.snapshot,error:s instanceof Error?s.message:String(s)},n(t))}finally{for(let s of(a.delete(t),e))s.inFlight=!1,l(s);o()}},u=async()=>{let e=[...r.values()].filter(e=>e.dirty&&!e.inFlight);await Promise.all(Array.from({length:Math.ceil(e.length/200)},(t,s)=>c(e.slice(200*s,(s+1)*200))))},{snapshot:e=>r.get(R(e))?.snapshot??C,refresh:e=>{let t=r.get(R(e));return t?new Promise(e=>{t.waiters.add(e),d(t)}):Promise.resolve()},subscribe(e,n){let l=E(e),c=R(l),u=r.get(c);u||(u={target:l,consumers:new Set,snapshot:C,dirty:!0,inFlight:!1,waiters:new Set},r.set(c,u)),u.consumers.add(n),u.disposeRuns||(u.disposeRuns=(0,I.p)().subscribe({query:`subscription WorkflowTargetRuns($kind: String!, $resourceId: ID!) {
|
|
53
|
+
workflowChanges(resourceKind: $kind, resourceId: $resourceId) { definitionsChanged }
|
|
54
|
+
}`,variables:{kind:u.target.resourceKind,resourceId:u.target.resourceId}},{next:e=>{e.data?.workflowChanges.definitionsChanged||d(u)},error:()=>void 0,complete:()=>void 0})),s??=(0,I.g)(()=>{for(let e of r.values())d(e)}),o();let h=u,p=!1;return()=>{if(!p){if(p=!0,h.consumers.delete(n),!h.consumers.size){for(let e of(h.disposeRuns?.(),r.delete(c),h.waiters))e();for(let e of(h.waiters.clear(),a))e.entries.some(i)||e.controller.abort()}r.size||(s?.(),s=void 0,void 0!==t&&clearTimeout(t),t=void 0)}}}});function D({worktreeId:e,sessionData:t,workflows:s,className:r}){let a=(0,g.f)("workflows"),i=function(e){let{resourceKind:t,resourceId:s}=e,r=(0,f.useCallback)(e=>T.subscribe({resourceKind:t,resourceId:s},e),[t,s]),a=(0,f.useCallback)(()=>T.snapshot({resourceKind:t,resourceId:s}),[t,s]),i=(0,f.useCallback)(()=>T.refresh({resourceKind:t,resourceId:s}),[t,s]);return{...(0,f.useSyncExternalStore)(r,a,()=>C),refresh:i}}({resourceKind:"WORKTREE",resourceId:e}),[n,l]=(0,f.useState)(null),[o,d]=(0,f.useState)(null),[c,u]=(0,f.useState)(null),E={};for(let e of i.activeRuns)(E[e.workflowId]??=[]).push(e);let R=async(s,r)=>{l(s.id),u(null);try{await (0,I.W)(`mutation RunWorktreeQuickAction($input: TriggerWorkflowInput!) {
|
|
55
|
+
triggerWorkflow(input: $input) { id }
|
|
56
|
+
}`,{input:{workflowId:s.id,sessionData:t,resourceKind:"WORKTREE",resourceId:e,subjectKey:`WORKTREE:${e}`,choice:r}}),await i.refresh()}catch(e){u(e instanceof Error?e.message:String(e))}finally{l(null)}},A=async(e,t)=>{d(e),u(null);try{await (0,I.W)(`mutation WorktreeQuickActionLifecycle($id: ID!) { ${"pause"===t?"pauseWorkflowRun":"cancelWorkflowRun"}(id: $id) { id status } }`,{id:e}),await i.refresh()}catch(e){u(e instanceof Error?e.message:String(e))}finally{d(null)}},W=c??i.error;return(0,h.jsxs)("div",{className:(0,S.f)("w-full space-y-2",r),children:[(0,h.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>{let t=E[e.id]??[],s=t.length>0||n===e.id;return(0,h.jsxs)("div",{className:"flex",children:[t.length>0&&(0,h.jsxs)(v.G,{children:[(0,h.jsx)(v.X,{asChild:!0,children:(0,h.jsxs)(j.K,{"aria-label":a("manageRuns",{name:e.name}),className:"rounded-r-none",size:"sm",variant:"outline",children:[(0,h.jsx)(w.f,{}),t.length>1&&(0,h.jsx)("span",{className:"text-xs tabular-nums",children:t.length})]})}),(0,h.jsx)(v.L,{align:"start",className:"min-w-48",children:t.map((e,s)=>(0,h.jsxs)("div",{children:[s>0&&(0,h.jsx)(v.U,{}),t.length>1&&(0,h.jsx)(v.B,{className:"text-xs text-muted-foreground",children:a("runNumber",{number:e.displayNumber})}),["RUNNING","WAITING","BLOCKED"].includes(e.status)&&(0,h.jsxs)(v.r,{disabled:null!==o,onSelect:()=>void A(e.id,"pause"),children:[(0,h.jsx)(p.f,{}),a("pause")]}),(0,h.jsxs)(v.r,{disabled:null!==o,onSelect:()=>void A(e.id,"cancel"),children:[(0,h.jsx)(m.f,{}),a("cancelRun")]}),(0,h.jsx)(v.r,{asChild:!0,children:(0,h.jsxs)(y.L,{href:`/dashboard/workflows/runs/${e.id}`,children:[(0,h.jsx)(x.f,{}),a("quickActionView")]})})]},e.id))})]}),(0,h.jsx)(N.f,{button:(0,h.jsxs)(j.K,{className:t.length>0?"-ml-px rounded-l-none":void 0,disabled:null!==n,size:"sm",title:s?a("startAnotherRun",{name:e.name}):e.description||e.name,variant:e.quickActionButtonVariant,children:[n===e.id?(0,h.jsx)(w.f,{}):(0,h.jsx)(k.f,{iconKey:e.quickActionIconKey}),e.name]}),choices:e.triggerChoices??[],hasPlainTrigger:e.hasPlainTrigger??!1,onRun:t=>void R(e,t)})]},e.id)})}),W&&(0,h.jsx)(b.J,{variant:"destructive",children:(0,h.jsx)(b.p,{children:W})})]})}e.s(["f",0,function(e){return e.workflows.length?(0,h.jsx)(D,{...e}):null}],501416)},966264,e=>{var t=e.i(843476),s=e.i(113030),r=e.i(741120),a=e.i(948148),i=e.i(271645),n=e.i(460461),l=e.i(346194),o=e.i(698411),d=e.i(898459),c=e.i(929592),u=e.i(519455),h=e.i(257428),p=e.i(776639),m=e.i(793479),x=e.i(110204),g=e.i(967489),f=e.i(987968),b=e.i(624687),j=e.i(637611),v=e.i(440289);let w="__none__",k="__github_account_default__";function y(e){return e instanceof Error?e.message:String(e)}function I({worktree:e,disabled:r,onCompleted:n}){let l,c=(0,a.f)("gitlabPages"),[h,p]=(0,i.useState)(!1),m=e.sourceControlRequest;if(!m?.projectId)return null;let x=(l=e.sourceControlRequest,l?.provider==="GITLAB"&&!l.isDraft&&"mergeable"===l.detailedMergeStatus&&!(e.gitLabPipelines??[]).some(e=>(0,d.f)(e.status)));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(u.K,{size:"sm",variant:"outline",disabled:r,onClick:()=>p(!0),children:[(0,t.jsx)(s.f,{}),c(x?"merge":"autoMerge")]}),(0,t.jsx)(o.f,{mergeRequest:{projectId:m.projectId,iid:m.number,title:m.title},worktreeId:e.id,onMerged:n,open:h,onOpenChange:p})]})}function S({worktree:e,disabled:r,onCompleted:o,onError:d}){let h,v=(0,a.f)("worktrees"),w=(0,a.f)("pullRequests"),I=e.pullRequest,N=e.autoMerge,C=N&&N.branch===e.branch&&(!I||N.pullRequestNumber===I.number&&N.repositoryNameWithOwner.toLowerCase()===I.repositoryNameWithOwner.toLowerCase())?N:null,[E,R]=(0,i.useState)(!1),[A,T]=(0,i.useState)(!1),D=I?.repositoryNameWithOwner,W=I?.number,[$,P]=(0,i.useState)(!1),[B,O]=(0,i.useState)(!1),[L,q]=(0,i.useState)(null),[U,_]=(0,i.useState)(null),[M,K]=(0,i.useState)(""),[F,V]=(0,i.useState)(""),[z,H]=(0,i.useState)(""),[J,G]=(0,i.useState)(k),[Y,X]=(0,i.useState)(!1),[Q,Z]=(0,i.useState)(!1);if((0,i.useEffect)(()=>{if(!E||!D||!W)return;let t=!0,[s="",r=""]=D.split("/",2),a=window.setTimeout(()=>{P(!0),_(null),q(null),(0,j.W)(`query GitHubPullRequestMergeOptions(
|
|
57
|
+
$owner: String!
|
|
58
|
+
$name: String!
|
|
59
|
+
$number: Int!
|
|
60
|
+
$worktreeId: ID
|
|
61
|
+
) {
|
|
62
|
+
githubPullRequestMergeOptions(
|
|
63
|
+
source: WORKTREE_AUTOMATION
|
|
64
|
+
worktreeId: $worktreeId
|
|
65
|
+
owner: $owner
|
|
66
|
+
name: $name
|
|
67
|
+
number: $number
|
|
68
|
+
) {
|
|
69
|
+
${n.S}
|
|
70
|
+
availableMethods commitEmails defaultCommitEmail
|
|
71
|
+
defaultCommitHeadline defaultCommitBody canMerge
|
|
72
|
+
canEnableAutoMerge autoMergeEnabled viewerCanDisableAutoMerge
|
|
73
|
+
mergeStateStatus headRefOid blockedReason
|
|
74
|
+
}
|
|
75
|
+
}`,{owner:s,name:r,number:W,worktreeId:e.id}).then(e=>{if(!t)return;let s=e.githubPullRequestMergeOptions;_(s),K(s.defaultMethod??s.availableMethods[0]??""),V(s.defaultCommitHeadline),H(s.defaultCommitBody),G(s.defaultCommitEmail??k),X(!!(s.canDeleteWorktree&&s.defaultDeleteWorktree)),Z(!!(s.ticketKey&&s.defaultMoveTicketToDone))}).catch(e=>t&&q(y(e))).finally(()=>t&&P(!1))},0);return()=>{t=!1,window.clearTimeout(a)}},[E,D,W,e.id]),I&&(A||!E&&C?.state!=="COMPLETED"&&(h=e.pullRequest)&&"OPEN"===h.state&&!h.isDraft&&"MERGEABLE"===h.mergeable&&["CLEAN","HAS_HOOKS","UNSTABLE"].includes(h.mergeStateStatus)))return(0,t.jsx)(l.f,{onMerged:()=>o(),onOpenChange:T,open:A,worktreeId:e.id,pullRequest:I,requestSource:"WORKTREE_AUTOMATION"});let ee=I?.state==="MERGED"&&!!C,et=async()=>{if(I&&M&&F.trim()&&(ee||!Q||U?.ticketDoneStatusConfigured)){O(!0),q(null);try{if(ee){await (0,j.W)(`mutation RetryWorktreeAutoMerge($worktreeId: ID!) {
|
|
76
|
+
retryWorktreeAutoMerge(worktreeId: $worktreeId) { worktreeId state }
|
|
77
|
+
}`,{worktreeId:e.id}),d(null),R(!1),await o();return}await (0,j.W)(`mutation ConfigureWorktreeAutoMerge(
|
|
78
|
+
$input: ConfigureWorktreeAutoMergeInput!
|
|
79
|
+
) {
|
|
80
|
+
configureWorktreeAutoMerge(input: $input) {
|
|
81
|
+
worktreeId state repositoryNameWithOwner pullRequestNumber
|
|
82
|
+
mergeMethod commitHeadline commitBody authorEmail deleteWorktree
|
|
83
|
+
moveTicketToDone ticketKey lastError updatedAt
|
|
84
|
+
}
|
|
85
|
+
}`,{input:{worktreeId:e.id,repositoryNameWithOwner:I.repositoryNameWithOwner,pullRequestNumber:I.number,method:M,commitHeadline:F,commitBody:z,authorEmail:J===k?null:J,deleteWorktree:Y,moveTicketToDone:Q}}),d(null),R(!1),await o()}catch(e){q(y(e))}finally{O(!1)}}},es=async()=>{O(!0),q(null);try{await (0,j.W)(`mutation CancelWorktreeAutoMerge($worktreeId: ID!) {
|
|
86
|
+
cancelWorktreeAutoMerge(worktreeId: $worktreeId)
|
|
87
|
+
}`,{worktreeId:e.id}),d(null),R(!1),await o()}catch(e){q(y(e))}finally{O(!1)}},er=C?.state==="ACTION_REQUIRED",ea=C?.state==="COMPLETED";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(u.K,{className:C&&!er?"bg-emerald-600 text-white hover:bg-emerald-700":void 0,disabled:!I||r&&!C||ea,onClick:e=>{e.stopPropagation(),P(!0),_(null),q(null),R(!0)},size:"sm",type:"button",variant:er?"destructive":C?"default":"outline",children:[(0,t.jsx)(s.f,{}),v(ea?"autoMergeComplete":er?"autoMergePaused":C?"autoMerging":"autoMerge")]}),(0,t.jsx)(p.N,{onOpenChange:e=>!B&&R(e),open:E,children:(0,t.jsxs)(p.d,{className:"sm:max-w-xl",children:[(0,t.jsxs)(p.s,{children:[(0,t.jsx)(p.F,{children:v("autoMergeTitle")}),(0,t.jsx)(p.C,{children:v("autoMergeDescription")})]}),!$&&(U||L)?(0,t.jsxs)("div",{className:"space-y-4",children:[(L||C?.lastError)&&(0,t.jsx)(c.J,{variant:"destructive",children:(0,t.jsx)(c.p,{children:L||C?.lastError})}),U&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(x.f,{className:"mb-1.5 block",children:w("mergeType")}),(0,t.jsxs)(g.d,{disabled:B||ee,onValueChange:e=>K(e),value:M,children:[(0,t.jsx)(g.P,{children:(0,t.jsx)(g.U,{})}),(0,t.jsx)(g.r,{children:U.availableMethods.map(e=>(0,t.jsx)(g.T,{value:e,children:w(`mergeTypes.${e}`)},e))})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(x.f,{className:"mb-1.5 block",children:w("commitMessage")}),(0,t.jsx)(m.f,{disabled:B||ee,onChange:e=>V(e.target.value),value:F})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(x.f,{className:"mb-1.5 block",children:w("commitDescription")}),(0,t.jsx)(b.f,{className:"min-h-24",disabled:B||ee,onChange:e=>H(e.target.value),value:z})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(x.f,{className:"mb-1.5 block",children:w("commitEmail")}),(0,t.jsxs)(g.d,{disabled:B||ee,onValueChange:G,value:J,children:[(0,t.jsx)(g.P,{children:(0,t.jsx)(g.U,{})}),(0,t.jsxs)(g.r,{children:[(0,t.jsx)(g.T,{value:k,children:w("githubDefaultEmail")}),U.commitEmails.map(e=>(0,t.jsx)(g.T,{value:e,children:e},e))]})]})]}),(0,t.jsx)(n.y,{options:U,disabled:B||ee,deleteWorktree:Y,moveTicketToDone:Q,onDeleteWorktreeChange:X,onMoveTicketToDoneChange:Z})]})]}):(0,t.jsxs)("div",{className:"flex items-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,t.jsx)(f.f,{})," ",w("loadingMergeOptions")]}),(0,t.jsxs)(p.c,{children:[C&&(0,t.jsx)(u.K,{disabled:B,onClick:()=>void es(),type:"button",variant:"destructive",children:v("cancelAutoMerge")}),(0,t.jsx)(u.K,{disabled:B,onClick:()=>R(!1),type:"button",variant:"outline",children:v("cancel")}),(0,t.jsxs)(u.K,{disabled:$||B||!M||!F.trim()||!ee&&Q&&!U?.ticketDoneStatusConfigured||!C&&!U?.canEnableAutoMerge,onClick:()=>void et(),type:"button",children:[B&&(0,t.jsx)(f.f,{}),v(er?"resumeAutoMerge":"saveAutoMerge")]})]})]})})]})}e.s(["o",0,function(e){return e.worktree.sourceControlRequest?.provider==="GITLAB"?(0,t.jsx)(I,{...e}):(0,t.jsx)(S,{...e})},"b",0,function({worktree:e,conflictWorkflows:s,disabled:n,onCompleted:l,onError:o}){let d=(0,a.f)("worktrees"),m=e.autoSync,[b,k]=(0,i.useState)(!1),[I,S]=(0,i.useState)(!1),[N,C]=(0,i.useState)(!1),[E,R]=(0,i.useState)(null),[A,T]=(0,i.useState)(!1),[D,W]=(0,i.useState)(w),[$,P]=(0,i.useState)(w),B=(0,i.useMemo)(()=>s.find(e=>e.id===D),[s,D]),O=async()=>{S(!0),R(null);try{await (0,j.W)(`mutation ConfigureWorktreeAutoSync(
|
|
88
|
+
$input: ConfigureWorktreeAutoSyncInput!
|
|
89
|
+
) {
|
|
90
|
+
configureWorktreeAutoSync(input: $input) {
|
|
91
|
+
worktreeId state conflictWorkflowId conflictWorkflowChoice
|
|
92
|
+
lastError pauseReason lastSyncedAt updatedAt
|
|
93
|
+
}
|
|
94
|
+
}`,{input:{worktreeId:e.id,conflictWorkflowId:A&&D!==w?D:null,conflictWorkflowChoice:A&&$!==w?$:null}}),o(null),k(!1),await l()}catch(e){R(y(e))}finally{S(!1)}},L=async()=>{S(!0),R(null);try{await (0,j.W)(`mutation CancelWorktreeAutoSync($worktreeId: ID!) {
|
|
95
|
+
cancelWorktreeAutoSync(worktreeId: $worktreeId)
|
|
96
|
+
}`,{worktreeId:e.id}),o(null),k(!1),await l()}catch(e){R(y(e))}finally{S(!1)}},q=async()=>{S(!0),R(null);try{let t=await (0,j.W)(`mutation ForceWorktreeAutoSync($worktreeId: ID!, $requestId: ID!) {
|
|
97
|
+
forceWorktreeAutoSync(worktreeId: $worktreeId, requestId: $requestId) { id }
|
|
98
|
+
}`,{worktreeId:e.id,requestId:crypto.randomUUID()});await (0,v.t)(t.forceWorktreeAutoSync.id),o(null),k(!1),await l()}catch(e){R(y(e)),await l().catch(()=>void 0)}finally{C(!1),S(!1)}},U=m?.state==="PAUSED";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(u.K,{className:m&&!U?"bg-emerald-600 text-white hover:bg-emerald-700":void 0,disabled:n&&!m,onClick:e=>{e.stopPropagation(),R(null),C(!1),T(!!m?.conflictWorkflowId),W(m?.conflictWorkflowId??w),P(m?.conflictWorkflowChoice??w),k(!0)},size:"sm",type:"button",variant:U?"destructive":m?"default":"outline",children:[(0,t.jsx)(r.f,{}),d(U?"autoSyncPaused":m?"autoSyncing":"autoSync")]}),(0,t.jsx)(p.N,{onOpenChange:e=>{I||k(e),e||C(!1)},open:b,children:(0,t.jsxs)(p.d,{className:"sm:max-w-xl",children:[(0,t.jsxs)(p.s,{children:[(0,t.jsx)(p.F,{children:d("autoSyncTitle")}),(0,t.jsx)(p.C,{children:d("autoSyncDescription")})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(E||m?.lastError)&&(0,t.jsx)(c.J,{variant:"destructive",children:(0,t.jsx)(c.p,{children:E||m?.lastError})}),(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(h.f,{checked:A,disabled:I||0===s.length,id:`auto-sync-workflow-${e.id}`,onCheckedChange:e=>T(!!e)}),(0,t.jsx)(x.f,{htmlFor:`auto-sync-workflow-${e.id}`,children:d("useConflictWorkflow")})]}),A&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(x.f,{className:"mb-1.5 block",children:d("selectConflictWorkflow")}),(0,t.jsxs)(g.d,{disabled:I,onValueChange:e=>{W(e),P(w)},value:D,children:[(0,t.jsx)(g.P,{children:(0,t.jsx)(g.U,{})}),(0,t.jsxs)(g.r,{children:[(0,t.jsx)(g.T,{value:w,children:d("noWorkflow")}),s.map(e=>(0,t.jsx)(g.T,{value:e.id,children:e.name},e.id))]})]})]}),B?.triggerChoices&&B.triggerChoices.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(x.f,{className:"mb-1.5 block",children:d("conflictWorkflowChoice")}),(0,t.jsxs)(g.d,{disabled:I,onValueChange:P,value:$,children:[(0,t.jsx)(g.P,{children:(0,t.jsx)(g.U,{})}),(0,t.jsxs)(g.r,{children:[B.hasPlainTrigger&&(0,t.jsx)(g.T,{value:w,children:d("defaultWorkflowTrigger")}),B.triggerChoices.map(e=>(0,t.jsx)(g.T,{value:e.key,children:e.label},e.key))]})]})]})]})]}),(0,t.jsxs)(p.c,{children:[m?.state==="PAUSED"&&"PREPARATION_CONFLICT"===m.pauseReason&&(0,t.jsxs)(u.K,{disabled:I,onClick:()=>{N?q():C(!0)},type:"button",variant:"destructive",children:[I&&(0,t.jsx)(f.f,{})," ",d(N?"confirmForceSyncPreparations":"forceSyncPreparations")]}),m&&(0,t.jsx)(u.K,{disabled:I,onClick:()=>void L(),type:"button",variant:"destructive",children:d("cancelAutoSync")}),(0,t.jsx)(u.K,{disabled:I,onClick:()=>k(!1),type:"button",variant:"outline",children:d("cancel")}),(0,t.jsxs)(u.K,{disabled:I||A&&D===w||!!(A&&B?.triggerChoices?.length&&!B.hasPlainTrigger&&$===w),onClick:()=>void O(),type:"button",children:[I&&(0,t.jsx)(f.f,{}),d(U?"resumeAutoSync":"saveAutoSync")]})]})]})})]})}])},942230,e=>{var t=e.i(843476),s=e.i(716327),r=e.i(434322),a=e.i(550420),i=e.i(948148),n=e.i(271645),l=e.i(487486),o=e.i(816484);e.i(983632);var d=e.i(272563),c=e.i(605345),u=e.i(142811),h=e.i(987968),p=e.i(784774),m=e.i(975157),x=e.i(462777),g=e.i(637611),f=e.i(455329),b=e.i(508734),j=e.i(487812);function v({children:e,file:s,commit:r}){let a=(0,i.f)("worktrees"),[l,o]=(0,n.useState)(!1),[d,c]=(0,n.useState)(!1),u=e=>{c(!1),(0,x.d)(e).then(()=>o(!1)).catch(()=>c(!0))},h=s?.folder.includes("\\")?"\\":"/",p=s?`${s.folder.replace(/[\\/]+$/,"")}${h}${s.path.replaceAll("/",h)}`:"";return(0,t.jsxs)(j.c,{onOpenChange:e=>{o(e),c(!1)},open:l,children:[(0,t.jsx)(j.f,{asChild:!0,children:e}),(0,t.jsxs)(j.d,{className:"w-64","data-worktree-navigation-ignore":"true",onClick:e=>e.stopPropagation(),children:[s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(j.e,{onSelect:e=>{e.preventDefault(),u(p)},children:[(0,t.jsx)(b.f,{})," ",a("copyFilePath")]}),(0,t.jsxs)(j.e,{onSelect:e=>{e.preventDefault(),u(s.path)},children:[(0,t.jsx)(b.f,{})," ",a("copyRelativeFilePath")]})]}),s&&r&&(0,t.jsx)(j.M,{}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(j.e,{onSelect:e=>{e.preventDefault(),u(r.sha.slice(0,8))},children:[(0,t.jsx)(b.f,{})," ",a("copyShortCommitHash")]}),(0,t.jsxs)(j.e,{onSelect:e=>{e.preventDefault(),u(r.sha)},children:[(0,t.jsx)(b.f,{})," ",a("copyFullCommitHash")]}),(0,t.jsxs)(j.e,{onSelect:e=>{e.preventDefault(),u(r.message??r.subject)},children:[(0,t.jsx)(b.f,{})," ",a("copyCommitMessage")]})]}),d&&(0,t.jsx)("p",{className:"px-2 py-1 text-xs text-destructive",role:"alert",children:a("copyChangeFailed")})]})]})}function w({detail:e,worktreeId:s,worktreeFolder:r}){let a=(0,i.f)("worktrees");return(0,t.jsxs)("div",{className:"w-full space-y-4 border-t pt-4","data-testid":"worktree-detail","data-worktree-navigation-ignore":"true",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:"mb-2 font-medium",children:a("changes",{count:e.changes.length})}),(0,t.jsx)("div",{"aria-label":a("changes",{count:e.changes.length}),className:"max-h-80 divide-y overflow-auto rounded-md border",role:"group",children:e.changes.length?e.changes.map(e=>(0,t.jsx)(k,{change:e,worktreeId:s,worktreeFolder:r},e.path)):(0,t.jsx)("p",{className:"p-3 text-sm text-muted-foreground",children:a("noChanges")})})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:"mb-2 font-medium",children:a("commits",{count:e.commits.length})}),(0,t.jsx)("div",{className:"max-h-80 overflow-auto rounded-md border",children:e.commits.length?(0,t.jsx)(p.s,{"aria-label":a("commits",{count:e.commits.length}),className:"min-w-[36rem] table-fixed text-xs",children:(0,t.jsx)(p.z,{children:e.commits.map(e=>(0,t.jsx)(v,{commit:e,children:(0,t.jsxs)(p.N,{children:[(0,t.jsx)(p.d,{className:"w-24 px-2 py-1.5 font-mono text-muted-foreground",children:e.sha.slice(0,8)}),(0,t.jsx)(p.d,{className:"max-w-0 px-2 py-1.5",children:(0,t.jsxs)("div",{className:"flex min-w-0 items-baseline gap-2",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 break-words whitespace-normal font-medium",children:e.subject}),(0,t.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:[e.authorName," ·"," ",(0,t.jsx)(o.f,{value:e.authoredAt})]})]})}),(0,t.jsx)(p.d,{className:"w-24 px-2 py-1.5 text-right",children:(0,t.jsx)(T,{additions:e.additions,deletions:e.deletions})})]})},e.sha))})}):(0,t.jsx)("p",{className:"p-3 text-sm text-muted-foreground",children:a("noCommits")})})]})]})}function k({change:e,worktreeId:s,worktreeFolder:r}){let a=(0,i.f)("worktrees");return(0,t.jsx)(y,{copyTarget:{file:{folder:r,path:e.path}},label:e.path,summary:(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[e.conflicted&&(0,t.jsx)(l.f,{variant:"destructive",children:a("conflicted")}),e.staged&&(0,t.jsx)(A,{additions:e.stagedAdditions,deletions:e.stagedDeletions,label:a("staged")}),e.unstaged&&(0,t.jsx)(A,{additions:e.unstagedAdditions,deletions:e.unstagedDeletions,label:a("unstaged")}),e.untracked&&(0,t.jsx)(A,{additions:e.unstagedAdditions,deletions:e.unstagedDeletions,label:a("untracked")})]}),children:(0,t.jsxs)("div",{className:"space-y-3",children:[e.staged&&(0,t.jsx)(N,{label:a("staged"),path:e.path,previousPath:e.previousPath,scope:"STAGED",worktreeId:s}),e.unstaged&&(0,t.jsx)(N,{label:a("unstaged"),path:e.path,scope:"UNSTAGED",worktreeId:s}),e.untracked&&(0,t.jsx)(N,{label:a("untracked"),path:e.path,scope:"UNTRACKED",worktreeId:s})]})})}function y({label:e,prefix:r,summary:a,children:i,copyTarget:l}){let[o,d]=(0,n.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{...l,children:(0,t.jsxs)("button",{"aria-expanded":o,className:"flex min-h-8 w-full items-center gap-2 px-2 py-1.5 text-left hover:bg-muted/40",onClick:()=>d(e=>!e),type:"button",children:[(0,t.jsx)(s.f,{className:(0,m.f)("size-3.5 shrink-0 transition-transform",o&&"rotate-180")}),r&&(0,t.jsx)("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:r}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",title:e,children:e}),(0,t.jsx)("span",{className:"shrink-0",children:a})]})}),o&&i&&(0,t.jsx)("div",{className:"border-t bg-muted/10 p-3",children:i})]})}function I({worktreeId:e,worktreeFolder:s,commit:r}){let{value:a,loading:i,error:n}=C(e,"COMMIT",null,null,r.sha);return i?(0,t.jsx)(E,{}):n?(0,t.jsx)(R,{value:n}):(0,t.jsx)("div",{className:"divide-y rounded-md border bg-background",children:a?.files.map(a=>(0,t.jsx)(S,{commit:r,file:a,scope:"COMMIT",worktreeId:e,worktreeFolder:s},`${a.previousPath??""}:${a.path}`))})}function S({file:e,worktreeId:s,worktreeFolder:i,scope:n,commit:o}){return(0,t.jsx)(y,{copyTarget:{file:{folder:i,path:e.path},commit:o},label:e.path,summary:(0,t.jsxs)("span",{className:"inline-flex items-center gap-2",children:[e.image?(0,t.jsx)(a.f,{className:"size-4"}):(0,t.jsx)(r.f,{className:"size-4"}),(0,t.jsx)(l.f,{variant:"outline",children:e.changeType}),(0,t.jsx)(T,{additions:e.additions,deletions:e.deletions})]}),children:(0,t.jsx)(N,{commitSha:o?.sha,path:e.path,previousPath:e.previousPath,scope:n,worktreeId:s})})}function N({label:e,worktreeId:s,path:r,previousPath:a,scope:n,commitSha:l}){let o=(0,i.f)("worktreeDetail"),h=(0,u.F)(),p=(0,u.V)(),{value:m,loading:x,error:g}=C(s,n,r,a??null,l??null),f=e=>{let t=new URLSearchParams({scope:n,path:r,side:e});return a&&t.set("previousPath",a),l&&t.set("commitSha",l),`/api/worktrees/${encodeURIComponent(s)}/diff-image?${t}`};return(0,t.jsxs)("div",{className:"space-y-2",children:[e&&(0,t.jsx)("p",{className:"text-xs font-medium uppercase text-muted-foreground",children:e}),x?(0,t.jsx)(E,{}):g?(0,t.jsx)(R,{value:g}):m?.image?(0,t.jsx)(d.f,{after:m.afterAvailable?f("AFTER"):null,before:m.beforeAvailable?f("BEFORE"):null,labels:p}):m?.patch?(0,t.jsx)(c.r,{labels:{...h,truncated:o("diffLimit")},mode:"UNIFIED",patch:m.patch,truncated:m.truncated,wrap:!1}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:o(m?.truncated?"diffTooLarge":m?.binary?"binaryFileChanged":"noTextChanges")})]})}function C(e,t,s,r,a){let[i,l]=(0,n.useState)(null),[o,d]=(0,n.useState)(!0),[c,u]=(0,n.useState)(null);return(0,n.useEffect)(()=>{let i=!1;return(0,g.W)(f.S,{input:{worktreeId:e,scope:t,path:s,previousPath:r,commitSha:a,requestId:(0,x.e)()}}).then(e=>{i||l(e.inspectWorktreeDiff)}).catch(e=>{i||u(e instanceof Error?e.message:String(e))}).finally(()=>{i||d(!1)}),()=>{i=!0}},[a,s,r,t,e]),{value:i,loading:o,error:c}}function E(){let e=(0,i.f)("worktreeDetail");return(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(h.f,{})," ",e("loadingDiff")]})}function R({value:e}){return(0,t.jsx)("p",{className:"text-sm text-destructive",children:e})}function A({label:e,additions:s,deletions:r}){return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 whitespace-nowrap text-xs text-muted-foreground",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(T,{additions:s,deletions:r})]})}function T({additions:e,deletions:s}){return null===e&&null===s?(0,t.jsx)("span",{className:"text-muted-foreground",children:"—"}):(0,t.jsxs)("span",{className:"inline-flex gap-1 text-xs tabular-nums",children:[(0,t.jsxs)("span",{className:"text-emerald-700 dark:text-emerald-400",children:["+",e??0]}),(0,t.jsxs)("span",{className:"text-red-700 dark:text-red-400",children:["−",s??0]})]})}e.s(["n",0,function({files:e,truncated:s,worktreeId:r,worktreeFolder:a}){let n=(0,i.f)("worktreeDetail");return(0,t.jsxs)("div",{className:"space-y-3",children:[e.length?(0,t.jsx)("div",{className:"divide-y rounded-md border",children:e.map(e=>(0,t.jsx)(S,{file:e,scope:"BRANCH",worktreeId:r,worktreeFolder:a},`${e.previousPath??""}:${e.path}`))}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:n("noBranchChanges")}),s&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:n("diffTruncated")})]})},"m",0,function({detail:e,worktreeId:s,worktreeFolder:r,inline:a=!1}){let n=(0,i.f)("worktrees");return a?(0,t.jsx)(w,{detail:e,worktreeId:s,worktreeFolder:r}):(0,t.jsxs)("div",{className:(0,m.f)("w-full space-y-4",a&&"border-t pt-4"),"data-testid":"worktree-detail","data-worktree-navigation-ignore":a?"true":void 0,children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:"mb-2 font-medium",children:n("changes",{count:e.changes.length})}),(0,t.jsx)("div",{className:"divide-y rounded-md border",children:e.changes.length?e.changes.map(e=>(0,t.jsx)(k,{change:e,worktreeId:s,worktreeFolder:r},e.path)):(0,t.jsx)("p",{className:"p-3 text-sm text-muted-foreground",children:n("noChanges")})})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:"mb-2 font-medium",children:n("commits",{count:e.commits.length})}),(0,t.jsx)("div",{className:"divide-y rounded-md border",children:e.commits.length?e.commits.map(e=>(0,t.jsx)(y,{copyTarget:{commit:e},label:e.subject,prefix:e.sha.slice(0,8),summary:(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[e.authorName," · ",(0,t.jsx)(o.f,{value:e.authoredAt})," ","·"," ",(0,t.jsx)(T,{additions:e.additions,deletions:e.deletions})]}),children:s?(0,t.jsx)(I,{commit:e,worktreeId:s,worktreeFolder:r}):null},e.sha)):(0,t.jsx)("p",{className:"p-3 text-sm text-muted-foreground",children:n("noCommits")})})]}),(e.commitsTruncated||e.changesTruncated)&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:n("truncated")})]})}],942230)},753790,e=>{var t=e.i(843476),s=e.i(263676),r=e.i(948148),a=e.i(929592),i=e.i(519455);e.s(["f",0,function({error:e,onDismiss:n}){let l=(0,r.f)("worktrees");return e?(0,t.jsxs)(a.J,{variant:"destructive",children:[(0,t.jsx)(a.p,{children:e}),n&&(0,t.jsx)(a.x,{children:(0,t.jsx)(i.K,{"aria-label":l("dismissError"),onClick:n,size:"icon-xs",variant:"ghost",children:(0,t.jsx)(s.X,{})})})]}):null}])},453154,5406,e=>{var t=e.i(843476),s=e.i(689664),r=e.i(867927),a=e.i(482022),i=e.i(263676),n=e.i(948148),l=e.i(271645),o=e.i(487486),d=e.i(519455),c=e.i(987968),u=e.i(520133);let h={STARTING:"submitting",QUEUED:"queued",RUNNING:"running",CANCELLING:"cancelling",SUCCEEDED:"succeeded",FAILED:"failed",CANCELLED:"cancelled",TIMED_OUT:"timedOut",SKIPPED:"skipped",UNREPORTED:"failed",SUBMISSION_FAILED:"failed"},p={ACTIVE_OPERATION:"skipActive",OFFLINE:"skipOffline",UNSUPPORTED:"skipUnsupported",MISSING:"skipMissing",NOT_REPOSITORY:"skipNotRepository",ORIGIN_MISMATCH:"skipOriginMismatch",ERROR:"skipError"};function m(e){return["STARTING","QUEUED","RUNNING","CANCELLING"].includes(e.status)}function x(e){return["FAILED","CANCELLED","TIMED_OUT","UNREPORTED","SUBMISSION_FAILED"].includes(e.status)}e.s(["f",0,function({batch:e,onDismiss:g,onRetry:f}){let b=(0,n.f)("worktrees.fetchProgress"),j=(0,l.useId)(),v=["starting","fetching","refreshing"].includes(e.phase),w=e.rows.filter(e=>!m(e)).length,k=e.rows.filter(e=>"SUCCEEDED"===e.status).length,y=e.rows.filter(x).length,I=e.rows.filter(e=>"SKIPPED"===e.status).length,S=e.rows.some(e=>e.worktreeRefreshError),N=e.rows.some(e=>"SUCCEEDED"===e.status&&!e.worktreesRefreshedAt&&!e.worktreeRefreshError),C=b("progress",{completed:w,total:e.rows.length});return(0,l.useEffect)(()=>{if("finished"!==e.phase)return;let t=window.setTimeout(g,3e3);return()=>window.clearTimeout(t)},[e.id,e.phase,g]),(0,t.jsxs)("section",{"aria-labelledby":j,className:"rounded-xl border bg-card p-4 text-sm",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 space-y-1",role:"status","aria-live":"polite","aria-atomic":"true",children:[(0,t.jsxs)("h2",{id:j,className:"flex items-center gap-2 font-medium",children:[v?(0,t.jsx)(c.f,{"aria-hidden":"true"}):"finished"!==e.phase||y||S||N?null:(0,t.jsx)(s.f,{className:"size-4 text-emerald-600"}),b(e.phase)]}),(0,t.jsx)("p",{children:C}),(0,t.jsx)("p",{className:"text-muted-foreground",children:b("summary",{succeeded:k,failed:y,skipped:I})})]}),!v&&(0,t.jsx)(d.K,{"aria-label":b("dismiss"),onClick:g,size:"icon-sm",variant:"ghost",children:(0,t.jsx)(i.X,{})})]}),(0,t.jsx)("progress",{"aria-label":C,className:"mt-3 h-1.5 w-full accent-primary",max:Math.max(1,e.rows.length),value:w}),e.monitoringError&&(0,t.jsxs)("p",{className:"mt-3 text-amber-700 dark:text-amber-300",children:[b("monitoring")," ",(0,t.jsx)("span",{className:"break-words",children:e.monitoringError})]}),e.monitoringMissingJobs>0&&(0,t.jsx)("p",{className:"mt-3 text-amber-700 dark:text-amber-300",children:b("statusUnavailable")}),S&&(0,t.jsx)("p",{className:"mt-3 text-amber-700 dark:text-amber-300",children:b("refreshWarning")}),e.legacyRefreshRequested&&N&&(0,t.jsx)("p",{className:"mt-3 text-amber-700 dark:text-amber-300",children:b("legacyWarning")}),e.legacyRefreshError&&(0,t.jsxs)("p",{className:"mt-3 break-words text-amber-700 dark:text-amber-300",children:[b("reconciledError")," ",e.legacyRefreshError]}),"refreshFailed"===e.phase&&(0,t.jsxs)("div",{className:"mt-3 space-y-2",role:"alert",children:[(0,t.jsxs)("p",{className:"break-words text-destructive",children:[b("pageUpdateError")," ",e.pageUpdateError]}),(0,t.jsx)(d.K,{onClick:f,size:"sm",variant:"outline",children:b("retry")})]}),"finished"===e.phase&&!S&&!N&&(0,t.jsx)("p",{className:"mt-2 text-muted-foreground",children:b("pageUpdated")}),(0,t.jsxs)("details",{className:"group mt-3",children:[(0,t.jsxs)("summary",{className:"flex w-fit cursor-pointer list-none items-center gap-1 rounded-sm font-medium focus-visible:outline-2 focus-visible:outline-offset-2 [&::-webkit-details-marker]:hidden",children:[(0,t.jsx)(r.f,{className:"size-4 transition-transform group-open:rotate-90"}),b("details")]}),(0,t.jsx)("ul",{className:"mt-3 max-h-80 divide-y overflow-y-auto",children:e.rows.map(e=>(0,t.jsxs)("li",{className:"space-y-2 py-3 first:pt-0 last:pb-0",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("p",{className:"font-medium",children:[e.repositoryName," ",(0,t.jsxs)("span",{className:"font-normal text-muted-foreground",children:["· ",e.agentName]})]}),(0,t.jsx)("p",{className:"break-all font-mono text-xs text-muted-foreground",children:e.folder})]}),(0,t.jsxs)(o.f,{variant:x(e)?"destructive":"SUCCEEDED"===e.status&&!e.worktreeRefreshError&&e.worktreesRefreshedAt?"success":"secondary",children:[m(e)&&(0,t.jsx)(c.f,{"aria-hidden":"true"}),b(h[e.status])]})]}),e.skipReason&&(0,t.jsx)("p",{className:"text-muted-foreground",children:p[e.skipReason]?b(p[e.skipReason]):b("skipUnknown",{reason:e.skipReason})}),e.error&&(0,t.jsx)("p",{className:"break-words text-destructive",children:e.error}),"UNREPORTED"===e.status&&(0,t.jsx)("p",{className:"text-destructive",children:b("notScheduled")}),"SUBMISSION_FAILED"===e.status&&(0,t.jsx)("p",{className:"text-destructive",children:b("submissionFailed")}),e.worktreeRefreshError&&(0,t.jsxs)("p",{className:"break-words text-amber-700 dark:text-amber-300",children:[b("refreshWarning")," ",e.worktreeRefreshError]}),e.jobId&&(0,t.jsx)(d.K,{asChild:!0,size:"sm",variant:"link",className:"h-auto px-0",children:(0,t.jsxs)(u.L,{href:`/dashboard/jobs/${e.jobId}`,target:"_blank",rel:"noreferrer",children:[b("logs")," ",(0,t.jsx)(a.f,{})]})})]},e.codebaseId))})]})]})}],453154);var g=e.i(462777),f=e.i(637611),b=e.i(944887);let j="id agentId payload status error result updatedAt",v=new Set(["SUCCEEDED","FAILED","CANCELLED","TIMED_OUT"]),w=new Set(["starting","fetching","refreshing"]),k={QUEUED:0,RUNNING:1,CANCELLING:2,SUCCEEDED:3,FAILED:3,CANCELLED:3,TIMED_OUT:3};function y(e){e.monitor?.dispose(),e.monitor=null,null!==e.interval&&window.clearInterval(e.interval),e.interval=null,e.unsubscribeRecovery?.(),e.unsubscribeRecovery=null,e.subscriptions.forEach(e=>e()),e.subscriptions.clear()}function I(e){e.controller.abort(),y(e)}function S(e){return e&&"object"==typeof e&&!Array.isArray(e)?e:{}}function N(e){return"string"==typeof e&&e.trim()?e:null}function C(e){return e instanceof Error?e.message:Array.isArray(e)?e.map(C).join("; "):N(S(e).message)??String(e)}function E(e,t){let s=S(t.result);return{...e,status:t.status,jobId:t.id,error:N(S(s.snapshot).error)??t.error,skipReason:null,worktreesRefreshedAt:N(s.worktreesRefreshedAt),worktreeRefreshError:N(s.worktreeRefreshError)}}e.s(["f",0,function({scopeKey:e,refreshPage:t}){let[s,r]=(0,l.useState)(null),a=(0,l.useRef)(null),i=(0,l.useRef)(null);s&&s.scopeKey!==e&&r(null),(0,l.useEffect)(()=>{let t={scopeKey:e};return i.current=t,()=>{i.current===t&&(i.current=null,a.current&&I(a.current),a.current=null)}},[e]);let n=(0,l.useCallback)(e=>a.current===e&&!e.controller.signal.aborted&&i.current?.scopeKey===e.scopeKey&&null!==i.current,[]),o=(0,l.useCallback)((e,t)=>{n(e)&&(e.batch={...e.batch,...t},r({scopeKey:e.scopeKey,batch:e.batch}))},[n]),d=(0,l.useCallback)(async e=>{if(n(e)){if(y(e),o(e,{phase:"refreshing",monitoringError:null,monitoringMissingJobs:0,pageUpdateError:null}),e.batch.rows.some(e=>"SUCCEEDED"===e.status&&!e.worktreesRefreshedAt&&!e.worktreeRefreshError)&&!e.batch.legacyRefreshRequested){o(e,{legacyRefreshRequested:!0});try{await (0,f.W)("mutation RefreshWorktreesAfterFetch { refreshWorktrees }",void 0,{signal:e.controller.signal})}catch(t){if(!n(e))return;o(e,{legacyRefreshError:C(t)})}}if(n(e))try{await e.refreshPage(),o(e,{phase:"finished"})}catch(t){o(e,{phase:"refreshFailed",pageUpdateError:C(t)})}}},[n,o]),c=(0,l.useCallback)(async s=>{if(!i.current||i.current.scopeKey!==e||a.current&&w.has(a.current.batch.phase))return;let r=[...new Map(s.map(e=>[e.codebaseId,e])).values()];if(!r.length)return;a.current&&I(a.current);let l={scopeKey:e,controller:new AbortController,jobs:new Map,monitor:null,interval:null,unsubscribeRecovery:null,subscriptions:new Map,refreshPage:t,batch:{id:(0,g.e)(),phase:"starting",rows:r.map(e=>({...e,status:"STARTING",jobId:null,error:null,skipReason:null,worktreesRefreshedAt:null,worktreeRefreshError:null})),monitoringError:null,monitoringMissingJobs:0,pageUpdateError:null,legacyRefreshRequested:!1,legacyRefreshError:null}};a.current=l,o(l,{});for(let e=0;e<r.length;e+=500){let t=r.slice(e,e+500).map(e=>e.codebaseId),s=new Set(t);try{let e=await (0,f.W)(`mutation FetchWorktreeCodebases($input: RunCodebaseOperationInput!) {
|
|
99
|
+
fetchCodebases(input: $input) {
|
|
100
|
+
jobs { ${j} }
|
|
101
|
+
skipped { codebaseId reason }
|
|
102
|
+
}
|
|
103
|
+
}`,{input:{codebaseIds:t,requestId:l.batch.id}},{signal:l.controller.signal});if(!n(l))return;let r=new Map;for(let t of e.fetchCodebases.jobs){let e=N(S(t.payload).codebaseId);e&&s.has(e)&&(r.set(e,t),l.jobs.set(t.id,t))}let a=new Map(e.fetchCodebases.skipped.map(e=>[e.codebaseId,e.reason]));o(l,{rows:l.batch.rows.map(e=>{if(!s.has(e.codebaseId))return e;let t=r.get(e.codebaseId);if(t)return E(e,t);let i=a.get(e.codebaseId);return{...e,status:void 0===i?"UNREPORTED":"SKIPPED",skipReason:i??null}})})}catch(e){if(!n(l))return;o(l,{rows:l.batch.rows.map(t=>s.has(t.codebaseId)?{...t,status:"SUBMISSION_FAILED",error:C(e)}:t)})}}if(!n(l))return;o(l,{phase:"fetching"});let c=()=>[...l.jobs.values()].filter(e=>!v.has(e.status)).map(e=>e.id),u=()=>{n(l)&&"fetching"===l.batch.phase&&!c().length&&d(l)},h=e=>{if(n(l)&&"fetching"===l.batch.phase){for(let t of e){let e=l.jobs.get(t.id);!(!e||v.has(e.status)&&e.status!==t.status||k[t.status]<k[e.status]||Date.parse(t.updatedAt)<Date.parse(e.updatedAt))&&(l.jobs.set(t.id,t),v.has(t.status)&&(l.subscriptions.get(t.id)?.(),l.subscriptions.delete(t.id)))}o(l,{rows:l.batch.rows.map(e=>{let t=e.jobId?l.jobs.get(e.jobId):null;return t?E(e,t):e})})}};if(!c().length)return void u();let p=(0,b.f)(async e=>{let t=0;try{let s=c();for(let r=0;r<s.length;r+=200){let a=s.slice(r,r+200),i=await (0,f.W)(`query WorktreeFetchJobs($ids: [ID!]!) {
|
|
104
|
+
agentJobsByIds(ids: $ids) { ${j} }
|
|
105
|
+
}`,{ids:a},{signal:e});if(e.aborted||!n(l))return;let o=new Set(i.agentJobsByIds.map(e=>e.id));t+=a.filter(e=>!o.has(e)&&!v.has(l.jobs.get(e).status)).length,h(i.agentJobsByIds)}o(l,{monitoringError:null,monitoringMissingJobs:t})}catch(t){if(e.aborted||!n(l))return;o(l,{monitoringError:C(t)})}u()});l.monitor=p;let m=(0,f.p)();for(let e of c()){let t=m.subscribe({query:`subscription WorktreeFetchJobChanged($jobId: ID!) {
|
|
106
|
+
agentJobChanged(jobId: $jobId) { ${j} }
|
|
107
|
+
}`,variables:{jobId:e}},{next:e=>{n(l)&&e.data?.agentJobChanged&&(h([e.data.agentJobChanged]),u())},error:e=>{n(l)&&"fetching"===l.batch.phase&&(o(l,{monitoringError:C(e)}),p.refresh())},complete:()=>{n(l)&&"fetching"===l.batch.phase&&p.refresh()}});!n(l)||"fetching"!==l.batch.phase||v.has(l.jobs.get(e).status)?t():l.subscriptions.set(e,t)}n(l)&&"fetching"===l.batch.phase&&(l.interval=window.setInterval(()=>void p.refresh(),2e3),l.unsubscribeRecovery=(0,f.g)(()=>void p.refresh()),p.refresh())},[n,o,t,e,d]),u=(0,l.useCallback)(async()=>{let e=a.current;e&&n(e)&&"refreshFailed"===e.batch.phase&&await d(e)},[n,d]),h=(0,l.useCallback)(()=>{let e=a.current;!e||w.has(e.batch.phase)||(I(e),a.current=null,r(null))},[]),p=s&&s.scopeKey===e?s.batch:null;return{batch:p,active:null!==p&&w.has(p.phase),start:c,retryPageUpdate:u,dismiss:h}}],5406)},756283,e=>{var t=e.i(271645),s=e.i(462777),r=e.i(637611),a=e.i(455329);async function i(e){return(await (0,r.W)(a.y,{id:e,requestId:(0,s.e)()})).inspectWorktree}e.s(["I",0,i,"L",0,function(e){let[s,r]=(0,t.useState)(null),a=(0,t.useCallback)(t=>{r(s=>({sourceUpdatedAt:e.updatedAt,value:s?.sourceUpdatedAt===e.updatedAt?{...s.value,...t}:t}))},[e.updatedAt]),i=(0,t.useCallback)(e=>{let t={};null!==e.hasStagedChanges&&(t.hasStagedChanges=e.hasStagedChanges),null!==e.hasUnstagedChanges&&(t.hasUnstagedChanges=e.hasUnstagedChanges),null!==e.rebaseInProgress&&(t.rebaseInProgress=e.rebaseInProgress),null!==e.hasConflicts&&(t.hasConflicts=e.hasConflicts),null!==e.pushStatus&&(t.pushStatus=e.pushStatus),"string"==typeof e.headSha&&Object.assign(t,{branch:e.branch,headSha:e.headSha,upstream:e.upstream,ahead:e.ahead,behind:e.behind,syncState:e.syncState??"UNKNOWN",baseAhead:e.baseAhead,baseBehind:e.baseBehind}),Object.keys(t).length&&a(t)},[a]);return{worktree:s?.sourceUpdatedAt===e.updatedAt?{...e,...s.value}:e,applyActivity:i,setUnstagedChanges:(0,t.useCallback)(e=>a({hasUnstagedChanges:e}),[a])}},"x",0,function(e){let s=(0,t.useRef)(!1),r=(0,t.useRef)(!1);return(0,t.useCallback)(async()=>{if(s.current){r.current=!0;return}s.current=!0;try{do r.current=!1,await e();while(r.current)}finally{s.current=!1}},[e])},"q",0,function(e,s,a){let i=(0,t.useRef)(a);(0,t.useEffect)(()=>{i.current=a},[a]),(0,t.useEffect)(()=>{if(!s)return;let t=!1,a=0,n=null,l=()=>void 0,o=e=>{t||e!==a||null!==n||(n=window.setTimeout(()=>{n=null,d()},1e3))},d=()=>{let t=++a;l=(0,r.p)().subscribe({query:`subscription WorktreeInspectionChanged($worktreeId: ID!) {
|
|
108
|
+
worktreeInspectionChanged(worktreeId: $worktreeId) {
|
|
109
|
+
worktreeId branch headSha upstream ahead behind syncState baseAhead baseBehind
|
|
110
|
+
hasStagedChanges hasUnstagedChanges rebaseInProgress hasConflicts pushStatus observedAt
|
|
111
|
+
}
|
|
112
|
+
}`,variables:{worktreeId:e}},{next:e=>{let t=e.data?.worktreeInspectionChanged;t&&i.current(t)},error:()=>o(t),complete:()=>o(t)})};return d(),()=>{t=!0,a+=1,null!==n&&window.clearTimeout(n),l()}},[s,e])}])},941179,e=>{var t=e.i(843476),s=e.i(113030),r=e.i(263676),a=e.i(271645),i=e.i(948148),n=e.i(501416),l=e.i(519455),o=e.i(906197),d=e.i(987968),c=e.i(462777),u=e.i(637611),h=e.i(440289);e.s(["f",0,function({worktree:e,group:p,onCompleted:m,onError:x}){let g=(0,i.f)("worktrees"),[f,b]=(0,a.useState)(!1);if(!e.rebaseInProgress)return null;let j=p.mergeConflictQuickActions??[],v=async()=>{b(!0);try{let t=await (0,u.W)(`mutation CancelWorktreeRebase($input: RunWorktreeOperationInput!) {
|
|
113
|
+
runWorktreeOperation(input: $input) { id }
|
|
114
|
+
}`,{input:{worktreeId:e.id,operation:"CANCEL_REBASE",requestId:(0,c.e)()}});await (0,h.t)(t.runWorktreeOperation.id),await m(),x(null)}catch(e){x(e instanceof Error?e.message:String(e))}finally{b(!1)}};return(0,t.jsxs)(o.M,{className:"border-destructive/40 bg-[color-mix(in_oklab,var(--destructive)_8%,var(--card))]",size:"sm",variant:"outline",children:[(0,t.jsx)(o.Y,{variant:"icon",children:(0,t.jsx)(s.f,{className:"text-destructive"})}),(0,t.jsxs)(o.H,{children:[(0,t.jsx)(o.$,{children:g("rebasePaused")}),(0,t.jsx)(o.B,{children:g(e.hasConflicts?"rebaseConflicts":"rebaseIncomplete")})]}),(0,t.jsx)(o.P,{children:(0,t.jsxs)(l.K,{disabled:f,onClick:()=>void v(),size:"sm",variant:"outline",children:[f?(0,t.jsx)(d.f,{}):(0,t.jsx)(r.X,{}),g("cancelRebase")]})}),e.hasConflicts&&j.length?(0,t.jsx)(o.o,{className:"-mx-3 -mb-2.5 basis-[calc(100%+(var(--spacing)*6))] rounded-b-lg border-t border-destructive/30 bg-[color-mix(in_oklab,var(--destructive)_16%,var(--card))] px-3 py-2.5",children:(0,t.jsx)(n.f,{sessionData:{worktree:{id:e.id,path:e.folder,branch:e.branch,baseBranch:e.baseBranch,headSha:e.headSha,rebaseInProgress:!0,hasConflicts:!0},codebase:{id:p.codebase.id,folder:p.codebase.folder},repo:{id:p.repository.id,name:p.repository.name,url:p.repository.displayOrigin,displayOrigin:p.repository.displayOrigin}},worktreeId:e.id,workflows:j})}):null]})}])},474040,e=>{var t=e.i(843476),s=e.i(271645),r=e.i(424995),a=e.i(763267),i=e.i(944887),n=e.i(876561),l=e.i(635416),o=e.i(768877),d=e.i(96892),c=e.i(689664),u=e.i(716327),h=e.i(867927),p=e.i(55677),m=e.i(508734),x=e.i(452330),g=e.i(762368),f=e.i(482022),b=e.i(835079),j=e.i(269846),v=e.i(187516),w=e.i(113030),k=e.i(851817),y=e.i(882505),I=e.i(84570),S=e.i(648119),N=e.i(939050),C=e.i(506184),E=e.i(515281),R=e.i(77071),A=e.i(741120),T=e.i(395925),D=e.i(856522),W=e.i(566595),$=e.i(868401),P=e.i(604139),B=e.i(759659),O=e.i(725981),L=e.i(861745),q=e.i(948148),U=e.i(90969),_=e.i(487956),M=e.i(771777),K=e.i(866026),F=e.i(448295),V=e.i(966264),z=e.i(501416),H=e.i(653269),J=e.i(647776),G=e.i(492103),Y=e.i(792856),X=e.i(622558),Q=e.i(834471),Z=e.i(852077),ee=e.i(243048),et=e.i(227286),es=e.i(948812),er=e.i(356505),ea=e.i(486122),ei=e.i(929592),en=e.i(487486),el=e.i(519455),eo=e.i(515288),ed=e.i(257428),ec=e.i(776639),eu=e.i(755146),eh=e.i(82612),ep=e.i(793479),em=e.i(906197),ex=e.i(110204),eg=e.i(337822),ef=e.i(983913),eb=e.i(987968),ej=e.i(967489),ev=e.i(784774),ew=e.i(808562),ek=e.i(624687),ey=e.i(462777),eI=e.i(360583),eS=e.i(171502),eN=e.i(637611),eC=e.i(975157),eE=e.i(520133),eR=e.i(284494),eA=e.i(539531),eT=e.i(942230),eD=e.i(453154),eW=e.i(5406),e$=e.i(455329),eP=e.i(756283),eB=e.i(440289),eO=e.i(753790),eL=e.i(941179),eq=e.i(940276);let eU=["gray","stone","red","rose","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","lavender","maroon","brown","olive","navy"],e_="worktrees-layout",eM="worktrees-group-by",eK="worktrees-filters",eF="__all__",eV="dirty",ez="clean",eH="non-default",eJ="open-pull-requests";function eG(e){return e?`${eK}:${e}`:eK}function eY(e){return e.hasStagedChanges||e.hasUnstagedChanges}function eX(e,t){let s=t.key.trim().toUpperCase();return{...e,agents:e.agents.map(e=>({...e,codebases:e.codebases.map(e=>({...e,worktrees:e.worktrees.map(e=>e.ticketKey?.trim().toUpperCase()===s?{...e,ticketTitle:t.summary,ticketStatus:t.status}:e)}))}))}}function eQ(e,t){return e.some(e=>("string"==typeof e||"number"==typeof e)&&String(e).toLocaleLowerCase().includes(t))}let eZ={gray:"border-slate-500/40 bg-slate-500/15 text-slate-700 dark:text-slate-300",stone:"border-stone-500/40 bg-stone-500/15 text-stone-700 dark:text-stone-300",red:"border-red-500/40 bg-red-500/15 text-red-700 dark:text-red-300",rose:"border-rose-500/40 bg-rose-500/15 text-rose-700 dark:text-rose-300",orange:"border-orange-500/40 bg-orange-500/15 text-orange-700 dark:text-orange-300",amber:"border-amber-500/40 bg-amber-500/15 text-amber-800 dark:text-amber-300",yellow:"border-yellow-500/40 bg-yellow-500/15 text-yellow-800 dark:text-yellow-300",lime:"border-lime-500/40 bg-lime-500/15 text-lime-800 dark:text-lime-300",green:"border-green-500/40 bg-green-500/15 text-green-700 dark:text-green-300",emerald:"border-emerald-500/40 bg-emerald-500/15 text-emerald-700 dark:text-emerald-300",teal:"border-teal-500/40 bg-teal-500/15 text-teal-700 dark:text-teal-300",cyan:"border-cyan-500/40 bg-cyan-500/15 text-cyan-700 dark:text-cyan-300",sky:"border-sky-500/40 bg-sky-500/15 text-sky-700 dark:text-sky-300",blue:"border-blue-500/40 bg-blue-500/15 text-blue-700 dark:text-blue-300",indigo:"border-indigo-500/40 bg-indigo-500/15 text-indigo-700 dark:text-indigo-300",violet:"border-violet-500/40 bg-violet-500/15 text-violet-700 dark:text-violet-300",purple:"border-purple-500/40 bg-purple-500/15 text-purple-700 dark:text-purple-300",fuchsia:"border-fuchsia-500/40 bg-fuchsia-500/15 text-fuchsia-700 dark:text-fuchsia-300",pink:"border-pink-500/40 bg-pink-500/15 text-pink-700 dark:text-pink-300",lavender:"border-lavender-500/40 bg-lavender-500/15 text-lavender-700 dark:text-lavender-300",maroon:"border-maroon-500/40 bg-maroon-500/15 text-maroon-700 dark:text-maroon-300",brown:"border-brown-500/40 bg-brown-500/15 text-brown-700 dark:text-brown-300",olive:"border-olive-500/40 bg-olive-500/15 text-olive-700 dark:text-olive-300",navy:"border-navy-500/40 bg-navy-500/15 text-navy-700 dark:text-navy-300"},e0={gray:"border-slate-600 bg-slate-500",stone:"border-stone-600 bg-stone-500",red:"border-red-600 bg-red-500",rose:"border-rose-600 bg-rose-500",orange:"border-orange-600 bg-orange-500",amber:"border-amber-600 bg-amber-500",yellow:"border-yellow-600 bg-yellow-500",lime:"border-lime-600 bg-lime-500",green:"border-green-600 bg-green-500",emerald:"border-emerald-600 bg-emerald-500",teal:"border-teal-600 bg-teal-500",cyan:"border-cyan-600 bg-cyan-500",sky:"border-sky-600 bg-sky-500",blue:"border-blue-600 bg-blue-500",indigo:"border-indigo-600 bg-indigo-500",violet:"border-violet-600 bg-violet-500",purple:"border-purple-600 bg-purple-500",fuchsia:"border-fuchsia-600 bg-fuchsia-500",pink:"border-pink-600 bg-pink-500",lavender:"border-lavender-600 bg-lavender-500",maroon:"border-maroon-600 bg-maroon-500",brown:"border-brown-600 bg-brown-500",olive:"border-olive-600 bg-olive-500",navy:"border-navy-600 bg-navy-500"},e1={gray:"hover:bg-slate-500 data-[state=on]:bg-slate-500",stone:"hover:bg-stone-500 data-[state=on]:bg-stone-500",red:"hover:bg-red-500 data-[state=on]:bg-red-500",rose:"hover:bg-rose-500 data-[state=on]:bg-rose-500",orange:"hover:bg-orange-500 data-[state=on]:bg-orange-500",amber:"hover:bg-amber-500 data-[state=on]:bg-amber-500",yellow:"hover:bg-yellow-500 data-[state=on]:bg-yellow-500",lime:"hover:bg-lime-500 data-[state=on]:bg-lime-500",green:"hover:bg-green-500 data-[state=on]:bg-green-500",emerald:"hover:bg-emerald-500 data-[state=on]:bg-emerald-500",teal:"hover:bg-teal-500 data-[state=on]:bg-teal-500",cyan:"hover:bg-cyan-500 data-[state=on]:bg-cyan-500",sky:"hover:bg-sky-500 data-[state=on]:bg-sky-500",blue:"hover:bg-blue-500 data-[state=on]:bg-blue-500",indigo:"hover:bg-indigo-500 data-[state=on]:bg-indigo-500",violet:"hover:bg-violet-500 data-[state=on]:bg-violet-500",purple:"hover:bg-purple-500 data-[state=on]:bg-purple-500",fuchsia:"hover:bg-fuchsia-500 data-[state=on]:bg-fuchsia-500",pink:"hover:bg-pink-500 data-[state=on]:bg-pink-500",lavender:"hover:bg-lavender-500 data-[state=on]:bg-lavender-500",maroon:"hover:bg-maroon-500 data-[state=on]:bg-maroon-500",brown:"hover:bg-brown-500 data-[state=on]:bg-brown-500",olive:"hover:bg-olive-500 data-[state=on]:bg-olive-500",navy:"hover:bg-navy-500 data-[state=on]:bg-navy-500"};function e5({moves:e,onReload:r,onError:a,onNotice:i}){let n=(0,q.f)("worktrees"),[l,o]=(0,s.useState)(null),d=async e=>{o(e.id);try{await (0,eN.W)(`mutation RetryWorktreeMove($id: ID!) {
|
|
115
|
+
retryWorktreeMoveWithStash(id: $id) { id status }
|
|
116
|
+
}`,{id:e.id});let t=await (0,eB.D)(e.id);if("FAILED"===t.status)throw Error(t.error||n("moveFailed"));i("SUCCEEDED_WITH_WARNING"===t.status?t.warning||n("moveCompletedWithWarning"):n("moveCompleted")),a(null),await r()}catch(e){a(e instanceof Error?e.message:String(e))}finally{o(null)}},c=async e=>{o(e.id);try{await (0,eN.W)(`mutation CancelWorktreeMove($id: ID!) {
|
|
117
|
+
cancelWorktreeMove(id: $id) { id status }
|
|
118
|
+
}`,{id:e.id}),i(n("moveCancelled")),a(null),await r()}catch(e){a(e instanceof Error?e.message:String(e))}finally{o(null)}};return(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,t.jsx)(ei.J,{children:(0,t.jsxs)(ei.p,{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:n("moveProgress",{branch:e.branch})}),(0,t.jsx)("p",{className:"text-muted-foreground",children:"AWAITING_STASH"===e.status?e.error||n("moveNeedsStash"):n(`moveStatus.${e.status}`)})]}),"AWAITING_STASH"===e.status?(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(el.K,{disabled:l===e.id,onClick:()=>void c(e),size:"sm",variant:"outline",children:n("cancelMove")}),(0,t.jsxs)(el.K,{disabled:l===e.id,onClick:()=>void d(e),size:"sm",children:[l===e.id&&(0,t.jsx)(eb.f,{}),n("stashAndContinue")]})]}):(0,t.jsx)(eb.f,{})]})},e.id))})}function e2(e,t){return{codebaseId:e.codebase.id,...t?{worktreeId:t.id}:{},defaultBranch:e.codebase.defaultBranch,currentBranch:t?.branch,currentBaseBranch:t?.baseBranch,localBranches:e.codebase.localBranches,remoteBranches:e.codebase.remoteBranches,unavailableBranches:e.worktrees.flatMap(e=>e.branch&&e.id!==t?.id?[e.branch]:[])}}function e4({overview:e,onCreated:r}){let a=(0,q.f)("worktrees"),i=e.agents.flatMap(e=>e.codebases.flatMap(t=>"ONLINE"===e.agent.connectionStatus&&e.agent.capabilities.includes("worktree.branch")&&"AVAILABLE"===t.codebase.availability&&!t.blockingJob?[{agentGroup:e,group:t}]:[])),[n,l]=(0,s.useState)(1===i.length?i[0].group.codebase.id:""),[o,d]=(0,s.useState)(!1),c=i.some(e=>e.group.codebase.id===n)?n:1===i.length?i[0].group.codebase.id:"",u=i.find(e=>e.group.codebase.id===c),h=i.map(({agentGroup:e,group:t})=>({value:t.codebase.id,label:`${t.repository.name} \xb7 ${e.agent.name}`,description:t.codebase.folder,keywords:`${t.repository.displayOrigin} ${e.agent.hostname}`})),p=async e=>{if(!u)throw Error(a("selectCodebase"));d(!0);try{let t=await (0,eN.W)(`mutation CreateWorktree($input: CreateWorktreeInput!) {
|
|
119
|
+
createWorktree(input: $input) { id }
|
|
120
|
+
}`,{input:{codebaseId:u.group.codebase.id,selection:e,requestId:(0,ey.e)()}});await (0,eB.t)(t.createWorktree.id),await r()}finally{d(!1)}};return(0,t.jsxs)(eo.N,{children:[(0,t.jsx)(eo.Y,{children:(0,t.jsx)(eo.v,{children:a("createWorktree")})}),(0,t.jsxs)(eo.O,{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(ex.f,{className:"mb-1.5 block",children:a("repositoryCheckout")}),(0,t.jsx)(ef.f,{ariaLabel:a("repositoryCheckout"),disabled:o||0===h.length,emptyMessage:a("noEligibleCodebases"),onValueChange:l,options:h,placeholder:a("selectCodebase"),searchPlaceholder:a("searchCodebases"),value:c})]}),u?(0,t.jsx)(eR.f,{busy:o,onSubmit:p,submitLabel:a("createWorktree"),target:e2(u.group)},u.group.codebase.id):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:h.length?a("selectCodebaseHelp"):a("noEligibleCodebases")})]})]})}function e3({agent:e}){let s=(0,q.f)("worktrees"),r="ONLINE"===e.connectionStatus;return(0,t.jsx)(en.f,{variant:r?"success":"secondary",children:s(r?"online":"offline")})}function e7({agentGroup:e,group:r,layout:a,...i}){let n={...i,agentName:e.agent.name,baseRepoDirectory:e.agent.baseRepoDirectory,branchManagementEnabled:"ONLINE"===e.agent.connectionStatus&&e.agent.capabilities.includes("worktree.branch"),group:r,liveUpdatesEnabled:"ONLINE"===e.agent.connectionStatus&&e.agent.capabilities.includes("worktree.watch")};return"cards"!==a?(0,t.jsx)(tw,{...n}):(0,t.jsx)("div",{className:"space-y-3",children:r.worktrees.map(e=>(0,s.createElement)(te,{...n,key:e.id,worktree:e}))})}function e6({agentGroup:e,...s}){return(0,t.jsxs)("section",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b pb-2",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold",children:e.agent.name}),(0,t.jsx)(e3,{agent:e.agent})]}),e.codebases.map(r=>(0,t.jsxs)("section",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"font-medium",children:r.repository.name}),(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:r.repository.displayOrigin})]}),(0,t.jsx)(e9,{codebase:r.codebase})]}),(0,t.jsx)(e7,{...s,agentGroup:e,group:r})]},r.codebase.id))]})}function e8({repositoryGroup:e,...s}){return(0,t.jsxs)("section",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b pb-2",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold",children:e.repository.name}),(0,t.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:e.repository.displayOrigin})]}),e.entries.map(({agentGroup:e,group:r})=>(0,t.jsxs)("section",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("h3",{className:"font-medium",children:e.agent.name}),(0,t.jsx)(e3,{agent:e.agent})]}),(0,t.jsx)(e9,{codebase:r.codebase})]}),(0,t.jsx)(e7,{...s,agentGroup:e,group:r})]},r.codebase.id))]})}function e9({codebase:e}){let r=(0,q.f)("worktrees"),a=(0,L.X)(),[i,n]=(0,s.useState)(null);(0,s.useEffect)(()=>{let e=()=>n(new Date().getTime()),t=window.setTimeout(e,0),s=window.setInterval(e,1e3);return()=>{window.clearTimeout(t),window.clearInterval(s)}},[]);let l=e.lastFetchedAt&&null!==i?Math.max(0,i-new Date(e.lastFetchedAt).getTime()):null,o=null===l?r("neverFetched"):l<6e4?r("secondsAgo",{count:Math.floor(l/1e3)}):(0,eI.l)(e.lastFetchedAt,"relative",{locale:a,now:i??void 0});return(0,t.jsx)("span",{className:(0,eC.f)("text-xs text-muted-foreground",e.lastFetchError&&"text-destructive"),title:e.lastFetchError??void 0,children:r("lastFetched",{value:o})})}function te(e){let{inspectionRefreshToken:r}=e,{worktree:a,applyActivity:i,setUnstagedChanges:n}=(0,eP.L)(e.worktree),[l,o]=(0,s.useState)(null),d={...e,worktree:a,onError:o},[c,p]=(0,s.useState)(!1),[m,x]=(0,s.useState)(null),[g,f]=(0,s.useState)(!1),[b,j]=(0,s.useState)(null),v=(0,s.useRef)(0),w=(0,s.useRef)(r),k=(0,q.f)("worktrees"),y=(0,eE.U)(),I=(0,s.useCallback)(async()=>{let e=++v.current;f(!0);try{let t=await (0,eP.I)(a.id);if(e!==v.current)return;x(t),n(t.changes.some(e=>e.unstaged||e.untracked||e.conflicted)),j(null)}catch(t){e===v.current&&j(t instanceof Error?t.message:String(t))}finally{e===v.current&&f(!1)}},[n,a.id]),S=(0,eP.x)(I),N=(0,s.useCallback)(e=>{i(e),c&&S()},[i,c,S]);(0,eP.q)(a.id,e.liveUpdatesEnabled&&"AVAILABLE"===a.availability,N),(0,s.useEffect)(()=>{if(w.current===r||(w.current=r,!c))return;let e=window.setTimeout(()=>void S(),0);return()=>window.clearTimeout(e)},[c,r,S]);let C=()=>{let e=!c;p(e),e&&!m&&S()};return(0,t.jsxs)(eo.N,{className:(0,eC.f)("cursor-pointer transition-colors hover:bg-muted/30",a.highlightColor&&eS.m[a.highlightColor]),onClick:e=>{(0,eq.g)(e)&&y.push((0,eq.P)(a.id))},children:[(0,t.jsxs)(eo.Y,{className:"grid-cols-1! @md/card-header:grid-cols-[minmax(0,1fr)_auto]!",children:[(0,t.jsxs)(eo.v,{className:"min-w-0",children:[(0,t.jsxs)(el.K,{"aria-expanded":c,className:"h-auto w-full max-w-full justify-start gap-1 p-1 text-left",onClick:()=>void C(),variant:"ghost",children:[c?(0,t.jsx)(u.f,{}):(0,t.jsx)(h.f,{}),(0,t.jsx)("span",{className:"truncate font-mono",children:a.branch??a.headSha?.slice(0,10)??k("detached")})]}),(a.ticketKey||a.ticketTitle)&&(0,t.jsx)(ts,{...d})]}),(0,t.jsxs)(eo.e,{className:"col-start-1 row-span-1 row-start-auto flex max-w-full flex-wrap items-center justify-start gap-1 justify-self-start @md/card-header:col-start-2 @md/card-header:row-span-2 @md/card-header:row-start-1 @md/card-header:justify-end @md/card-header:justify-self-end",children:[(0,t.jsx)(td,{worktree:a}),eY(a)&&(0,t.jsx)(en.f,{variant:"destructive",children:k("dirty")}),(0,t.jsx)(th,{...d})]})]}),(0,t.jsxs)(eo.O,{className:"space-y-4",children:[(0,t.jsx)(tr,{...d,detailsExpanded:c,onToggleDetails:C}),(0,t.jsx)(eL.f,{group:e.group,onCompleted:e.onReload,onError:o,worktree:a}),g&&(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(eb.f,{})," ",k("loadingDetails")]}),c&&(0,t.jsx)(eO.f,{error:b}),c&&m&&(0,t.jsx)(eT.m,{detail:m,inline:!0,worktreeId:a.id,worktreeFolder:a.folder})]}),(0,t.jsxs)(eo.S,{className:"flex-col items-stretch gap-2","data-worktree-navigation-ignore":!0,children:[(0,t.jsx)(eO.f,{error:l,onDismiss:()=>o(null)}),(0,t.jsx)(tf,{...d,onCompleted:async()=>{await e.onReload(),c&&await S()}}),(0,t.jsx)(eA.f,{first:(0,t.jsx)(z.f,{className:"w-auto",sessionData:{worktree:{id:a.id,path:a.folder,branch:a.branch,baseBranch:a.baseBranch,headSha:a.headSha},codebase:{id:e.group.codebase.id,folder:e.group.codebase.folder},repo:{id:e.group.repository.id,name:e.group.repository.name,url:e.group.repository.displayOrigin,displayOrigin:e.group.repository.displayOrigin}},worktreeId:a.id,workflows:e.group.quickActions??[]}),second:(0,t.jsx)(H.f,{agentCapabilities:e.overview.agents.find(t=>t.codebases.some(t=>t.codebase.id===e.group.codebase.id))?.agent.capabilities??[],className:"w-auto",worktreeId:a.id})})]})]})}function tt({worktree:e}){let s=(0,q.f)("worktrees"),r=e.branch??e.headSha?.slice(0,10)??s("detached"),a=s("openWorktreeDetails",{branch:r});return(0,t.jsx)(el.K,{asChild:!0,size:"icon-sm",variant:"ghost",children:(0,t.jsx)(eE.L,{"aria-label":a,href:(0,eq.P)(e.id),title:a,children:(0,t.jsx)(o.f,{})})})}function ts({worktree:e,onOpenTicket:s,compact:r=!1}){let a=`${e.ticketKey??""}${e.ticketTitle?`${e.ticketKey?" — ":""}${e.ticketTitle}`:""}`;return(0,t.jsxs)("div",{className:(0,eC.f)("flex max-w-full flex-wrap items-center gap-1.5 font-normal",r?"mt-0.5 text-xs":"mt-1 text-sm"),children:[e.ticketKey?(0,t.jsx)(el.K,{className:"h-auto min-w-0 justify-start truncate p-0 text-left font-normal",onClick:()=>s(e.ticketKey),title:a,type:"button",variant:"link",children:a}):(0,t.jsx)("p",{className:"min-w-0 truncate text-muted-foreground",title:a,children:a}),e.ticketStatus&&(e.ticketKey?(0,t.jsx)(en.f,{asChild:!0,variant:"secondary",children:(0,t.jsx)("button",{onClick:()=>s(e.ticketKey),type:"button",children:e.ticketStatus})}):(0,t.jsx)(en.f,{variant:"secondary",children:e.ticketStatus}))]})}function tr(e){let{worktree:s,group:r,agentName:a,baseRepoDirectory:i,detailsExpanded:n,onToggleDetails:l}=e,o=(0,q.f)("worktrees");return(0,t.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,t.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,t.jsx)(tI,{label:o("path"),mono:!0,value:(0,_.f)(s.folder,i)}),(0,t.jsx)(tc,{...e})]}),(0,t.jsxs)(ti,{label:o("upToDate"),children:[(0,t.jsx)(tl,{worktree:s}),(0,t.jsx)("span",{className:"pl-6 text-xs text-muted-foreground",children:o("agent")}),(0,t.jsx)(en.f,{variant:"outline",children:a})]}),(0,t.jsx)(tn,{...e}),(0,t.jsx)(ti,{label:o("pullRequest"),children:(0,t.jsx)(to,{detailsExpanded:n,onPipelinesChanged:e.onReload,onToggleDetails:l,worktree:s})}),s.latestBuild&&(0,t.jsx)(ta,{build:s.latestBuild,onCompleted:e.onReload,onError:e.onError}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[s.statusError&&(0,t.jsx)("span",{className:"text-xs text-destructive",children:s.statusError}),!r.codebase.defaultBranch&&!s.baseBranchOverride&&(0,t.jsx)("span",{className:"text-xs text-destructive",children:o("baseUnavailable")})]})]})}function ta({build:e,onCompleted:s,onError:a}){let i=(0,q.f)("worktrees"),n=(0,q.f)("builds"),l="SUCCEEDED"===e.status&&e.artifacts.some(e=>"RUNNABLE_APP"===e.kind),{rebuild:o,rebuilding:d}=(0,M.v)({buildId:e.id,onCompleted:()=>s(),onError:a});return(0,t.jsxs)(ti,{label:i("latestBuild"),children:[(0,t.jsxs)(eu.G,{children:[(0,t.jsx)(eu.X,{asChild:!0,children:(0,t.jsx)(en.f,{asChild:!0,variant:"outline",children:(0,t.jsxs)("button",{type:"button",children:[n(`actions.${e.action}`),(0,t.jsx)(u.f,{})]})})}),(0,t.jsxs)(eu.L,{align:"start",className:"w-36",children:[(0,t.jsx)(eu.r,{asChild:!0,children:(0,t.jsxs)(eE.L,{href:`/dashboard/builds/${e.id}`,children:[(0,t.jsx)(f.f,{}),n("viewBuild")]})}),(0,t.jsxs)(eu.r,{disabled:d,onSelect:()=>void o(),children:[d?(0,t.jsx)(eb.f,{}):(0,t.jsx)(T.f,{}),n("rebuild")]})]})]}),"SUCCEEDED"===e.status?(0,t.jsx)(en.f,{asChild:!0,variant:(0,U.P)(e.status),children:(0,t.jsx)(eE.L,{href:`/dashboard/builds/${e.id}`,children:n(`statuses.${e.status}`)})}):(0,t.jsx)(en.f,{variant:(0,U.P)(e.status),children:n(`statuses.${e.status}`)}),e.outOfDate&&(0,t.jsx)(r.f,{buildId:e.id,onCompleted:()=>s(),onError:a}),l&&(0,t.jsx)(K.f,{buildId:e.id,destinationType:e.destinationType,onCompleted:s,onError:a,preferredDestination:e.destination,size:"sm"})]})}function ti({label:e,children:s}){return(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("p",{className:"w-24 shrink-0 text-xs text-muted-foreground",children:e}),(0,t.jsx)("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:s})]})}function tn({compact:e=!1,...s}){let{worktree:r}=s,a=(0,q.f)("worktrees");return(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[!e&&(0,t.jsx)("span",{className:"w-24 shrink-0 text-xs text-muted-foreground",children:a("tags")}),(0,t.jsx)(th,{...s,contentAlign:e?"end":"start",contentAlignOffset:e?0:-100,trigger:(0,t.jsx)(el.K,{"aria-label":`${a("tags")}: ${r.branch??a("detached")}`,className:(0,eC.f)("h-auto min-h-7 max-w-full justify-start px-1 py-1 text-left font-normal",!e&&"-mx-1"),type:"button",variant:"ghost",children:(0,t.jsxs)("span",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[r.tags.map(e=>(0,t.jsx)(ty,{tag:e},e.id)),!r.tags.length&&(0,t.jsx)("span",{className:"text-muted-foreground",children:"—"})]})})})]})}function tl({worktree:e}){let s=(0,q.f)("worktrees"),r=0===e.baseBehind;return(0,t.jsx)(en.f,{className:r?"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":null===e.baseBehind?void 0:"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",variant:"outline",children:null===e.baseBehind?s("unknown"):r?s("yes"):s("notUpToDate",{count:e.baseBehind})})}function to({worktree:e,detailsExpanded:s,onPipelinesChanged:r,onToggleDetails:a}){var i;let n=(0,q.f)("worktrees"),l=e.baseAhead??0,o=e.sourceControlRequest?.provider==="GITLAB"?e.sourceControlRequest:null;return(0,t.jsxs)(t.Fragment,{children:[e.pullRequest?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(G.f,{label:`PR #${e.pullRequest.number}`,pullRequest:e.pullRequest,requestSource:"WORKTREES"}),(0,t.jsx)(J.w,{pipelineStatus:e.pullRequest.pipelineStatus,pipelines:e.pullRequest.pipelines,pipelineRevision:e.pullRequest.pipelineRevision,headSha:e.pullRequest.headRefOid,repositoryId:e.pullRequest.repositoryGithubId,repositoryNameWithOwner:e.pullRequest.repositoryNameWithOwner,repositoryUrl:e.pullRequest.repositoryUrl,requestSource:"WORKTREES"}),(0,t.jsx)(X.f,{requestId:e.pullRequest.id,requestLabel:`PR #${e.pullRequest.number}`,requestUrl:e.pullRequest.url,worktreeId:e.id,children:(0,t.jsx)(en.f,{className:"APPROVED"===(i=e.pullRequest.reviewDecision)?"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":"CHANGES_REQUESTED"===i?"border-red-500/30 bg-red-500/10 text-red-700 dark:text-red-300":"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",children:n(`review.${e.pullRequest.reviewDecision}`)})},`github:${e.id}:${e.pullRequest.id}`),(0,t.jsx)(en.f,{asChild:!0,className:0===e.pullRequest.unresolvedReviewThreadCount?"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",children:(0,t.jsx)(eE.L,{href:(0,es.o)(e.pullRequest),children:n("comments",{count:e.pullRequest.unresolvedReviewThreadCount})})})]}):o?(0,t.jsx)(Q.f,{label:`MR !${o.number}`,mergeRequest:{iid:o.number,projectId:o.projectId,title:o.title,webUrl:o.url,state:o.state,worktreeId:o.worktreeId}}):null,(0,t.jsx)(et.f,{onChanged:r,pipelines:e.gitLabPipelines??[]}),o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(X.f,{requestId:o.id,requestLabel:`MR !${o.number}`,requestUrl:o.url,worktreeId:e.id,children:(0,t.jsx)(ee.b,{state:o.approvalState})},`gitlab:${e.id}:${o.id}`),o.projectId?(0,t.jsx)(en.f,{asChild:!0,className:null==o.unresolvedDiscussionsCount?ee.Y.neutral:0===o.unresolvedDiscussionsCount?ee.Y.success:ee.Y.warning,children:(0,t.jsx)(eE.L,{href:(0,Z.s)({projectId:o.projectId,iid:o.number}),children:n("comments",{count:o.unresolvedDiscussionsCount??"—"})})}):null]}):null,e.pullRequest||o||(e.gitLabPipelines??[]).length||0!==l?null:(0,t.jsx)("span",{className:"text-muted-foreground",children:"—"}),l>0&&(a?(0,t.jsx)(en.f,{asChild:!0,variant:"secondary",children:(0,t.jsx)("button",{"aria-expanded":s,onClick:a,type:"button",children:n("branchCommits",{count:l})})}):(0,t.jsx)(en.f,{variant:"secondary",children:n("branchCommits",{count:l})}))]})}function td({worktree:e}){var s,r;let a=(0,q.f)("worktrees");if("IN_SYNC"===e.syncState||0===e.ahead&&0===e.behind)return(0,t.jsx)(en.f,{className:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",variant:"outline",children:a("inSync")});let i=e.ahead??0,n=e.behind??0;return i>0||n>0?(0,t.jsxs)(t.Fragment,{children:[i>0&&(0,t.jsxs)(en.f,{className:"border-blue-500/30 bg-blue-500/10 text-blue-700 dark:text-blue-300",variant:"outline",children:[(0,t.jsx)(d.f,{"data-icon":"inline-start"}),a("ahead",{count:i})]}),n>0&&(0,t.jsxs)(en.f,{className:"border-blue-500/30 bg-blue-500/10 text-blue-700 dark:text-blue-300",variant:"outline",children:[(0,t.jsx)(l.f,{"data-icon":"inline-start"}),a("behind",{count:n})]})]}):(0,t.jsx)(en.f,{variant:"outline",children:(s=e,r=a,"AHEAD"===s.syncState?r("ahead",{count:s.ahead??0}):"BEHIND"===s.syncState?r("behind",{count:s.behind??0}):r("DIVERGED"===s.syncState?"diverged":"IN_SYNC"===s.syncState?"upToDate":"NO_UPSTREAM"===s.syncState?"unpublished":"DETACHED"===s.syncState?"detached":"unknown"))})}function tc(e){let{worktree:r,group:a,onUpdate:i,onError:n,compact:l=!1}=e,o=(0,q.f)("worktrees"),[d,c]=(0,s.useState)(!1),[u,h]=(0,s.useState)(!1),p="__inherit_remote_default__",m=Array.from(new Set([r.baseBranchOverride,a.codebase.defaultBranch,...a.codebase.remoteBranches].filter(e=>!!e))),x=async e=>{h(!0);try{let t=await (0,eN.W)(`mutation UpdateWorktreeBase($id: ID!, $baseBranch: String) {
|
|
121
|
+
updateWorktreeBaseBranch(id: $id, baseBranch: $baseBranch) { ${e$.Y} }
|
|
122
|
+
}`,{id:r.id,baseBranch:e||null});i(t.updateWorktreeBaseBranch),n(null),c(!1)}catch(e){n(e instanceof Error?e.message:String(e))}finally{h(!1)}};return(0,t.jsxs)("div",{className:"min-w-0",children:[!l&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:o("baseBranch")}),(0,t.jsx)("div",{className:(0,eC.f)("flex min-h-6 min-w-0 items-center gap-1",!l&&"mt-0.5"),children:d?(0,t.jsxs)(ej.d,{disabled:u,onOpenChange:c,onValueChange:e=>void x(e===p?"":e),open:d,value:r.baseBranchOverride??(a.codebase.defaultBranch?p:void 0),children:[(0,t.jsx)(ej.P,{"aria-label":o("baseBranch"),className:"h-7 min-w-40 max-w-full font-mono text-xs",size:"sm",children:(0,t.jsx)(ej.U,{placeholder:o("baseUnavailable")})}),(0,t.jsxs)(ej.r,{align:"start",children:[a.codebase.defaultBranch&&(0,t.jsxs)(ej.T,{value:p,children:[a.codebase.defaultBranch," · ",o("inheritBase")]}),m.map(e=>(0,t.jsx)(ej.T,{value:e,children:e},e))]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:r.baseBranch??void 0,children:r.baseBranch??"—"}),(0,t.jsx)(el.K,{"aria-label":o("editBase"),onClick:()=>c(!0),size:"icon-xs",variant:"ghost",children:(0,t.jsx)(E.f,{})})]})})]})}function tu(e,t){let s=t.activeMoves.some(t=>t.sourceCodebaseId===e.group.codebase.id||t.targetCodebaseId===e.group.codebase.id);return"ONLINE"===e.agentGroup.agent.connectionStatus&&e.agentGroup.agent.capabilities.includes("worktree.move.checkout")&&"AVAILABLE"===e.group.codebase.availability&&!e.group.blockingJob&&!s}function th(e){var r,a,i;let n,l,{worktree:o,allTags:d,editorVariant:c,onUpdate:u,onError:h,onManageTags:p,contentAlign:g="end",contentAlignOffset:f=0,trigger:w}=e,k=(0,q.f)("worktrees"),[y,I]=(0,s.useState)(!1),[E,T]=(0,s.useState)(!1),[D,W]=(0,s.useState)(!1),[P,O]=(0,s.useState)(!1),[L,U]=(0,s.useState)(!1),[M,K]=(0,s.useState)(!1),[F,V]=(0,s.useState)(null),[z,H]=(0,s.useState)(null),J=(0,s.useRef)(!1),G=(n=e.overview.agents.find(t=>t.codebases.some(t=>t.codebase.id===e.group.codebase.id)))?e.overview.agents.flatMap(t=>t.agent.id===n.agent.id?[]:t.codebases.flatMap(s=>s.repository.id===e.group.repository.id?[{agentGroup:t,group:s}]:[])):[],Y=(l=e.overview.agents.find(t=>t.codebases.some(t=>t.codebase.id===e.group.codebase.id)))&&"ONLINE"===l.agent.connectionStatus&&l.agent.capabilities.includes("worktree.move.push")?"AVAILABLE"!==e.worktree.availability||e.group.blockingJob||e.worktree.rebaseInProgress||e.overview.activeMoves.some(t=>t.sourceCodebaseId===e.group.codebase.id||t.targetCodebaseId===e.group.codebase.id)?k("moveBlocked.busy"):e.worktree.branch&&e.worktree.headSha?e.worktree.hasStagedChanges||e.worktree.hasUnstagedChanges||"DIRTY"===e.worktree.pushStatus?k("moveBlocked.dirty"):"BEHIND"===e.worktree.pushStatus?k("moveBlocked.behind"):"DIVERGED"===e.worktree.pushStatus?k("moveBlocked.diverged"):"READY"!==e.worktree.pushStatus?k("moveBlocked.unknown"):G.some(t=>tu(t,e.overview))?null:k("moveBlocked.destination"):k("moveBlocked.detached"):k("moveBlocked.agent"),X=e.overview.agents.find(t=>t.codebases.some(t=>t.codebase.id===e.group.codebase.id)),Q=!X||"ONLINE"!==X.agent.connectionStatus||!X.agent.capabilities.includes("worktree.delete")||"AVAILABLE"!==o.availability||!!e.group.blockingJob||o.rebaseInProgress||e.overview.activeMoves.some(t=>t.sourceCodebaseId===e.group.codebase.id||t.targetCodebaseId===e.group.codebase.id),Z=new Set(o.tags.map(e=>e.id)),ee=async(e,t)=>{let s=t?[...Z,e]:[...Z].filter(t=>t!==e);try{let e=await (0,eN.W)(`mutation SetWorktreeTags($id: ID!, $tagIds: [ID!]!) { setWorktreeTags(id: $id, tagIds: $tagIds) { ${e$.Y} } }`,{id:o.id,tagIds:s});u(e.setWorktreeTags),h(null)}catch(e){h(e instanceof Error?e.message:String(e))}},et=async e=>{try{let t=await (0,eN.W)(`mutation HighlightWorktree($id: ID!, $color: String) { updateWorktreeHighlight(id: $id, color: $color) { ${e$.Y} } }`,{id:o.id,color:e});u(t.updateWorktreeHighlight),h(null)}catch(e){h(e instanceof Error?e.message:String(e))}},es=async()=>{K(!0);try{let e=await (0,eN.W)(`mutation RefreshWorktreePullRequest($id: ID!) {
|
|
123
|
+
refreshWorktreePullRequest(id: $id) { ${e$.Y} }
|
|
124
|
+
}`,{id:o.id});u(e.refreshWorktreePullRequest),h(null)}catch(e){h(e instanceof Error?e.message:String(e))}finally{K(!1)}},er=async(t,s=!1)=>{U(!0);try{let r=await (0,eN.W)(`mutation ChangeWorktreeBranch($input: ChangeWorktreeBranchInput!) {
|
|
125
|
+
changeWorktreeBranch(input: $input) { id }
|
|
126
|
+
}`,{input:{worktreeId:o.id,selection:t,requestId:(0,ey.e)(),stashOnFailure:s}});await (0,eB.t)(r.changeWorktreeBranch.id),await e.onReload(),V(null),H(null),I(!1),h(null)}finally{U(!1)}},ea=async()=>{if(F)try{H(null),await er(F,!0)}catch(e){H(e instanceof Error?e.message:String(e))}},en=e.group.codebase.defaultBranch,eo=!!(en&&(r=e.overview,a=e.group.codebase.id,i=o.id,r.agents.some(e=>e.codebases.some(e=>e.codebase.id===a&&e.worktrees.some(e=>e.id!==i&&e.branch===en))))),ed=!e.branchManagementEnabled||"AVAILABLE"!==o.availability||!!e.group.blockingJob||o.rebaseInProgress,ec=async()=>{if(en)try{await er({mode:"EXISTING",branchName:en,baseBranch:en})}catch(e){h(e instanceof Error?e.message:String(e))}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(eg.V,{onOpenChange:e=>{I(e),e||(V(null),H(null))},open:y,children:[(0,t.jsxs)(eu.G,{children:[(0,t.jsx)(eu.X,{asChild:!0,children:(0,t.jsx)(eg.r,{asChild:!0,children:w??(0,t.jsx)(el.K,{"aria-label":k("customize"),size:"icon-sm",variant:"ghost",children:(0,t.jsx)(S.f,{})})})}),(0,t.jsxs)(eu.L,{align:g,alignOffset:f,className:"w-72",onCloseAutoFocus:e=>{J.current&&(J.current=!1,e.preventDefault(),I(!0))},children:[(0,t.jsxs)(eu.r,{onSelect:()=>{(0,ey.d)(o.folder).catch(e=>h(String(e)))},children:[(0,t.jsx)(m.f,{})," ",k("copyPath")]}),(0,t.jsxs)(eu.r,{disabled:!o.branch,onSelect:()=>{o.branch&&(0,ey.d)(o.branch).catch(e=>h(String(e)))},children:[(0,t.jsx)(j.f,{})," ",k("copyBranchName")]}),G.length>0&&(0,t.jsxs)(eu.r,{disabled:!!Y,onSelect:()=>W(!0),title:Y??void 0,children:[(0,t.jsx)(N.f,{})," ",k("moveToAgent")]}),(0,t.jsxs)(eu.r,{disabled:ed,onSelect:()=>{J.current=!0},children:[(0,t.jsx)(j.f,{})," ",k("changeBranch")]}),en&&!eo&&(0,t.jsxs)(eu.r,{disabled:ed||L||o.branch===en,onSelect:()=>void ec(),children:[L?(0,t.jsx)(eb.f,{}):(0,t.jsx)(j.f,{})," ",k("changeBranchToDefault",{branch:en})]}),(0,t.jsxs)(eu.r,{disabled:"AVAILABLE"!==o.availability||!!e.group.blockingJob||o.rebaseInProgress||!X?.agent.capabilities.includes("worktree.commit")||!o.hasStagedChanges&&!o.hasUnstagedChanges,onSelect:()=>T(!0),children:[(0,t.jsx)(v.f,{})," ",k("commit")]}),"NONE"!==c&&(0,t.jsx)(tv,{icon:(0,t.jsx)(x.f,{}),label:k("CODE_INSIDERS"===c?"openInsiders":"openCode"),operation:"OPEN_EDITOR",disabled:!!e.group.blockingJob,props:{...e,onCompleted:e.onReload}}),(0,t.jsx)(eu.r,{asChild:!0,children:(0,t.jsxs)(eE.L,{href:`/dashboard/codebases/${e.group.codebase.id}`,children:[(0,t.jsx)(x.f,{})," ",k("viewCodebase")]})}),(0,t.jsx)(eu.r,{asChild:!0,children:(0,t.jsxs)(eE.L,{href:`/dashboard/codebases/repositories/${e.group.repository.id}`,children:[(0,t.jsx)(b.f,{})," ",k("viewRepository")]})}),o.branch&&/^github\.com\/[^/]+\/[^/]+$/i.test(e.group.repository.canonicalOrigin)&&(0,t.jsxs)(eu.r,{disabled:M,onSelect:()=>void es(),children:[M?(0,t.jsx)(eb.f,{}):(0,t.jsx)(A.f,{})," ",k("refreshPullRequest")]}),(0,t.jsx)(eu.U,{}),(0,t.jsxs)(eu.B,{className:"flex items-center gap-1.5 leading-none",children:[(0,t.jsx)($.f,{className:"size-3"}),(0,t.jsx)("span",{children:k("tags")})]}),d.map(e=>(0,t.jsxs)(eu.Q,{checked:Z.has(e.id),onCheckedChange:t=>void ee(e.id,!!t),children:[(0,t.jsx)("span",{className:(0,eC.f)("size-3 rounded-full border",e0[e.color])})," ",e.name]},e.id)),(0,t.jsxs)(eu.r,{onSelect:p,children:[(0,t.jsx)(R.f,{})," ",k("manageTags")]}),(0,t.jsx)(eu.U,{}),(0,t.jsxs)(eu.B,{className:"flex items-center justify-between gap-1.5 py-0 leading-none",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(C.f,{className:"size-3"}),(0,t.jsx)("span",{children:k("highlight")})]}),(0,t.jsx)(el.K,{"aria-label":k("clearHighlight"),className:"size-6",disabled:!o.highlightColor,onClick:e=>{e.stopPropagation(),et(null)},size:"icon-sm",variant:"ghost",children:(0,t.jsx)(B.f,{className:"size-3"})})]}),(0,t.jsx)(ew.z,{"aria-label":k("highlight"),className:"grid w-full grid-cols-8 gap-1 px-1.5 pb-1",onClick:e=>e.stopPropagation(),onValueChange:e=>{e&&et(e)},size:"sm",spacing:1,type:"single",value:o.highlightColor??"",variant:"outline",children:eU.map(e=>(0,t.jsx)(ew.H,{"aria-label":e,className:(0,eC.f)("aspect-square h-auto w-full min-w-0 p-0",e0[e],e1[e],"data-[state=on]:ring-2 data-[state=on]:ring-foreground"),value:e},e))}),!o.primary&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eu.U,{}),(0,t.jsxs)(eu.r,{disabled:Q,onSelect:()=>O(!0),variant:"destructive",children:[(0,t.jsx)(B.f,{})," ",k("deleteWorktree")]})]})]})]}),(0,t.jsxs)(eg.T,{align:g,className:"z-60 w-[min(28rem,calc(100vw-2rem))]",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("h3",{className:"font-semibold",children:k("changeBranch")}),(0,t.jsx)("p",{className:"mt-1 truncate font-mono text-xs text-muted-foreground",children:(0,_.f)(o.folder,e.baseRepoDirectory)})]}),(0,t.jsx)(eR.f,{busy:L,onSubmit:e=>er(e),onSubmitError:e=>{V(o.hasStagedChanges||o.hasUnstagedChanges?e:null)},recovery:F?(0,t.jsx)(ei.J,{children:(0,t.jsxs)(ei.p,{className:"space-y-2",children:[(0,t.jsx)("p",{children:k("stashRetryHelp")}),z&&(0,t.jsx)("p",{className:"text-destructive",children:z}),(0,t.jsxs)(el.K,{disabled:L,onClick:()=>void ea(),size:"sm",type:"button",variant:"outline",children:[L&&(0,t.jsx)(eb.f,{}),k("stashAndRetry")]})]})}):null,submitLabel:k("changeBranch"),target:e2(e.group,o)})]})]}),D&&(0,t.jsx)(tm,{onOpenChange:W,open:D,props:e,targets:G.filter(t=>tu(t,e.overview))}),E&&(0,t.jsx)(tp,{onOpenChange:T,onReload:e.onReload,open:E,worktree:o}),!o.primary&&P&&(0,t.jsx)(tx,{onOpenChange:O,open:P,props:e})]})}function tp({worktree:e,open:r,onOpenChange:a,onReload:i}){let n=(0,q.f)("worktrees"),[l,o]=(0,s.useState)(null),[d,c]=(0,s.useState)(""),[u,h]=(0,s.useState)(!1),[p,m]=(0,s.useState)(!0),[x,g]=(0,s.useState)(new Set),[f,b]=(0,s.useState)(!1),[j,v]=(0,s.useState)(null);(0,s.useEffect)(()=>{let t=!1;return(0,eP.I)(e.id).then(e=>{t||(o(e),h(!0===e.commitSigningEnabled),g(new Set(e.changes.filter(e=>e.staged).map(e=>e.path))))}).catch(e=>{t||v(e instanceof Error?e.message:String(e))}),()=>{t=!0}},[e.id]);let w=async()=>{b(!0),v(null);try{let t=await (0,eN.W)(`mutation CommitWorktree($input: CommitWorktreeInput!) {
|
|
127
|
+
commitWorktree(input: $input) { id }
|
|
128
|
+
}`,{input:{worktreeId:e.id,message:d,signed:u,stageAll:p,paths:p?[]:[...x],requestId:(0,ey.e)()}});await (0,eB.t)(t.commitWorktree.id),await i(),a(!1)}catch(e){v(e instanceof Error?e.message:String(e))}finally{b(!1)}};return(0,t.jsx)(ec.N,{onOpenChange:a,open:r,children:(0,t.jsxs)(ec.d,{className:"max-h-[min(42rem,calc(100vh-2rem))] overflow-y-auto sm:max-w-lg",children:[(0,t.jsxs)(ec.s,{children:[(0,t.jsx)(ec.F,{children:n("commitTitle")}),(0,t.jsx)(ec.C,{children:n("commitDescription")})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(ex.f,{htmlFor:"worktree-commit-message",children:n("commitMessage")}),(0,t.jsx)(ek.f,{autoFocus:!0,id:"worktree-commit-message",onChange:e=>c(e.target.value),placeholder:n("commitMessagePlaceholder"),rows:4,value:d})]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)(ed.f,{checked:u,onCheckedChange:e=>h(!!e)}),n("signedCommit")]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)(ed.f,{checked:p,onCheckedChange:e=>m(!!e)}),n("stageAll")]}),!p&&l&&(0,t.jsx)("div",{className:"max-h-64 space-y-1 overflow-y-auto rounded-md border p-2",children:l.changes.map(e=>(0,t.jsxs)("label",{className:"flex items-start gap-2 rounded px-2 py-1.5 text-sm hover:bg-muted",children:[(0,t.jsx)(ed.f,{checked:x.has(e.path),onCheckedChange:t=>{g(s=>{let r=new Set(s);return t?r.add(e.path):r.delete(e.path),r})}}),(0,t.jsx)("span",{className:"break-all font-mono text-xs",children:e.path})]},e.path))}),!l&&!j&&(0,t.jsx)(eb.f,{}),j&&(0,t.jsx)(ei.J,{variant:"destructive",children:(0,t.jsx)(ei.p,{children:j})})]}),(0,t.jsxs)(ec.c,{children:[(0,t.jsx)(el.K,{disabled:f,onClick:()=>a(!1),variant:"outline",children:n("cancel")}),(0,t.jsxs)(el.K,{disabled:f||!l||!d.trim()||!p&&0===x.size,onClick:()=>void w(),children:[f&&(0,t.jsx)(eb.f,{})," ",n("commit")]})]})]})})}function tm({props:e,targets:r,open:a,onOpenChange:i}){let n=(0,q.f)("worktrees"),l=1===r.length?r[0].group.codebase.id:"",[o,d]=(0,s.useState)(l),[c,u]=(0,s.useState)("__new__"),[h,p]=(0,s.useState)(!1),[m,x]=(0,s.useState)(!1),[g,f]=(0,s.useState)(null),[b,j]=(0,s.useState)(null),v=r.some(e=>e.group.codebase.id===o)?o:1===r.length?r[0].group.codebase.id:"",w=r.find(e=>e.group.codebase.id===v),k=r.map(e=>({value:e.group.codebase.id,label:`${e.agentGroup.agent.name} \xb7 ${e.group.repository.name}`,description:e.group.codebase.folder,keywords:`${e.agentGroup.agent.hostname} ${e.group.repository.displayOrigin}`})),y=w?.group.worktrees.find(e=>e.id===c),I=w?.group.worktrees.find(t=>t.branch===e.worktree.branch),S=!e.worktree.primary&&e.overview.agents.some(t=>t.codebases.some(t=>t.codebase.id===e.group.codebase.id)&&t.agent.capabilities.includes("worktree.delete")),N=async t=>{if("AWAITING_STASH"===t.status){j(t),await e.onReload();return}if("FAILED"===t.status)throw Error(t.error||n("moveFailed"));if("CANCELLED"===t.status)throw Error(n("moveCancelled"));e.onError("SUCCEEDED_WITH_WARNING"===t.status?t.warning:null),await e.onReload(),e.onMoved?.(t),i(!1)},C=async()=>{if(w){x(!0),f(null);try{let t=await (0,eN.W)(`mutation MoveWorktree($input: MoveWorktreeInput!) {
|
|
129
|
+
moveWorktree(input: $input) {
|
|
130
|
+
id sourceWorktreeId sourceCodebaseId targetCodebaseId targetWorktreeId destinationMode
|
|
131
|
+
branch headSha deleteSource status sourceJobId targetJobId cleanupJobId error warning
|
|
132
|
+
createdAt updatedAt finishedAt
|
|
133
|
+
}
|
|
134
|
+
}`,{input:{sourceWorktreeId:e.worktree.id,targetCodebaseId:w.group.codebase.id,targetWorktreeId:"__new__"===c?null:c,deleteSource:h,requestId:(0,ey.e)()}});await N(await (0,eB.D)(t.moveWorktree.id))}catch(e){f(e instanceof Error?e.message:String(e))}finally{x(!1)}}},E=async()=>{if(b){x(!0),f(null);try{await (0,eN.W)(`mutation RetryMove($id: ID!) {
|
|
135
|
+
retryWorktreeMoveWithStash(id: $id) { id status }
|
|
136
|
+
}`,{id:b.id}),await N(await (0,eB.D)(b.id))}catch(e){f(e instanceof Error?e.message:String(e))}finally{x(!1)}}},R=async()=>{if(b){x(!0);try{await (0,eN.W)(`mutation CancelMove($id: ID!) {
|
|
137
|
+
cancelWorktreeMove(id: $id) { id status }
|
|
138
|
+
}`,{id:b.id}),await e.onReload(),i(!1)}catch(e){f(e instanceof Error?e.message:String(e))}finally{x(!1)}}};return(0,t.jsx)(ec.N,{onOpenChange:e=>!m&&i(e),open:a,children:(0,t.jsxs)(ec.d,{className:"sm:max-w-xl",children:[(0,t.jsxs)(ec.s,{children:[(0,t.jsx)(ec.F,{children:n("moveToAgent")}),(0,t.jsx)(ec.C,{children:n("moveDescription",{branch:e.worktree.branch??""})})]}),b?(0,t.jsx)(ei.J,{children:(0,t.jsxs)(ei.p,{className:"space-y-3",children:[(0,t.jsx)("p",{children:b.error||n("moveNeedsStash")}),(0,t.jsx)("p",{className:"text-muted-foreground",children:n("moveStashHelp")})]})}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(ex.f,{className:"mb-1.5 block",children:n("destinationAgent")}),(0,t.jsx)(ef.f,{ariaLabel:n("destinationAgent"),disabled:m,emptyMessage:n("noMoveDestinations"),onValueChange:e=>{d(e),u("__new__")},options:k,placeholder:n("selectDestinationAgent"),searchPlaceholder:n("searchDestinationAgents"),value:v})]}),w&&(0,t.jsxs)("div",{children:[(0,t.jsx)(ex.f,{className:"mb-1.5 block",children:n("destinationWorktree")}),(0,t.jsxs)(ej.d,{disabled:m,onValueChange:u,value:c,children:[(0,t.jsx)(ej.P,{"aria-label":n("destinationWorktree"),children:(0,t.jsx)(ej.U,{})}),(0,t.jsxs)(ej.r,{children:[(0,t.jsx)(ej.T,{disabled:!!I,value:"__new__",children:n("createDestinationWorktree")}),w.group.worktrees.filter(e=>"AVAILABLE"===e.availability).map(e=>(0,t.jsxs)(ej.T,{disabled:!!I&&I.id!==e.id,value:e.id,children:[e.branch??n("detached")," ·"," ",e.relativePath]},e.id))]})]})]}),y&&(y.hasStagedChanges||y.hasUnstagedChanges)&&(0,t.jsx)(ei.J,{children:(0,t.jsx)(ei.p,{children:n("dirtyDestinationWarning")})}),(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(ed.f,{checked:h,disabled:!S||m,id:`delete-source-${e.worktree.id}`,onCheckedChange:e=>p(!!e)}),(0,t.jsxs)("div",{children:[(0,t.jsx)(ex.f,{htmlFor:`delete-source-${e.worktree.id}`,children:n("deleteOldWorktree")}),!S&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:n("deleteOldWorktreeDisabled")})]})]})]}),g&&(0,t.jsx)(ei.J,{variant:"destructive",children:(0,t.jsx)(ei.p,{children:g})}),(0,t.jsxs)(ec.c,{children:[(0,t.jsx)(el.K,{disabled:m,onClick:()=>b?void R():i(!1),variant:"outline",children:b?n("cancelMove"):n("cancel")}),(0,t.jsxs)(el.K,{disabled:m||!b&&!w,onClick:()=>b?void E():void C(),children:[m&&(0,t.jsx)(eb.f,{}),b?n("stashAndContinue"):n("moveWorktree")]})]})]})})}function tx({props:e,open:r,onOpenChange:a}){let i=(0,q.f)("worktrees"),[n,l]=(0,s.useState)(!1),[o,d]=(0,s.useState)(!1),[c,u]=(0,s.useState)(null),h=!!(e.worktree.branch&&(e.group.codebase.remoteBranches.includes(e.worktree.branch)||e.worktree.upstream===`origin/${e.worktree.branch}`)),p=e.worktree.branch===e.group.codebase.defaultBranch,m=async()=>{d(!0),u(null);try{let t=await (0,eN.W)(`mutation DeleteWorktree($input: DeleteWorktreeInput!) {
|
|
139
|
+
deleteWorktree(input: $input) { id }
|
|
140
|
+
}`,{input:{worktreeId:e.worktree.id,deleteRemoteBranch:n,requestId:(0,ey.e)()}});await (0,eB.t)(t.deleteWorktree.id),await e.onReload(),e.onError(null),e.onDeleted?.(),a(!1)}catch(e){u(e instanceof Error?e.message:String(e))}finally{d(!1)}};return(0,t.jsx)(ec.N,{onOpenChange:e=>!o&&a(e),open:r,children:(0,t.jsxs)(ec.d,{children:[(0,t.jsxs)(ec.s,{children:[(0,t.jsx)(ec.F,{children:i("deleteWorktree")}),(0,t.jsx)(ec.C,{children:i("deleteWorktreeDescription",{path:(0,_.f)(e.worktree.folder,e.baseRepoDirectory)})})]}),(0,t.jsx)(ei.J,{variant:"destructive",children:(0,t.jsx)(ei.p,{children:i("deleteWorktreeWarning")})}),h&&(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(ed.f,{checked:n,disabled:o||p,id:`delete-remote-${e.worktree.id}`,onCheckedChange:e=>l(!!e)}),(0,t.jsxs)("div",{children:[(0,t.jsx)(ex.f,{htmlFor:`delete-remote-${e.worktree.id}`,children:i("deleteRemoteBranch",{branch:e.worktree.branch??""})}),p&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i("defaultRemoteProtected")})]})]}),c&&(0,t.jsx)(ei.J,{variant:"destructive",children:(0,t.jsx)(ei.p,{children:c})}),(0,t.jsxs)(ec.c,{children:[(0,t.jsx)(el.K,{disabled:o,onClick:()=>a(!1),variant:"outline",children:i("cancel")}),(0,t.jsxs)(el.K,{disabled:o,onClick:()=>void m(),variant:"destructive",children:[o&&(0,t.jsx)(eb.f,{}),i("deleteWorktree")]})]})]})})}function tg(e){let{worktree:s}=e,{appId:r}=e,a=(0,q.f)("worktrees"),i=e.overview.agents.find(t=>t.codebases.some(t=>t.codebase.id===e.group.codebase.id))?.agent,n=i?.connectionStatus==="ONLINE"&&i.capabilities.includes("ios.build.run")&&!1===e.group.iosBuildConfigured,l="AVAILABLE"!==s.availability||!i||"ONLINE"!==i.connectionStatus||!i.capabilities.includes("ios.build.run")||!1===e.group.iosBuildConfigured,o="AVAILABLE"!==s.availability||!i||"ONLINE"!==i.connectionStatus;return(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(Y.f,{onCompleted:e.onCompleted,worktree:s}),(0,t.jsx)(F.G,{buildSettingsHref:n?`/dashboard/codebases/repositories/${e.group.repository.id}`:void 0,codebaseId:e.group.codebase.id,disabled:l,disabledReason:i&&"ONLINE"===i.connectionStatus?i.capabilities.includes("ios.build.run")?!1===e.group.iosBuildConfigured?a("iosBuildNotConfigured"):"AVAILABLE"!==s.availability?a("worktreeUnavailable"):null:a("agentUnsupported"):a("agentOffline"),onStarted:()=>void e.onCompleted(),worktreeId:s.id}),o?(0,t.jsxs)(el.K,{disabled:!0,size:"sm",variant:"outline",children:[(0,t.jsx)(P.f,{})," ",a("newSession")]}):(0,t.jsx)(el.K,{asChild:!0,size:"sm",variant:"outline",children:(0,t.jsxs)(eE.L,{href:`/ai/drafts/new?kind=session&worktree=${s.id}${r?`&app=${encodeURIComponent(r)}`:""}`,children:[(0,t.jsx)(P.f,{})," ",a("newSession")]})}),o?(0,t.jsxs)(el.K,{disabled:!0,size:"sm",variant:"outline",children:[(0,t.jsx)(p.f,{})," ",a("newPlan")]}):(0,t.jsx)(el.K,{asChild:!0,size:"sm",variant:"outline",children:(0,t.jsxs)(eE.L,{href:`/ai/drafts/new?kind=plan&worktree=${s.id}${r?`&app=${encodeURIComponent(r)}`:""}`,children:[(0,t.jsx)(p.f,{})," ",a("newPlan")]})})]})}function tf(e){let{worktree:s}=e,r=(0,q.f)("worktrees"),a="AVAILABLE"!==s.availability||!!e.group.blockingJob||s.rebaseInProgress,i={hasChanges:eY(s),stageOperation:s.hasStagedChanges&&!s.hasUnstagedChanges?"UNSTAGE_ALL":"STAGE_ALL"};return(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(tg,{...e}),(0,t.jsx)(tj,{icon:(0,t.jsx)(g.f,{}),label:r("pull"),operation:"PULL",props:e,disabled:a||!s.upstream||0===s.behind}),(0,t.jsx)(tj,{confirm:!0,icon:(0,t.jsx)(A.f,{}),label:r("sync"),operation:"SYNC",props:e,disabled:a||!s.upstream||!s.baseBranch||0===s.baseBehind}),(0,t.jsx)(tj,{confirm:!0,icon:(0,t.jsx)(w.f,{}),label:r("rebase"),operation:"REBASE",props:e,disabled:a||!s.baseBranch||0===s.baseBehind}),(0,t.jsx)(tj,{icon:(0,t.jsx)(O.f,{}),label:r(s.upstream?"push":"publish"),operation:"PUSH",props:e,disabled:a||!s.branch}),(0,t.jsx)(V.b,{conflictWorkflows:e.group.mergeConflictQuickActions??[],disabled:a||!s.upstream||!s.baseBranch,onCompleted:e.onCompleted,onError:e.onError,worktree:s}),(0,t.jsx)(V.o,{conflictWorkflows:e.group.mergeConflictQuickActions??[],disabled:a,onCompleted:e.onCompleted,onError:e.onError,worktree:s}),(0,t.jsxs)(eu.G,{children:[(0,t.jsx)(eu.X,{asChild:!0,children:(0,t.jsxs)(el.K,{size:"sm",variant:"outline",children:[(0,t.jsx)(S.f,{})," ",r("moreActions")]})}),(0,t.jsxs)(eu.L,{align:"end",children:[(0,t.jsx)(tv,{confirm:!0,icon:(0,t.jsx)(O.f,{}),label:r("forcePush"),operation:"FORCE_PUSH",props:e,disabled:a||!s.upstream}),(0,t.jsx)(tv,{confirm:!0,icon:(0,t.jsx)(T.f,{}),label:r("reset"),operation:"RESET",props:e,disabled:a||!s.upstream}),(0,t.jsx)(tv,{confirm:!0,icon:(0,t.jsx)(I.f,{}),label:r("clearLock"),operation:"CLEAR_LOCK",props:e,disabled:a}),(0,t.jsx)(tv,{icon:(0,t.jsx)(n.f,{}),label:r("stashAll"),operation:"STASH_ALL",props:e,disabled:a||!i.hasChanges}),(0,t.jsx)(tv,{icon:(0,t.jsx)(c.f,{}),label:r("UNSTAGE_ALL"===i.stageOperation?"unstageAll":"stageAll"),operation:i.stageOperation,props:e,disabled:a||!i.hasChanges})]})]}),s.activeJob&&(0,t.jsxs)("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,t.jsx)(eb.f,{})," ",r("operationRunning")]})]})}function tb({props:e,operation:t,confirm:r=!1}){let a=(0,q.f)("worktrees"),[i,n]=(0,s.useState)(!1),[l,o]=(0,s.useState)(!1),[d,c]=(0,s.useState)(!1),u=(0,s.useRef)(null);(0,s.useEffect)(()=>()=>{u.current&&window.clearTimeout(u.current)},[]);let h=async()=>{if(r&&!i){n(!0),u.current=window.setTimeout(()=>n(!1),5e3);return}o(!0),n(!1);try{let s=await (0,eN.W)("mutation RunWorktreeOperation($input: RunWorktreeOperationInput!) { runWorktreeOperation(input: $input) { id } }",{input:{worktreeId:e.worktree.id,operation:t,requestId:(0,ey.e)(),...d?{forcePreparations:!0}:{}}});e.onError(null),await e.onCompleted();let r=await (0,eB.Y)(s.runWorktreeOperation.id);if(await e.onCompleted(),r?.outcome==="PREPARATION_CONFLICT"){c(!0),n(!0),e.onError(a("preparationConflict",{paths:r.preparationConflictPaths.join(", ")}));return}c(!1)}catch(t){try{await e.onCompleted()}catch{}e.onError(t instanceof Error?t.message:String(t))}finally{o(!1)}};return{armed:i,busy:l,forcePreparations:d,run:h}}function tj({props:e,operation:s,label:r,icon:a,confirm:i=!1,disabled:n=!1}){let l=(0,q.f)("worktrees"),{armed:o,busy:d,forcePreparations:u,run:h}=tb({props:e,operation:s,confirm:i});return(0,t.jsxs)(el.K,{disabled:n||d,onClick:()=>void h(),size:"sm",variant:o?"destructive":"outline",children:[d?(0,t.jsx)(eb.f,{}):o?(0,t.jsx)(c.f,{}):a," ",o?l(u?"forcePreparationOperation":"confirmAction"):r]})}function tv({props:e,operation:s,label:r,icon:a,confirm:i=!1,disabled:n=!1}){let l=(0,q.f)("worktrees"),{armed:o,busy:d,run:u}=tb({props:e,operation:s,confirm:i});return(0,t.jsxs)(eu.r,{disabled:n||d,onSelect:e=>{i&&!o&&e.preventDefault(),u()},variant:o?"destructive":"default",children:[d?(0,t.jsx)(eb.f,{}):o?(0,t.jsx)(c.f,{}):a,o?l("confirmAction"):r]})}function tw(e){let r=(0,q.f)("worktrees");return(0,t.jsx)("div",{className:"rounded-xl border",children:(0,t.jsxs)(ev.s,{children:[(0,t.jsx)(ev.E,{children:(0,t.jsxs)(ev.N,{children:[(0,t.jsx)(ev.V,{children:r("branch")}),(0,t.jsx)(ev.V,{children:r("path")}),(0,t.jsx)(ev.V,{children:r("baseBranch")}),(0,t.jsx)(ev.V,{children:r("upToDate")}),(0,t.jsx)(ev.V,{children:r("tags")}),(0,t.jsx)(ev.V,{children:r("pullRequest")}),(0,t.jsx)(ev.V,{children:r("origin")}),(0,t.jsx)(ev.V,{})]})}),(0,t.jsx)(ev.z,{children:e.group.worktrees.map(t=>(0,s.createElement)(tk,{...e,key:t.id,worktree:t}))})]})})}function tk(e){let{baseRepoDirectory:r,inspectionRefreshToken:a}=e,{worktree:i,applyActivity:n,setUnstagedChanges:l}=(0,eP.L)(e.worktree),[o,d]=(0,s.useState)(null),c={...e,worktree:i,onError:d},p=(0,q.f)("worktrees"),m=(0,eE.U)(),[x,g]=(0,s.useState)(!1),[f,b]=(0,s.useState)(null),[j,v]=(0,s.useState)(!1),[w,k]=(0,s.useState)(null),y=(0,s.useRef)(0),I=(0,s.useRef)(a),S=(0,s.useCallback)(async()=>{let e=++y.current;v(!0);try{let t=await (0,eP.I)(i.id);if(e!==y.current)return;b(t),l(t.changes.some(e=>e.unstaged||e.untracked||e.conflicted)),k(null)}catch(t){e===y.current&&k(t instanceof Error?t.message:String(t))}finally{e===y.current&&v(!1)}},[l,i.id]),N=(0,eP.x)(S),C=(0,s.useCallback)(e=>{n(e),x&&N()},[n,x,N]);(0,eP.q)(i.id,e.liveUpdatesEnabled&&"AVAILABLE"===i.availability,C),(0,s.useEffect)(()=>{if(I.current===a||(I.current=a,!x))return;let e=window.setTimeout(()=>void N(),0);return()=>window.clearTimeout(e)},[x,a,N]);let E=()=>{let e=!x;g(e),e&&!f&&N()},R=i.highlightColor&&eS.m[i.highlightColor];return(0,t.jsxs)(s.Fragment,{children:[(0,t.jsxs)(ev.N,{className:(0,eC.f)("cursor-pointer transition-colors hover:bg-muted/50",R),onClick:e=>{(0,eq.g)(e)&&m.push((0,eq.P)(i.id))},children:[(0,t.jsxs)(ev.d,{children:[(0,t.jsxs)(el.K,{"aria-expanded":x,className:"max-w-full px-0 font-mono",onClick:()=>void E(),variant:"ghost",children:[x?(0,t.jsx)(u.f,{}):(0,t.jsx)(h.f,{}),(0,t.jsx)("span",{className:"truncate",children:i.branch??p("detached")})]}),(i.ticketKey||i.ticketTitle)&&(0,t.jsx)(ts,{...c,compact:!0})]}),(0,t.jsx)(ev.d,{className:"font-mono text-xs",children:(0,_.f)(i.folder,r)}),(0,t.jsx)(ev.d,{children:(0,t.jsx)(tc,{...c,compact:!0})}),(0,t.jsx)(ev.d,{children:(0,t.jsx)(tl,{worktree:i})}),(0,t.jsx)(ev.d,{children:(0,t.jsx)(tn,{...c,compact:!0})}),(0,t.jsx)(ev.d,{children:(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-1.5",children:(0,t.jsx)(to,{detailsExpanded:x,onPipelinesChanged:e.onReload,onToggleDetails:E,worktree:i})})}),(0,t.jsx)(ev.d,{children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[(0,t.jsx)(td,{worktree:i}),eY(i)&&(0,t.jsx)(en.f,{variant:"destructive",children:p("dirty")})]})}),(0,t.jsx)(ev.d,{children:(0,t.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,t.jsx)(tt,{worktree:i}),(0,t.jsx)(th,{...c})]})})]}),i.rebaseInProgress&&(0,t.jsx)(ev.N,{className:(0,eC.f)(R),children:(0,t.jsx)(ev.d,{colSpan:8,children:(0,t.jsx)(eL.f,{group:e.group,onCompleted:e.onReload,onError:d,worktree:i})})}),(0,t.jsx)(ev.N,{className:(0,eC.f)(R),children:(0,t.jsxs)(ev.d,{className:"space-y-2",colSpan:8,children:[(0,t.jsx)(eO.f,{error:o,onDismiss:()=>d(null)}),(0,t.jsx)(tf,{...c,onCompleted:async()=>{await e.onReload(),x&&await N()}})]})}),x&&(0,t.jsx)(ev.N,{className:(0,eC.f)(R),children:(0,t.jsxs)(ev.d,{colSpan:8,children:[(0,t.jsx)(eO.f,{error:w}),j&&!f?(0,t.jsx)(eb.f,{}):f?(0,t.jsx)(eT.m,{detail:f,inline:!0,worktreeId:i.id,worktreeFolder:i.folder}):null]})})]})}function ty({tag:e}){return(0,t.jsx)(en.f,{className:eZ[e.color],children:e.name})}function tI({label:e,value:s,mono:r=!1}){return(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e}),(0,t.jsx)("p",{className:(0,eC.f)("flex min-h-6 items-center truncate",r&&"font-mono text-xs"),title:s,children:s})]})}function tS({open:e,onOpenChange:r,tags:a,onChanged:i}){let n=(0,q.f)("worktrees"),[l,o]=(0,s.useState)(null),[d,c]=(0,s.useState)(""),[u,h]=(0,s.useState)("blue"),[p,m]=(0,s.useState)(null),x=async e=>{e.preventDefault();try{await (0,eN.W)("mutation SaveTag($input: SaveWorktreeTagInput!) { saveWorktreeTag(input: $input) { id } }",{input:{id:l?.id??null,name:d,color:u}}),o(null),c(""),h("blue"),m(null),await i()}catch(e){m(e instanceof Error?e.message:String(e))}},g=async e=>{try{await (0,eN.W)("mutation DeleteTag($id: ID!) { deleteWorktreeTag(id: $id) }",{id:e}),await i()}catch(e){m(e instanceof Error?e.message:String(e))}};return(0,t.jsx)(ec.N,{onOpenChange:r,open:e,children:(0,t.jsxs)(ec.d,{children:[(0,t.jsxs)(ec.s,{children:[(0,t.jsx)(ec.F,{children:n("manageTags")}),(0,t.jsx)(ec.C,{children:n("manageTagsDescription")})]}),p&&(0,t.jsx)(ei.J,{variant:"destructive",children:(0,t.jsx)(ei.p,{children:p})}),(0,t.jsx)(em.t,{className:"gap-2",children:a.map(e=>(0,t.jsxs)(em.M,{size:"sm",variant:"outline",children:[(0,t.jsx)(em.H,{children:(0,t.jsx)(em.$,{children:(0,t.jsx)(ty,{tag:e})})}),(0,t.jsxs)(em.P,{children:[(0,t.jsx)(el.K,{onClick:()=>{o(e),c(e.name),h(e.color)},size:"sm",variant:"outline",children:n("edit")}),(0,t.jsx)(el.K,{onClick:()=>void g(e.id),size:"icon-sm",variant:"destructive",children:(0,t.jsx)(B.f,{})})]})]},e.id))}),(0,t.jsxs)("form",{className:"space-y-3 border-t pt-3",onSubmit:x,children:[(0,t.jsx)(ex.f,{htmlFor:"tag-name",children:l?n("editTag"):n("createTag")}),(0,t.jsx)(ep.f,{id:"tag-name",maxLength:40,onChange:e=>c(e.target.value),required:!0,value:d}),(0,t.jsx)(ew.z,{"aria-label":n("highlight"),className:"grid w-full grid-cols-12 gap-1",onValueChange:e=>{e&&h(e)},size:"sm",spacing:1,type:"single",value:u,variant:"outline",children:eU.map(e=>(0,t.jsx)(ew.H,{"aria-label":e,className:(0,eC.f)("aspect-square h-auto w-full min-w-0 p-0",e0[e],e1[e],"data-[state=on]:ring-2 data-[state=on]:ring-foreground"),value:e},e))}),(0,t.jsx)(ec.c,{children:(0,t.jsxs)(el.K,{type:"submit",children:[(0,t.jsx)(D.f,{})," ",n("saveTag")]})})]})]})})}function tN({appId:e,open:r,onOpenChange:a,onChanged:i}){let l=(0,q.f)("worktrees"),[o,d]=(0,s.useState)([]),[c,u]=(0,s.useState)(null),h=(0,s.useCallback)(async()=>{try{let t=await (0,eN.W)(`query HiddenWorktrees($appId: ID) { hiddenWorktrees(appId: $appId) { ${e$.Y} } }`,{appId:e??null});d(t.hiddenWorktrees),u(null)}catch(e){u(e instanceof Error?e.message:String(e))}},[e]);(0,s.useEffect)(()=>{if(!r)return;let e=window.setTimeout(()=>void h(),0);return()=>window.clearTimeout(e)},[r,h]);let p=async e=>{try{await (0,eN.W)(e?"mutation PurgeHidden($id: ID!) { purgeHiddenWorktree(id: $id) }":"mutation PurgeAllHidden { purgeAllHiddenWorktrees }",e?{id:e}:void 0),await h(),await i()}catch(e){u(e instanceof Error?e.message:String(e))}};return(0,t.jsx)(ec.N,{onOpenChange:a,open:r,children:(0,t.jsxs)(ec.d,{className:"sm:max-w-3xl",children:[(0,t.jsxs)(ec.s,{children:[(0,t.jsx)(ec.F,{children:l("hiddenTitle")}),(0,t.jsx)(ec.C,{children:l("hiddenDescription")})]}),c&&(0,t.jsx)(ei.J,{variant:"destructive",children:(0,t.jsx)(ei.p,{children:c})}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto",children:o.length?(0,t.jsx)(em.t,{className:"gap-2",children:o.map(e=>(0,t.jsxs)(em.M,{variant:"outline",children:[(0,t.jsx)(em.Y,{variant:"icon",children:(0,t.jsx)(j.f,{})}),(0,t.jsxs)(em.H,{className:"min-w-0",children:[(0,t.jsx)(em.$,{className:"font-mono",children:e.branch??l("detached")}),(0,t.jsx)(em.B,{className:"truncate",title:e.folder,children:e.folder})]}),(0,t.jsx)(em.P,{children:(0,t.jsxs)(el.K,{onClick:()=>void p(e.id),size:"sm",variant:"destructive",children:[(0,t.jsx)(B.f,{})," ",l("purge")]})})]},e.id))}):(0,t.jsx)(eh.e,{className:"border-0 py-8",children:(0,t.jsxs)(eh.c,{children:[(0,t.jsx)(eh.B,{variant:"icon",children:(0,t.jsx)(n.f,{})}),(0,t.jsx)(eh.p,{children:l("noHidden")})]})})}),(0,t.jsx)(ec.c,{children:o.length>0&&!e&&(0,t.jsxs)(el.K,{onClick:()=>void p(),variant:"destructive",children:[(0,t.jsx)(B.f,{})," ",l("purgeAll")]})})]})})}e.s(["B",0,tf,"s",0,tl,"_",0,td,"E",0,tg,"f",0,to,"$",0,tS,"a",0,th,"p",0,tr,"t",0,ts,"b",0,function({appId:e}){let r=(0,q.f)("worktrees"),[l,o]=(0,s.useState)(()=>new URLSearchParams(window.location.search).get("issue")),[d,c]=(0,s.useState)(null),[u,h]=(0,s.useState)(()=>"table"===window.localStorage.getItem(e_)?"table":"cards"),[p,m]=(0,s.useState)(()=>"repository"===window.localStorage.getItem(eM)?"repository":"agent"),[x,f]=(0,s.useState)(!0),[b,v]=(0,s.useState)(!1),[w,I]=(0,s.useState)(null),[S,N]=(0,s.useState)(null),[C,E]=(0,s.useState)(null),[R,T]=(0,s.useState)(0),[D,$]=(0,s.useState)(!1),[P,B]=(0,s.useState)(!1),O=(0,a.q)(),L=(0,q.f)("activeAgent"),[U]=(0,s.useState)(()=>(function(e){let t={query:"",agentId:eF,repositoryId:eF,changes:eF,branches:eF};try{let s=window.localStorage.getItem(eG(e));if(!s)return t;let r=JSON.parse(s);if(!r||"object"!=typeof r)return t;return{query:"string"==typeof r.query?r.query:t.query,agentId:"string"==typeof r.agentId?r.agentId:t.agentId,repositoryId:"string"==typeof r.repositoryId?r.repositoryId:t.repositoryId,changes:r.changes===eV||r.changes===ez?r.changes:t.changes,branches:r.branches===eH||r.branches===eJ?r.branches:t.branches}}catch{return t}})(e)),[_,M]=(0,s.useState)(U.query),[K,F]=(0,s.useState)(U.agentId),[V,z]=(0,s.useState)(U.repositoryId),[H,J]=(0,s.useState)(U.changes),[G,Y]=(0,s.useState)(U.branches),X=(0,s.useRef)(0),Q=(0,s.useRef)(null),Z=(0,s.useCallback)(()=>Q.current?.refresh().catch(()=>void 0)??Promise.resolve(),[]),ee=(0,s.useCallback)(async()=>{let e=Q.current;e&&(await e.refresh(),Q.current===e&&T(e=>e+1))},[]),et=(0,eW.f)({scopeKey:e??"all-worktrees",refreshPage:ee}),es=(0,s.useCallback)(async t=>{let s=++X.current;try{let r=await (0,eN.W)(`query WorktreeOverview($appId: ID) {
|
|
141
|
+
worktreeOverview(appId: $appId) {
|
|
142
|
+
hiddenCount
|
|
143
|
+
settings { editorVariant updatedAt }
|
|
144
|
+
tags { id name color createdAt updatedAt }
|
|
145
|
+
activeMoves {
|
|
146
|
+
id sourceWorktreeId sourceCodebaseId targetCodebaseId targetWorktreeId destinationMode
|
|
147
|
+
branch headSha deleteSource status sourceJobId targetJobId cleanupJobId error warning
|
|
148
|
+
createdAt updatedAt finishedAt
|
|
149
|
+
}
|
|
150
|
+
agents {
|
|
151
|
+
agent { id name hostname capabilities baseRepoDirectory connectionStatus }
|
|
152
|
+
codebases {
|
|
153
|
+
iosBuildConfigured
|
|
154
|
+
blockingJob { id agentId kind status error createdAt startedAt finishedAt updatedAt }
|
|
155
|
+
quickActions {
|
|
156
|
+
id name description quickActionIconKey quickActionButtonVariant
|
|
157
|
+
hasPlainTrigger(resourceKind: "WORKTREE")
|
|
158
|
+
triggerChoices(resourceKind: "WORKTREE") { key label description }
|
|
159
|
+
}
|
|
160
|
+
mergeConflictQuickActions {
|
|
161
|
+
id name description quickActionIconKey quickActionButtonVariant
|
|
162
|
+
hasPlainTrigger(resourceKind: "WORKTREE")
|
|
163
|
+
triggerChoices(resourceKind: "WORKTREE") { key label description }
|
|
164
|
+
}
|
|
165
|
+
repository { id canonicalOrigin displayOrigin name description jiraBranchRegex keepBaseBranchUpToDate createdAt updatedAt }
|
|
166
|
+
codebase { ${e$.T} }
|
|
167
|
+
worktrees { ${e$.Y} }
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}`,{appId:e??null},{signal:t});if(s!==X.current||t.aborted)return;c(r.worktreeOverview),N(null)}catch(e){if(t.aborted)return;throw s!==X.current||t.aborted||N(e instanceof Error?e.message:String(e)),e}finally{s!==X.current||t.aborted||f(!1)}},[e]);(0,ea.f)(()=>void Z()),(0,s.useEffect)(()=>{let e=(0,i.f)(es);Q.current=e;let t=(0,eN.g)(t=>{(t?.initialConnection?e.refreshIfIdle():e.refresh()).catch(()=>void 0)},{includeInitial:!0});return()=>{e.dispose(),t(),Q.current===e&&(Q.current=null)}},[es]),(0,s.useEffect)(()=>{let e=window.setTimeout(()=>void Z(),0),t=window.setInterval(()=>void Z(),3e4),s=(0,eN.p)(),r=s.subscribe({query:"subscription WorktreesChanged { worktreeOverviewChanged { worktreeId codebaseId } }"},{next:()=>void Z(),error:()=>void 0,complete:()=>void 0}),a=s.subscribe({query:"subscription WorktreeBuildsChanged { buildsChanged { id } }"},{next:()=>void Z(),error:()=>void 0,complete:()=>void 0}),i=s.subscribe({query:"subscription WorktreeQuickActionsChanged { workflowChanges { definitionsChanged } }"},{next:e=>{e.data?.workflowChanges?.definitionsChanged&&Z()},error:()=>void 0,complete:()=>void 0});return()=>{window.clearTimeout(e),window.clearInterval(t),X.current+=1,r(),a(),i()}},[Z,e]),(0,s.useEffect)(()=>{let e=()=>o(new URLSearchParams(window.location.search).get("issue"));return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]),(0,s.useEffect)(()=>{window.localStorage.setItem(eG(e),JSON.stringify({query:_,agentId:K,repositoryId:V,changes:H,branches:G}))},[K,e,G,H,_,V]);let en=e=>{let t,s;t=new URLSearchParams(window.location.search),e?t.set("issue",e):t.delete("issue"),s=t.toString(),window.history.pushState(null,"",`${window.location.pathname}${s?`?${s}`:""}`),o(e)},eo=async()=>{f(!0),v(!0);try{await (0,eN.W)(`mutation RefreshWorktrees {
|
|
172
|
+
refreshWorktrees
|
|
173
|
+
}`),await ee(),I(null)}catch(e){I(e instanceof Error?e.message:String(e))}finally{v(!1),f(!1)}},ed=e=>{c(t=>t?{...t,agents:t.agents.map(t=>({...t,codebases:t.codebases.map(t=>({...t,worktrees:t.worktrees.map(t=>t.id===e.id?{...t,...e,ticketKey:e.ticketKey??t.ticketKey,ticketTitle:e.ticketTitle??t.ticketTitle,ticketStatus:e.ticketStatus??t.ticketStatus,pullRequest:e.pullRequest??t.pullRequest}:t)}))}))}:t)},ec=(0,s.useMemo)(()=>{let e=new Map;return d?.agents.forEach(t=>t.codebases.forEach(t=>e.set(t.repository.id,{id:t.repository.id,name:t.repository.name,displayOrigin:t.repository.displayOrigin}))),[...e.values()].sort((e,t)=>e.name.localeCompare(t.name))},[d]),eu=!d||K===eF||d.agents.some(e=>e.agent.id===K)?K:eF,em=O.activeAgentId??eu,ex=!d||V===eF||ec.some(e=>e.id===V)?V:eF,eg=(0,s.useMemo)(()=>{var e,t;let s;return e=d?.agents??[],(s=(t={query:_,agentId:em===eF?null:em,repositoryId:ex===eF?null:ex,dirty:H===eF?null:H===eV,nonDefaultBranch:G===eH,openPullRequests:G===eJ}).query.trim().toLocaleLowerCase())||t.agentId||t.repositoryId||null!==t.dirty||t.nonDefaultBranch||t.openPullRequests?e.flatMap(e=>{if(t.agentId&&e.agent.id!==t.agentId)return[];let r=s.length>0&&eQ([e.agent.id,e.agent.name,e.agent.hostname],s),a=e.codebases.flatMap(e=>{if(t.repositoryId&&e.repository.id!==t.repositoryId)return[];let a=s.length>0&&eQ([e.repository.id,e.repository.name,e.repository.description,e.repository.canonicalOrigin,e.repository.displayOrigin,e.codebase.id,e.codebase.folder,e.codebase.observedOrigin,e.codebase.branch,e.codebase.defaultBranch],s),i=!s||r||a?e.worktrees:e.worktrees.filter(e=>eQ([e.id,e.branch,e.folder,e.relativePath,e.ticketKey,e.ticketTitle,e.ticketStatus,e.pullRequest?.number,e.pullRequest?.title,e.pullRequest?.repositoryNameWithOwner,e.pullRequest?.jiraKey,...e.tags.map(e=>e.name)],s)),n=null===t.dirty?i:i.filter(e=>eY(e)===t.dirty),l=t.nonDefaultBranch?e.codebase.defaultBranch?n.filter(t=>t.branch!==e.codebase.defaultBranch):[]:n,o=t.openPullRequests?l.filter(e=>e.pullRequest?.state==="OPEN"):l;return o.length?[{...e,worktrees:o}]:[]});return a.length?[{...e,codebases:a}]:[]}):e},[em,ex,G,H,d,_]),ev=(0,s.useMemo)(()=>{let e;return e=new Map,eg.forEach(t=>t.codebases.forEach(s=>{let r=e.get(s.repository.id);r?r.entries.push({agentGroup:t,group:s}):e.set(s.repository.id,{repository:s.repository,entries:[{agentGroup:t,group:s}]})})),[...e.values()].sort((e,t)=>e.repository.name.localeCompare(t.repository.name))},[eg]),ek=!!_.trim()||em!==eF||ex!==eF||H!==eF||G!==eF;return(0,t.jsxs)("section",{className:"flex w-full flex-col gap-6",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:r("title")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:r("description")})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsxs)(el.K,{disabled:b||et.active,onClick:()=>void eo(),variant:"outline",children:[(0,t.jsx)(A.f,{className:x?"animate-spin":void 0})," ",r("refresh")]}),(0,t.jsxs)(el.K,{disabled:b||et.active||!d?.agents.length,onClick:()=>void et.start(d?.agents.flatMap(({agent:e,codebases:t})=>t.map(({repository:t,codebase:s})=>({codebaseId:s.id,repositoryName:t.name,agentName:e.name,folder:s.folder})))??[]),variant:"outline",children:[et.active?(0,t.jsx)(eb.f,{"aria-hidden":"true"}):(0,t.jsx)(g.f,{})," ",et.active&&et.batch?r(`fetchProgress.${et.batch.phase}`):r("fetchNow")]}),(0,t.jsxs)(el.K,{onClick:()=>B(!0),variant:"outline",children:[(0,t.jsx)(n.f,{})," ",r("hidden",{count:d?.hiddenCount??0})]}),(0,t.jsxs)(ej.d,{onValueChange:e=>{("agent"===e||"repository"===e)&&(m(e),window.localStorage.setItem(eM,e))},value:p,children:[(0,t.jsx)(ej.P,{"aria-label":r("groupBy"),children:(0,t.jsx)(ej.U,{})}),(0,t.jsxs)(ej.r,{children:[(0,t.jsx)(ej.T,{value:"agent",children:r("groupByAgent")}),(0,t.jsx)(ej.T,{value:"repository",children:r("groupByRepository")})]})]}),(0,t.jsxs)(ew.z,{"aria-label":`${r("cards")} / ${r("table")}`,onValueChange:e=>{("cards"===e||"table"===e)&&(h(e),window.localStorage.setItem(e_,e))},spacing:0,type:"single",value:u,variant:"outline",children:[(0,t.jsx)(ew.H,{"aria-label":r("cards"),className:"px-2",value:"cards",children:(0,t.jsx)(k.f,{})}),(0,t.jsx)(ew.H,{"aria-label":r("table"),className:"px-2",value:"table",children:(0,t.jsx)(y.f,{})})]})]})]}),et.batch&&(0,t.jsx)(eD.f,{batch:et.batch,onDismiss:et.dismiss,onRetry:()=>void et.retryPageUpdate()}),(0,t.jsx)(eO.f,{error:w,onDismiss:()=>I(null)}),(0,t.jsx)(eO.f,{error:S}),C&&(0,t.jsx)(ei.J,{children:(0,t.jsx)(ei.p,{children:C})}),d&&d.agents.length>0&&(0,t.jsxs)("div",{"aria-label":r("filters"),className:"flex flex-wrap items-start gap-2",role:"search",children:[(0,t.jsxs)("div",{className:"relative min-w-0 flex-[2_1_18rem]",children:[(0,t.jsx)(W.f,{className:"pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(ep.f,{"aria-label":r("searchWorktrees"),className:"pl-9",onChange:e=>M(e.target.value),placeholder:r("searchWorktreesPlaceholder"),type:"search",value:_})]}),(0,t.jsxs)("div",{className:"min-w-0 flex-[1_1_12rem]",children:[(0,t.jsx)(ef.f,{disabled:!!O.activeAgentId,onValueChange:F,value:em,options:[{value:eF,label:r("allAgents")},...d.agents.map(({agent:e})=>({value:e.id,label:e.name,keywords:e.hostname})),...O.activeAgentId&&!d.agents.some(({agent:e})=>e.id===O.activeAgentId)?[{value:O.activeAgentId,label:O.activeAgent?.name??L("unavailable")}]:[]],ariaLabel:r("filterByAgent"),placeholder:r("allAgents"),searchPlaceholder:L("search"),emptyMessage:L("empty")}),O.activeAgentId&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:L("controlled")})]}),(0,t.jsx)("div",{className:"min-w-0 flex-[1_1_12rem]",children:(0,t.jsx)(ef.f,{onValueChange:z,value:ex,options:[{value:eF,label:r("allRepositories")},...ec.map(e=>({value:e.id,label:e.name,keywords:e.displayOrigin}))],ariaLabel:r("filterByRepository"),placeholder:r("allRepositories"),searchPlaceholder:r("searchRepositories"),emptyMessage:r("noRepositories")})}),(0,t.jsx)("div",{className:"min-w-0 flex-[1_1_12rem]",children:(0,t.jsxs)(ej.d,{onValueChange:J,value:H,children:[(0,t.jsx)(ej.P,{"aria-label":r("filterByChanges"),className:"w-full",children:(0,t.jsx)(ej.U,{})}),(0,t.jsxs)(ej.r,{children:[(0,t.jsx)(ej.T,{value:eF,children:r("allWorktrees")}),(0,t.jsx)(ej.T,{value:eV,children:r("dirtyWorktrees")}),(0,t.jsx)(ej.T,{value:ez,children:r("cleanWorktrees")})]})]})}),(0,t.jsx)("div",{className:"min-w-0 flex-[1_1_12rem]",children:(0,t.jsxs)(ej.d,{onValueChange:Y,value:G,children:[(0,t.jsx)(ej.P,{"aria-label":r("filterByBranch"),className:"w-full",children:(0,t.jsx)(ej.U,{})}),(0,t.jsxs)(ej.r,{children:[(0,t.jsx)(ej.T,{value:eF,children:r("allBranches")}),(0,t.jsx)(ej.T,{value:eH,children:r("nonDefaultBranches")}),(0,t.jsx)(ej.T,{value:eJ,children:r("openPullRequests")})]})]})})]}),d&&d.activeMoves.length>0&&(0,t.jsx)(e5,{moves:d.activeMoves,onError:I,onNotice:E,onReload:Z}),d&&(0,t.jsx)(e4,{onCreated:async()=>{await Z(),E(r("worktreeCreated"))},overview:d}),O.ready&&(!x||d)?d?.agents.length?ek&&0===eg.length?(0,t.jsx)(eh.e,{className:"border py-12",children:(0,t.jsxs)(eh.c,{children:[(0,t.jsx)(eh.B,{variant:"icon",children:(0,t.jsx)(W.f,{})}),(0,t.jsx)(eh.p,{children:r("noMatchingWorktrees")}),(0,t.jsx)(eh.Y,{children:r("noMatchingWorktreesDescription")})]})}):"repository"===p?ev.map(s=>(0,t.jsx)(e8,{appId:e,allTags:d.tags,editorVariant:d.settings.editorVariant,inspectionRefreshToken:R,layout:u,onManageTags:()=>$(!0),onOpenTicket:e=>en(e),onReload:Z,onUpdate:ed,overview:d,repositoryGroup:s},s.repository.id)):eg.map(s=>(0,t.jsx)(e6,{appId:e,agentGroup:s,allTags:d.tags,editorVariant:d.settings.editorVariant,inspectionRefreshToken:R,layout:u,onManageTags:()=>$(!0),onOpenTicket:e=>en(e),onReload:Z,onUpdate:ed,overview:d},s.agent.id)):(0,t.jsx)(eh.e,{className:"border py-12",children:(0,t.jsxs)(eh.c,{children:[(0,t.jsx)(eh.B,{variant:"icon",children:(0,t.jsx)(j.f,{})}),(0,t.jsx)(eh.p,{children:r("emptyTitle")}),(0,t.jsx)(eh.Y,{children:r("emptyDescription")})]})}):(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(eb.f,{})," ",r("loading")]}),(0,t.jsx)(tS,{onChanged:Z,onOpenChange:$,open:D,tags:d?.tags??[]}),(0,t.jsx)(tN,{appId:e,onChanged:Z,onOpenChange:B,open:P}),(0,t.jsx)(er.f,{issueKey:l,onClose:()=>en(null),onTicketChange:e=>{c(t=>t?eX(t,e):t)}})]})},"S",0,eX])}])})();
|