@cat-factory/app 0.28.1 → 0.29.0
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/app/components/board/AgentFailureCard.vue +7 -1
- package/app/components/documents/DocumentImportModal.vue +10 -0
- package/app/components/documents/DocumentSourceConnectModal.vue +11 -0
- package/app/components/environments/EnvironmentStatusPanel.vue +76 -0
- package/app/components/github/GitHubPanel.vue +10 -0
- package/app/components/layout/IntegrationBackTitle.vue +27 -0
- package/app/components/layout/IntegrationsHub.vue +3 -2
- package/app/components/panels/AgentStepDetail.vue +37 -0
- package/app/components/providers/VendorCredentialsModal.vue +10 -0
- package/app/components/provisioning/ProvisioningLogsDrawer.vue +98 -0
- package/app/components/settings/LocalModelEndpointsPanel.vue +10 -0
- package/app/components/settings/ObservabilityConnectionPanel.vue +10 -0
- package/app/components/settings/OpenRouterCatalogPanel.vue +10 -0
- package/app/components/settings/ProviderConnectionPanel.vue +34 -1
- package/app/components/settings/UserSecretsSection.vue +10 -0
- package/app/components/settings/WorkspaceSettingsPanel.vue +10 -0
- package/app/components/slack/SlackPanel.vue +10 -0
- package/app/components/tasks/TaskImportModal.vue +10 -0
- package/app/components/tasks/TaskSourceConnectModal.vue +11 -0
- package/app/composables/api/provisioningLogs.ts +21 -0
- package/app/composables/useApi.ts +2 -0
- package/app/stores/provisioningLogs.ts +70 -0
- package/app/stores/ui.ts +31 -0
- package/app/types/execution.ts +21 -0
- package/app/types/provisioningLogs.ts +32 -0
- package/package.json +1 -1
|
@@ -15,7 +15,13 @@ const agentRuns = useAgentRunsStore()
|
|
|
15
15
|
|
|
16
16
|
const compact = computed(() => props.variant === 'compact')
|
|
17
17
|
const failure = computed(() => props.run.failure)
|
|
18
|
-
const title = computed(() =>
|
|
18
|
+
const title = computed(() => {
|
|
19
|
+
// A `dispatch` failure means the container/runner never accepted the job — say so
|
|
20
|
+
// explicitly rather than the generic "Run failed", and show the verbatim provider
|
|
21
|
+
// error in the collapsible detail below.
|
|
22
|
+
if (failure.value?.kind === 'dispatch') return 'Container failed to start'
|
|
23
|
+
return props.run.kind === 'bootstrap' ? 'Bootstrap failed' : 'Run failed'
|
|
24
|
+
})
|
|
19
25
|
const retryLabel = computed(() =>
|
|
20
26
|
props.run.kind === 'bootstrap' ? 'Retry bootstrap' : 'Retry run',
|
|
21
27
|
)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { DocumentSourceKind } from '~/types/domain'
|
|
3
|
+
import IntegrationBackTitle from '~/components/layout/IntegrationBackTitle.vue'
|
|
3
4
|
|
|
4
5
|
// Import pages from a connected document source and pick one to expand into
|
|
5
6
|
// board structure. A source selector lets the user choose which connected source
|
|
@@ -74,6 +75,15 @@ function preview(externalId: string) {
|
|
|
74
75
|
|
|
75
76
|
<template>
|
|
76
77
|
<UModal v-model:open="open" title="Import from a document source">
|
|
78
|
+
<template #title>
|
|
79
|
+
<IntegrationBackTitle
|
|
80
|
+
title="Import from a document source"
|
|
81
|
+
@back="
|
|
82
|
+
open = false
|
|
83
|
+
ui.openIntegrations()
|
|
84
|
+
"
|
|
85
|
+
/>
|
|
86
|
+
</template>
|
|
77
87
|
<template #body>
|
|
78
88
|
<div v-if="!documents.anyConnected" class="space-y-3 text-center">
|
|
79
89
|
<UIcon name="i-lucide-plug" class="mx-auto h-8 w-8 text-slate-500" />
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
// same modal serves Confluence, Notion and any future source. Secret credentials
|
|
5
5
|
// are write-only — the backend never returns them, so on reload we show
|
|
6
6
|
// "Connected" with empty fields.
|
|
7
|
+
import IntegrationBackTitle from '~/components/layout/IntegrationBackTitle.vue'
|
|
8
|
+
|
|
7
9
|
const ui = useUiStore()
|
|
8
10
|
const documents = useDocumentsStore()
|
|
9
11
|
const toast = useToast()
|
|
@@ -77,6 +79,15 @@ async function disconnect() {
|
|
|
77
79
|
|
|
78
80
|
<template>
|
|
79
81
|
<UModal v-model:open="open" :title="descriptor?.label ?? 'Connect source'">
|
|
82
|
+
<template #title>
|
|
83
|
+
<IntegrationBackTitle
|
|
84
|
+
:title="descriptor?.label ?? 'Connect source'"
|
|
85
|
+
@back="
|
|
86
|
+
open = false
|
|
87
|
+
ui.openIntegrations()
|
|
88
|
+
"
|
|
89
|
+
/>
|
|
90
|
+
</template>
|
|
80
91
|
<template #body>
|
|
81
92
|
<div v-if="descriptor" class="space-y-4">
|
|
82
93
|
<p class="text-sm text-slate-400">
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// Reusable read-only view of an ephemeral environment's lifecycle: a status badge,
|
|
3
|
+
// the live URL, the TTL, and — when it failed/expired — the verbatim provider error.
|
|
4
|
+
// Used in a run's details (AgentStepDetail) so the Tester (and any env-consuming step)
|
|
5
|
+
// shows whether the env is spinning up / running / shut down / errored, with the error.
|
|
6
|
+
import type { RunEnvironment, HumanTestEnvironmentStatus } from '~/types/execution'
|
|
7
|
+
|
|
8
|
+
defineProps<{ environment: RunEnvironment | null; degradedReason?: string | null }>()
|
|
9
|
+
|
|
10
|
+
const ENV_STATUS_META: Record<
|
|
11
|
+
HumanTestEnvironmentStatus,
|
|
12
|
+
{ label: string; color: string; icon: string }
|
|
13
|
+
> = {
|
|
14
|
+
provisioning: { label: 'Spinning up…', color: 'text-amber-300', icon: 'i-lucide-loader-circle' },
|
|
15
|
+
ready: { label: 'Running', color: 'text-emerald-300', icon: 'i-lucide-circle-dot' },
|
|
16
|
+
failed: { label: 'Errored', color: 'text-rose-300', icon: 'i-lucide-circle-alert' },
|
|
17
|
+
expired: { label: 'Expired', color: 'text-slate-400', icon: 'i-lucide-circle-off' },
|
|
18
|
+
tearing_down: {
|
|
19
|
+
label: 'Shutting down…',
|
|
20
|
+
color: 'text-slate-400',
|
|
21
|
+
icon: 'i-lucide-loader-circle',
|
|
22
|
+
},
|
|
23
|
+
torn_down: { label: 'Shut down', color: 'text-slate-400', icon: 'i-lucide-circle-off' },
|
|
24
|
+
}
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<section class="rounded-lg border border-slate-800 bg-slate-900/60 p-3">
|
|
29
|
+
<h3 class="mb-2 text-[11px] font-semibold uppercase tracking-wide text-slate-500">
|
|
30
|
+
Ephemeral environment
|
|
31
|
+
</h3>
|
|
32
|
+
<div v-if="environment" class="space-y-2">
|
|
33
|
+
<div class="flex items-center gap-2 text-[13px]">
|
|
34
|
+
<UIcon
|
|
35
|
+
:name="ENV_STATUS_META[environment.status].icon"
|
|
36
|
+
class="h-3.5 w-3.5"
|
|
37
|
+
:class="[
|
|
38
|
+
ENV_STATUS_META[environment.status].color,
|
|
39
|
+
{
|
|
40
|
+
'animate-spin':
|
|
41
|
+
environment.status === 'provisioning' || environment.status === 'tearing_down',
|
|
42
|
+
},
|
|
43
|
+
]"
|
|
44
|
+
/>
|
|
45
|
+
<span :class="ENV_STATUS_META[environment.status].color">{{
|
|
46
|
+
ENV_STATUS_META[environment.status].label
|
|
47
|
+
}}</span>
|
|
48
|
+
</div>
|
|
49
|
+
<a
|
|
50
|
+
v-if="environment.url"
|
|
51
|
+
:href="environment.url"
|
|
52
|
+
target="_blank"
|
|
53
|
+
rel="noopener"
|
|
54
|
+
class="inline-flex items-center gap-1.5 break-all text-[13px] text-sky-300 hover:underline"
|
|
55
|
+
>
|
|
56
|
+
<UIcon name="i-lucide-external-link" class="h-3.5 w-3.5 shrink-0" />
|
|
57
|
+
{{ environment.url }}
|
|
58
|
+
</a>
|
|
59
|
+
<p v-if="environment.expiresAt" class="text-[11px] text-slate-500">
|
|
60
|
+
Expires {{ new Date(environment.expiresAt).toLocaleString() }}
|
|
61
|
+
</p>
|
|
62
|
+
<!-- The verbatim provider error when the environment failed/expired. -->
|
|
63
|
+
<pre
|
|
64
|
+
v-if="
|
|
65
|
+
environment.lastError &&
|
|
66
|
+
(environment.status === 'failed' || environment.status === 'expired')
|
|
67
|
+
"
|
|
68
|
+
class="mt-1 max-h-32 overflow-auto whitespace-pre-wrap rounded border border-rose-900/60 bg-rose-950/40 p-1.5 text-[11px] text-rose-200/90"
|
|
69
|
+
>{{ environment.lastError }}</pre
|
|
70
|
+
>
|
|
71
|
+
</div>
|
|
72
|
+
<p v-else class="text-[12px] text-slate-500">
|
|
73
|
+
{{ degradedReason ?? 'No ephemeral environment for this run.' }}
|
|
74
|
+
</p>
|
|
75
|
+
</section>
|
|
76
|
+
</template>
|
|
@@ -10,6 +10,7 @@ import type { GitHubPullRequest, GitHubRepo } from '~/types/domain'
|
|
|
10
10
|
// tag, so it silently renders as an empty element. Importing it directly binds
|
|
11
11
|
// the tag unambiguously.
|
|
12
12
|
import GitHubConnect from './GitHubConnect.vue'
|
|
13
|
+
import IntegrationBackTitle from '~/components/layout/IntegrationBackTitle.vue'
|
|
13
14
|
|
|
14
15
|
const ui = useUiStore()
|
|
15
16
|
const github = useGitHubStore()
|
|
@@ -199,6 +200,15 @@ async function merge(pr: GitHubPullRequest) {
|
|
|
199
200
|
|
|
200
201
|
<template>
|
|
201
202
|
<UModal v-model:open="open" title="GitHub" :ui="{ content: 'max-w-2xl' }">
|
|
203
|
+
<template #title>
|
|
204
|
+
<IntegrationBackTitle
|
|
205
|
+
title="GitHub"
|
|
206
|
+
@back="
|
|
207
|
+
open = false
|
|
208
|
+
ui.openIntegrations()
|
|
209
|
+
"
|
|
210
|
+
/>
|
|
211
|
+
</template>
|
|
202
212
|
<template #body>
|
|
203
213
|
<div class="space-y-5">
|
|
204
214
|
<!-- not connected: connect -->
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// Title content for an integration sub-panel's modal header. Renders the panel
|
|
3
|
+
// title with a leading "back" control that returns to the Integrations hub, shown
|
|
4
|
+
// only when the panel was actually reached from there (`ui.cameFromIntegrations`).
|
|
5
|
+
// Panels opened from the command bar, sidebar, a banner or an inspector link don't
|
|
6
|
+
// grow a dead Back. Dropped into a UModal's #title slot, so it inherits the modal's
|
|
7
|
+
// title styling; it emits `back` and the host panel closes itself + reopens the hub.
|
|
8
|
+
defineProps<{ title?: string }>()
|
|
9
|
+
const emit = defineEmits<{ back: [] }>()
|
|
10
|
+
const ui = useUiStore()
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<span class="flex items-center gap-1.5">
|
|
15
|
+
<UButton
|
|
16
|
+
v-if="ui.cameFromIntegrations"
|
|
17
|
+
icon="i-lucide-arrow-left"
|
|
18
|
+
color="neutral"
|
|
19
|
+
variant="ghost"
|
|
20
|
+
size="xs"
|
|
21
|
+
class="-ml-1.5 shrink-0"
|
|
22
|
+
aria-label="Back to Integrations"
|
|
23
|
+
@click.stop="emit('back')"
|
|
24
|
+
/>
|
|
25
|
+
<span class="min-w-0 truncate">{{ title }}</span>
|
|
26
|
+
</span>
|
|
27
|
+
</template>
|
|
@@ -64,9 +64,10 @@ interface IntegrationGroup {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
// Run an integration's open handler, then dismiss the hub so its panel takes over.
|
|
67
|
+
// `openFromIntegrations` also marks that the panel was reached from here, so the panel
|
|
68
|
+
// renders a "Back to Integrations" control (see IntegrationBackTitle).
|
|
67
69
|
function go(fn: () => void) {
|
|
68
|
-
fn
|
|
69
|
-
ui.closeIntegrations()
|
|
70
|
+
ui.openFromIntegrations(fn)
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
const groups = computed<IntegrationGroup[]>(() => {
|
|
@@ -6,6 +6,8 @@ import { agentKindMeta } from '~/utils/catalog'
|
|
|
6
6
|
import StepRestartControl from '~/components/panels/StepRestartControl.vue'
|
|
7
7
|
import StepMetadataCard from '~/components/panels/StepMetadataCard.vue'
|
|
8
8
|
import StepTestReport from '~/components/panels/StepTestReport.vue'
|
|
9
|
+
import EnvironmentStatusPanel from '~/components/environments/EnvironmentStatusPanel.vue'
|
|
10
|
+
import ProvisioningLogsDrawer from '~/components/provisioning/ProvisioningLogsDrawer.vue'
|
|
9
11
|
import { useStepTimer } from '~/composables/useStepTimer'
|
|
10
12
|
import { useStepProse } from '~/composables/useStepProse'
|
|
11
13
|
import { useStepApproval } from '~/composables/useStepApproval'
|
|
@@ -50,6 +52,16 @@ const pctOf = (n: number) => `${Math.round(n * 100)}%`
|
|
|
50
52
|
const testReport = computed(() => step.value?.test?.lastReport ?? null)
|
|
51
53
|
const testPhase = computed(() => step.value?.test ?? null)
|
|
52
54
|
|
|
55
|
+
// The ephemeral environment this step runs against (deployer provisions it; tester/
|
|
56
|
+
// coder consume it), so the panel shows its spinning-up/running/shutdown/errored state.
|
|
57
|
+
const stepEnvironment = computed(() => step.value?.environment ?? null)
|
|
58
|
+
|
|
59
|
+
// The run's infrastructure attempts (container/runner/env spin-up + tear-down), behind
|
|
60
|
+
// a toggle. This is the surface that makes the per-run `container` log rows + the
|
|
61
|
+
// executionId filter visible — most useful when the run failed to start a container.
|
|
62
|
+
const showProvisioning = ref(false)
|
|
63
|
+
const executionId = computed(() => instance.value?.id ?? null)
|
|
64
|
+
|
|
53
65
|
// A failed run is no longer executing: a step left mid-flight (state still
|
|
54
66
|
// `working`, no `finishedAt`) must stop looking live — no ticking clock, no
|
|
55
67
|
// "spinning up" phase, no spinner.
|
|
@@ -310,6 +322,31 @@ async function copyOutput() {
|
|
|
310
322
|
@resolve="resolveCompanionCap"
|
|
311
323
|
/>
|
|
312
324
|
|
|
325
|
+
<!-- ephemeral environment lifecycle (spinning up / running / shut down /
|
|
326
|
+
errored + the exact error), when this step runs against one -->
|
|
327
|
+
<EnvironmentStatusPanel v-if="stepEnvironment" :environment="stepEnvironment" />
|
|
328
|
+
|
|
329
|
+
<!-- this run's infrastructure attempts (container/runner/env spin-up +
|
|
330
|
+
tear-down): the surface for the per-run container log rows + the exact
|
|
331
|
+
provider error, behind a toggle (most useful on a failed-to-start run) -->
|
|
332
|
+
<div v-if="executionId">
|
|
333
|
+
<UButton
|
|
334
|
+
:icon="showProvisioning ? 'i-lucide-chevron-up' : 'i-lucide-scroll-text'"
|
|
335
|
+
variant="ghost"
|
|
336
|
+
size="xs"
|
|
337
|
+
@click="showProvisioning = !showProvisioning"
|
|
338
|
+
>
|
|
339
|
+
{{
|
|
340
|
+
showProvisioning ? 'Hide infrastructure attempts' : 'Infrastructure attempts'
|
|
341
|
+
}}
|
|
342
|
+
</UButton>
|
|
343
|
+
<ProvisioningLogsDrawer
|
|
344
|
+
v-if="showProvisioning"
|
|
345
|
+
class="mt-2"
|
|
346
|
+
:execution-id="executionId"
|
|
347
|
+
/>
|
|
348
|
+
</div>
|
|
349
|
+
|
|
313
350
|
<!-- tester report: what was tested, the per-area outcomes, the concerns
|
|
314
351
|
it raised and the greenlight verdict; plus the fixer-loop phase -->
|
|
315
352
|
<StepTestReport v-if="testReport" :report="testReport" :phase="testPhase" />
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
// (Claude, GLM, ChatGPT/Codex) are connected per-user in the Personal subscriptions section.
|
|
8
8
|
import { computed, ref, watch } from 'vue'
|
|
9
9
|
import type { SubscriptionVendor } from '~/types/domain'
|
|
10
|
+
import IntegrationBackTitle from '~/components/layout/IntegrationBackTitle.vue'
|
|
10
11
|
|
|
11
12
|
const ui = useUiStore()
|
|
12
13
|
const workspace = useWorkspaceStore()
|
|
@@ -116,6 +117,15 @@ function vendorLabel(v: SubscriptionVendor): string {
|
|
|
116
117
|
|
|
117
118
|
<template>
|
|
118
119
|
<UModal v-model:open="open" title="LLM Vendors" :ui="{ content: 'max-w-2xl' }">
|
|
120
|
+
<template #title>
|
|
121
|
+
<IntegrationBackTitle
|
|
122
|
+
title="LLM Vendors"
|
|
123
|
+
@back="
|
|
124
|
+
open = false
|
|
125
|
+
ui.openIntegrations()
|
|
126
|
+
"
|
|
127
|
+
/>
|
|
128
|
+
</template>
|
|
119
129
|
<template #body>
|
|
120
130
|
<UTabs
|
|
121
131
|
v-model="activeTab"
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// The "View logs" surface for the unified provisioning event log: every attempt to
|
|
3
|
+
// spin up / tear down infrastructure (environment provider, runner-pool, or per-run
|
|
4
|
+
// container), with its outcome and — for failures — the verbatim provider/runtime
|
|
5
|
+
// error. Two modes, mutually exclusive: pass `subsystem` for the provider config
|
|
6
|
+
// panels' drawer, or `executionId` for a run's "Infrastructure attempts" drawer (which
|
|
7
|
+
// surfaces that run's container/runner/env attempts). Loaded on mount + re-loadable.
|
|
8
|
+
import { onMounted } from 'vue'
|
|
9
|
+
import type { ProvisioningOperation, ProvisioningSubsystem } from '~/types/provisioningLogs'
|
|
10
|
+
|
|
11
|
+
const props = defineProps<{ subsystem?: ProvisioningSubsystem; executionId?: string }>()
|
|
12
|
+
|
|
13
|
+
const store = useProvisioningLogsStore()
|
|
14
|
+
const state = computed(() =>
|
|
15
|
+
props.executionId
|
|
16
|
+
? (store.byExecution[props.executionId] ?? { entries: [], loading: false, error: null })
|
|
17
|
+
: store.bySubsystem[props.subsystem ?? 'environment'],
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
function reload() {
|
|
21
|
+
if (props.executionId) void store.loadForExecution(props.executionId)
|
|
22
|
+
else if (props.subsystem) void store.load(props.subsystem)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
onMounted(reload)
|
|
26
|
+
|
|
27
|
+
const OPERATION_LABEL: Record<ProvisioningOperation, string> = {
|
|
28
|
+
provision: 'Spin up',
|
|
29
|
+
teardown: 'Tear down',
|
|
30
|
+
status: 'Status check',
|
|
31
|
+
dispatch: 'Spin up',
|
|
32
|
+
release: 'Tear down',
|
|
33
|
+
'poll-failure': 'Health check',
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function when(epochMs: number): string {
|
|
37
|
+
return new Date(epochMs).toLocaleString()
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<div class="rounded-lg border border-slate-700 bg-slate-900/50">
|
|
43
|
+
<div class="flex items-center justify-between border-b border-slate-800 px-3 py-2">
|
|
44
|
+
<p class="text-[11px] font-semibold uppercase tracking-wide text-slate-400">
|
|
45
|
+
Provisioning logs
|
|
46
|
+
</p>
|
|
47
|
+
<UButton
|
|
48
|
+
icon="i-lucide-rotate-ccw"
|
|
49
|
+
variant="ghost"
|
|
50
|
+
size="xs"
|
|
51
|
+
:loading="state.loading"
|
|
52
|
+
@click="reload"
|
|
53
|
+
>
|
|
54
|
+
Refresh
|
|
55
|
+
</UButton>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<p v-if="state.error" class="px-3 py-2 text-[12px] text-rose-300">{{ state.error }}</p>
|
|
59
|
+
<p
|
|
60
|
+
v-else-if="!state.loading && state.entries.length === 0"
|
|
61
|
+
class="px-3 py-3 text-[12px] text-slate-500"
|
|
62
|
+
>
|
|
63
|
+
No provisioning attempts recorded yet.
|
|
64
|
+
</p>
|
|
65
|
+
|
|
66
|
+
<ul v-else class="max-h-80 divide-y divide-slate-800 overflow-auto">
|
|
67
|
+
<li v-for="entry in state.entries" :key="entry.id" class="px-3 py-2">
|
|
68
|
+
<div class="flex items-center gap-2 text-[12px]">
|
|
69
|
+
<UIcon
|
|
70
|
+
:name="entry.outcome === 'success' ? 'i-lucide-check-circle' : 'i-lucide-x-circle'"
|
|
71
|
+
class="h-3.5 w-3.5 shrink-0"
|
|
72
|
+
:class="entry.outcome === 'success' ? 'text-emerald-400' : 'text-rose-400'"
|
|
73
|
+
/>
|
|
74
|
+
<span class="font-medium text-slate-200">{{ OPERATION_LABEL[entry.operation] }}</span>
|
|
75
|
+
<span
|
|
76
|
+
class="rounded px-1.5 py-0.5 text-[10px] uppercase tracking-wide"
|
|
77
|
+
:class="
|
|
78
|
+
entry.outcome === 'success'
|
|
79
|
+
? 'bg-emerald-950/60 text-emerald-300'
|
|
80
|
+
: 'bg-rose-950/60 text-rose-300'
|
|
81
|
+
"
|
|
82
|
+
>{{ entry.outcome }}</span
|
|
83
|
+
>
|
|
84
|
+
<span class="ml-auto text-[11px] text-slate-500">{{ when(entry.createdAt) }}</span>
|
|
85
|
+
</div>
|
|
86
|
+
<div v-if="entry.targetId" class="mt-0.5 text-[11px] text-slate-500">
|
|
87
|
+
{{ entry.providerId ? `${entry.providerId} · ` : '' }}{{ entry.targetId }}
|
|
88
|
+
</div>
|
|
89
|
+
<!-- The verbatim provider/runtime error on a failed attempt. -->
|
|
90
|
+
<pre
|
|
91
|
+
v-if="entry.error"
|
|
92
|
+
class="mt-1 max-h-28 overflow-auto whitespace-pre-wrap rounded border border-rose-900/50 bg-rose-950/30 p-1.5 text-[11px] text-rose-200/90"
|
|
93
|
+
>{{ entry.error }}</pre
|
|
94
|
+
>
|
|
95
|
+
</li>
|
|
96
|
+
</ul>
|
|
97
|
+
</div>
|
|
98
|
+
</template>
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
// automatically in the per-workspace model picker. One endpoint per runner type.
|
|
8
8
|
import { computed, ref, watch } from 'vue'
|
|
9
9
|
import { LOCAL_RUNNER_DEFAULTS, LOCAL_RUNNER_LABELS, type LocalRunner } from '~/types/localModels'
|
|
10
|
+
import IntegrationBackTitle from '~/components/layout/IntegrationBackTitle.vue'
|
|
10
11
|
|
|
11
12
|
const ui = useUiStore()
|
|
12
13
|
const store = useLocalModelsStore()
|
|
@@ -152,6 +153,15 @@ async function remove(p: LocalRunner) {
|
|
|
152
153
|
|
|
153
154
|
<template>
|
|
154
155
|
<UModal v-model:open="open" title="My local runners" :ui="{ content: 'max-w-2xl' }">
|
|
156
|
+
<template #title>
|
|
157
|
+
<IntegrationBackTitle
|
|
158
|
+
title="My local runners"
|
|
159
|
+
@back="
|
|
160
|
+
open = false
|
|
161
|
+
ui.openIntegrations()
|
|
162
|
+
"
|
|
163
|
+
/>
|
|
164
|
+
</template>
|
|
155
165
|
<template #body>
|
|
156
166
|
<div class="space-y-4">
|
|
157
167
|
<p class="text-xs text-slate-400">
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
// block-id entry here. Opened from the Integrations hub.
|
|
7
7
|
import { computed, reactive, ref, watch } from 'vue'
|
|
8
8
|
import type { ObservabilityProviderKind } from '~/types/releaseHealth'
|
|
9
|
+
import IntegrationBackTitle from '~/components/layout/IntegrationBackTitle.vue'
|
|
9
10
|
|
|
10
11
|
const ui = useUiStore()
|
|
11
12
|
const store = useReleaseHealthStore()
|
|
@@ -128,6 +129,15 @@ const connectedLabel = computed(() => {
|
|
|
128
129
|
|
|
129
130
|
<template>
|
|
130
131
|
<UModal v-model:open="open" title="Post-release health" :ui="{ content: 'max-w-lg' }">
|
|
132
|
+
<template #title>
|
|
133
|
+
<IntegrationBackTitle
|
|
134
|
+
title="Post-release health"
|
|
135
|
+
@back="
|
|
136
|
+
open = false
|
|
137
|
+
ui.openIntegrations()
|
|
138
|
+
"
|
|
139
|
+
/>
|
|
140
|
+
</template>
|
|
131
141
|
<template #body>
|
|
132
142
|
<div class="space-y-4">
|
|
133
143
|
<p class="text-sm text-slate-400">
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
// entry point for the key; this panel just makes OpenRouter self-sufficient.
|
|
10
10
|
import { computed, ref, watch } from 'vue'
|
|
11
11
|
import type { OpenRouterModelMeta } from '~/types/openrouter'
|
|
12
|
+
import IntegrationBackTitle from '~/components/layout/IntegrationBackTitle.vue'
|
|
12
13
|
|
|
13
14
|
const ui = useUiStore()
|
|
14
15
|
const workspace = useWorkspaceStore()
|
|
@@ -193,6 +194,15 @@ function manageKeys() {
|
|
|
193
194
|
|
|
194
195
|
<template>
|
|
195
196
|
<UModal v-model:open="open" title="OpenRouter" :ui="{ content: 'max-w-2xl' }">
|
|
197
|
+
<template #title>
|
|
198
|
+
<IntegrationBackTitle
|
|
199
|
+
title="OpenRouter"
|
|
200
|
+
@back="
|
|
201
|
+
open = false
|
|
202
|
+
ui.openIntegrations()
|
|
203
|
+
"
|
|
204
|
+
/>
|
|
205
|
+
</template>
|
|
196
206
|
<template #body>
|
|
197
207
|
<div class="space-y-4">
|
|
198
208
|
<p class="text-xs text-slate-400">
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
// with a `default` is optional — left blank it falls back to that default.
|
|
10
10
|
import { computed, ref, watch } from 'vue'
|
|
11
11
|
import type { ProviderConnectionKind } from '~/types/providerConnections'
|
|
12
|
+
import IntegrationBackTitle from '~/components/layout/IntegrationBackTitle.vue'
|
|
13
|
+
import ProvisioningLogsDrawer from '~/components/provisioning/ProvisioningLogsDrawer.vue'
|
|
12
14
|
|
|
13
15
|
const ui = useUiStore()
|
|
14
16
|
const store = useProviderConnectionsStore()
|
|
@@ -41,6 +43,14 @@ const meta = computed(() => (kind.value ? META[kind.value] : null))
|
|
|
41
43
|
const descriptor = computed(() => (kind.value ? store.descriptorFor(kind.value) : null))
|
|
42
44
|
const connection = computed(() => (kind.value ? store.connectionFor(kind.value) : null))
|
|
43
45
|
|
|
46
|
+
// "View logs": the provisioning event history for this provider's subsystem — every
|
|
47
|
+
// spin-up / tear-down attempt with its outcome and the exact error. The panel kind
|
|
48
|
+
// maps 1:1 to the log subsystem ('environment' / 'runner-pool').
|
|
49
|
+
const showLogs = ref(false)
|
|
50
|
+
watch(kind, () => {
|
|
51
|
+
showLogs.value = false
|
|
52
|
+
})
|
|
53
|
+
|
|
44
54
|
// Per-field draft values, keyed by field key (blank ⇒ fall back to default/stored value).
|
|
45
55
|
const values = ref<Record<string, string>>({})
|
|
46
56
|
const testResult = ref<{ ok: boolean; message?: string } | null>(null)
|
|
@@ -213,9 +223,32 @@ function fieldHelp(key: string): string | undefined {
|
|
|
213
223
|
|
|
214
224
|
<template>
|
|
215
225
|
<UModal v-model:open="open" :title="meta?.title ?? 'Provider'" :ui="{ content: 'max-w-xl' }">
|
|
226
|
+
<template #title>
|
|
227
|
+
<IntegrationBackTitle
|
|
228
|
+
:title="meta?.title ?? 'Provider'"
|
|
229
|
+
@back="
|
|
230
|
+
open = false
|
|
231
|
+
ui.openIntegrations()
|
|
232
|
+
"
|
|
233
|
+
/>
|
|
234
|
+
</template>
|
|
216
235
|
<template #body>
|
|
217
236
|
<div v-if="descriptor" class="space-y-4">
|
|
218
|
-
<
|
|
237
|
+
<div class="flex items-start justify-between gap-3">
|
|
238
|
+
<p class="text-xs text-slate-400">{{ meta?.blurb }}</p>
|
|
239
|
+
<UButton
|
|
240
|
+
:icon="showLogs ? 'i-lucide-chevron-up' : 'i-lucide-scroll-text'"
|
|
241
|
+
variant="ghost"
|
|
242
|
+
size="xs"
|
|
243
|
+
class="shrink-0"
|
|
244
|
+
@click="showLogs = !showLogs"
|
|
245
|
+
>
|
|
246
|
+
{{ showLogs ? 'Hide logs' : 'View logs' }}
|
|
247
|
+
</UButton>
|
|
248
|
+
</div>
|
|
249
|
+
|
|
250
|
+
<!-- Provisioning attempt history for this provider's subsystem. -->
|
|
251
|
+
<ProvisioningLogsDrawer v-if="showLogs && kind" :subsystem="kind" />
|
|
219
252
|
|
|
220
253
|
<!-- Saved connection summary -->
|
|
221
254
|
<div
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
// access); the secret is write-only server-side and never shown again.
|
|
7
7
|
import { computed, ref, watch } from 'vue'
|
|
8
8
|
import type { ProviderConfigField, UserSecretKind } from '~/types/userSecrets'
|
|
9
|
+
import IntegrationBackTitle from '~/components/layout/IntegrationBackTitle.vue'
|
|
9
10
|
|
|
10
11
|
const ui = useUiStore()
|
|
11
12
|
const store = useUserSecretsStore()
|
|
@@ -123,6 +124,15 @@ async function remove() {
|
|
|
123
124
|
|
|
124
125
|
<template>
|
|
125
126
|
<UModal v-model:open="open" title="My GitHub token" :ui="{ content: 'max-w-xl' }">
|
|
127
|
+
<template #title>
|
|
128
|
+
<IntegrationBackTitle
|
|
129
|
+
title="My GitHub token"
|
|
130
|
+
@back="
|
|
131
|
+
open = false
|
|
132
|
+
ui.openIntegrations()
|
|
133
|
+
"
|
|
134
|
+
/>
|
|
135
|
+
</template>
|
|
126
136
|
<template #body>
|
|
127
137
|
<div class="space-y-4">
|
|
128
138
|
<p class="text-xs text-slate-400">
|
|
@@ -12,6 +12,7 @@ import type { CreateTaskType, TaskLimitMode, WorkspaceSettings } from '~/types/d
|
|
|
12
12
|
import MergeThresholdsPanel from '~/components/settings/MergeThresholdsPanel.vue'
|
|
13
13
|
import IssueTrackerPanel from '~/components/settings/IssueTrackerPanel.vue'
|
|
14
14
|
import ServiceFragmentDefaultsPanel from '~/components/settings/ServiceFragmentDefaultsPanel.vue'
|
|
15
|
+
import IntegrationBackTitle from '~/components/layout/IntegrationBackTitle.vue'
|
|
15
16
|
|
|
16
17
|
const ui = useUiStore()
|
|
17
18
|
const store = useWorkspaceSettingsStore()
|
|
@@ -160,6 +161,15 @@ async function saveBudget() {
|
|
|
160
161
|
|
|
161
162
|
<template>
|
|
162
163
|
<UModal v-model:open="open" title="Workspace settings" :ui="{ content: 'max-w-3xl' }">
|
|
164
|
+
<template #title>
|
|
165
|
+
<IntegrationBackTitle
|
|
166
|
+
title="Workspace settings"
|
|
167
|
+
@back="
|
|
168
|
+
open = false
|
|
169
|
+
ui.openIntegrations()
|
|
170
|
+
"
|
|
171
|
+
/>
|
|
172
|
+
</template>
|
|
163
173
|
<template #body>
|
|
164
174
|
<UTabs
|
|
165
175
|
v-model="activeTab"
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { computed, reactive, ref, watch } from 'vue'
|
|
8
8
|
import type { NotificationType } from '~/types/notifications'
|
|
9
9
|
import type { SlackMemberMappingEntry, SlackMemberRole, SlackRoute } from '~/types/slack'
|
|
10
|
+
import IntegrationBackTitle from '~/components/layout/IntegrationBackTitle.vue'
|
|
10
11
|
|
|
11
12
|
const ui = useUiStore()
|
|
12
13
|
const slack = useSlackStore()
|
|
@@ -141,6 +142,15 @@ async function saveMapping() {
|
|
|
141
142
|
|
|
142
143
|
<template>
|
|
143
144
|
<UModal v-model:open="open" title="Slack notifications" :ui="{ content: 'max-w-2xl' }">
|
|
145
|
+
<template #title>
|
|
146
|
+
<IntegrationBackTitle
|
|
147
|
+
title="Slack notifications"
|
|
148
|
+
@back="
|
|
149
|
+
open = false
|
|
150
|
+
ui.openIntegrations()
|
|
151
|
+
"
|
|
152
|
+
/>
|
|
153
|
+
</template>
|
|
144
154
|
<template #body>
|
|
145
155
|
<div class="space-y-5">
|
|
146
156
|
<p class="text-xs text-slate-400">
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
// each row opens the issue on GitHub.
|
|
9
9
|
import type { TaskSearchResult, TaskSourceKind } from '~/types/domain'
|
|
10
10
|
import type { AddTaskPrefill } from '~/stores/ui'
|
|
11
|
+
import IntegrationBackTitle from '~/components/layout/IntegrationBackTitle.vue'
|
|
11
12
|
|
|
12
13
|
const ui = useUiStore()
|
|
13
14
|
const tasks = useTasksStore()
|
|
@@ -195,6 +196,15 @@ async function doSpawnEpic() {
|
|
|
195
196
|
|
|
196
197
|
<template>
|
|
197
198
|
<UModal v-model:open="open" :title="title">
|
|
199
|
+
<template #title>
|
|
200
|
+
<IntegrationBackTitle
|
|
201
|
+
:title="title"
|
|
202
|
+
@back="
|
|
203
|
+
open = false
|
|
204
|
+
ui.openIntegrations()
|
|
205
|
+
"
|
|
206
|
+
/>
|
|
207
|
+
</template>
|
|
198
208
|
<template #body>
|
|
199
209
|
<!-- Empty state: no source offered (none connected/installed, or all disabled) -->
|
|
200
210
|
<div v-if="!tasks.anyOffered" class="space-y-3 text-center">
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
// connected Jira without disconnecting it. The toggle only applies once a source is
|
|
12
12
|
// available (Jira connected / the GitHub App installed) — there is nothing to offer
|
|
13
13
|
// before that.
|
|
14
|
+
import IntegrationBackTitle from '~/components/layout/IntegrationBackTitle.vue'
|
|
15
|
+
|
|
14
16
|
const ui = useUiStore()
|
|
15
17
|
const tasks = useTasksStore()
|
|
16
18
|
const toast = useToast()
|
|
@@ -104,6 +106,15 @@ async function toggleEnabled(enabled: boolean) {
|
|
|
104
106
|
|
|
105
107
|
<template>
|
|
106
108
|
<UModal v-model:open="open" :title="descriptor?.label ?? 'Task source'">
|
|
109
|
+
<template #title>
|
|
110
|
+
<IntegrationBackTitle
|
|
111
|
+
:title="descriptor?.label ?? 'Task source'"
|
|
112
|
+
@back="
|
|
113
|
+
open = false
|
|
114
|
+
ui.openIntegrations()
|
|
115
|
+
"
|
|
116
|
+
/>
|
|
117
|
+
</template>
|
|
107
118
|
<template #body>
|
|
108
119
|
<div v-if="descriptor" class="space-y-4">
|
|
109
120
|
<p class="text-sm text-slate-400">
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ProvisioningLogEntry, ProvisioningSubsystem } from '~/types/provisioningLogs'
|
|
2
|
+
import type { ApiContext } from './context'
|
|
3
|
+
|
|
4
|
+
/** Read access to the unified provisioning event log (the "View logs" drawers + run details). */
|
|
5
|
+
export function provisioningLogsApi({ http, ws }: ApiContext) {
|
|
6
|
+
return {
|
|
7
|
+
listProvisioningLogs: (
|
|
8
|
+
workspaceId: string,
|
|
9
|
+
params: { subsystem?: ProvisioningSubsystem; executionId?: string; limit?: number } = {},
|
|
10
|
+
) => {
|
|
11
|
+
const q = new URLSearchParams()
|
|
12
|
+
if (params.subsystem) q.set('subsystem', params.subsystem)
|
|
13
|
+
if (params.executionId) q.set('executionId', params.executionId)
|
|
14
|
+
if (params.limit != null) q.set('limit', String(params.limit))
|
|
15
|
+
const qs = q.toString()
|
|
16
|
+
return http<{ entries: ProvisioningLogEntry[] }>(
|
|
17
|
+
`${ws(workspaceId)}/provisioning-logs${qs ? `?${qs}` : ''}`,
|
|
18
|
+
)
|
|
19
|
+
},
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -13,6 +13,7 @@ import { modelsApi } from './api/models'
|
|
|
13
13
|
import { notificationsApi } from './api/notifications'
|
|
14
14
|
import { presetsApi } from './api/presets'
|
|
15
15
|
import { providerConnectionsApi } from './api/providerConnections'
|
|
16
|
+
import { provisioningLogsApi } from './api/provisioningLogs'
|
|
16
17
|
import { recurringApi } from './api/recurring'
|
|
17
18
|
import { releaseHealthApi } from './api/releaseHealth'
|
|
18
19
|
import { sandboxApi } from './api/sandbox'
|
|
@@ -88,6 +89,7 @@ export function useApi() {
|
|
|
88
89
|
...notificationsApi(ctx),
|
|
89
90
|
...presetsApi(ctx),
|
|
90
91
|
...providerConnectionsApi(ctx),
|
|
92
|
+
...provisioningLogsApi(ctx),
|
|
91
93
|
...releaseHealthApi(ctx),
|
|
92
94
|
...recurringApi(ctx),
|
|
93
95
|
...sandboxApi(ctx),
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { defineStore } from 'pinia'
|
|
2
|
+
import { reactive } from 'vue'
|
|
3
|
+
import type { ProvisioningLogEntry, ProvisioningSubsystem } from '~/types/provisioningLogs'
|
|
4
|
+
import { useWorkspaceStore } from '~/stores/workspace'
|
|
5
|
+
|
|
6
|
+
interface LogState {
|
|
7
|
+
entries: ProvisioningLogEntry[]
|
|
8
|
+
loading: boolean
|
|
9
|
+
error: string | null
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function emptyState(): LogState {
|
|
13
|
+
return { entries: [], loading: false, error: null }
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The unified provisioning event log, loaded on demand for two surfaces:
|
|
18
|
+
* - per SUBSYSTEM, for the "View logs" drawers in the environment-provider and
|
|
19
|
+
* self-hosted runner-pool config panels;
|
|
20
|
+
* - per EXECUTION (run), for the "Infrastructure attempts" drawer in a run's step
|
|
21
|
+
* details — this is the surface that makes the `container` rows (per-run container
|
|
22
|
+
* dispatch/release/poll-failure) and the `executionId` filter visible.
|
|
23
|
+
* Each shows every spin-up/tear-down attempt with its outcome + the exact error.
|
|
24
|
+
*/
|
|
25
|
+
export const useProvisioningLogsStore = defineStore('provisioningLogs', () => {
|
|
26
|
+
const api = useApi()
|
|
27
|
+
const bySubsystem = reactive<Record<ProvisioningSubsystem, LogState>>({
|
|
28
|
+
environment: emptyState(),
|
|
29
|
+
'runner-pool': emptyState(),
|
|
30
|
+
container: emptyState(),
|
|
31
|
+
})
|
|
32
|
+
const byExecution = reactive<Record<string, LogState>>({})
|
|
33
|
+
|
|
34
|
+
async function load(subsystem: ProvisioningSubsystem) {
|
|
35
|
+
const ws = useWorkspaceStore()
|
|
36
|
+
const s = bySubsystem[subsystem]
|
|
37
|
+
s.loading = true
|
|
38
|
+
s.error = null
|
|
39
|
+
try {
|
|
40
|
+
const { entries } = await api.listProvisioningLogs(ws.requireId(), { subsystem, limit: 200 })
|
|
41
|
+
s.entries = entries
|
|
42
|
+
} catch (err) {
|
|
43
|
+
s.error = err instanceof Error ? err.message : 'Failed to load logs'
|
|
44
|
+
s.entries = []
|
|
45
|
+
} finally {
|
|
46
|
+
s.loading = false
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async function loadForExecution(executionId: string) {
|
|
51
|
+
const ws = useWorkspaceStore()
|
|
52
|
+
const s = (byExecution[executionId] ??= emptyState())
|
|
53
|
+
s.loading = true
|
|
54
|
+
s.error = null
|
|
55
|
+
try {
|
|
56
|
+
const { entries } = await api.listProvisioningLogs(ws.requireId(), {
|
|
57
|
+
executionId,
|
|
58
|
+
limit: 200,
|
|
59
|
+
})
|
|
60
|
+
s.entries = entries
|
|
61
|
+
} catch (err) {
|
|
62
|
+
s.error = err instanceof Error ? err.message : 'Failed to load logs'
|
|
63
|
+
s.entries = []
|
|
64
|
+
} finally {
|
|
65
|
+
s.loading = false
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return { bySubsystem, byExecution, load, loadForExecution }
|
|
70
|
+
})
|
package/app/stores/ui.ts
CHANGED
|
@@ -85,6 +85,11 @@ export const useUiStore = defineStore('ui', () => {
|
|
|
85
85
|
// local runners, OpenRouter). Replaces the per-integration navbar buttons; each
|
|
86
86
|
// row inside it opens that integration's own panel via the handlers below.
|
|
87
87
|
const integrationsOpen = ref(false)
|
|
88
|
+
// True while an integration's own panel is showing AND it was reached from the hub
|
|
89
|
+
// (not the command bar, sidebar, a banner or an inspector link). Drives the "Back to
|
|
90
|
+
// Integrations" control those panels render: it only offers a return path when there
|
|
91
|
+
// is one. Every direct `open*` below resets it; `openFromIntegrations` sets it.
|
|
92
|
+
const cameFromIntegrations = ref(false)
|
|
88
93
|
|
|
89
94
|
// Workspace-settings modal: a single tabbed window gathering the workspace-wide
|
|
90
95
|
// config (workspace / merge thresholds / issue writeback / service best practices).
|
|
@@ -231,6 +236,7 @@ export const useUiStore = defineStore('ui', () => {
|
|
|
231
236
|
}
|
|
232
237
|
|
|
233
238
|
function openDocumentConnect(source: DocumentSourceKind) {
|
|
239
|
+
cameFromIntegrations.value = false
|
|
234
240
|
documentConnect.value = { source }
|
|
235
241
|
}
|
|
236
242
|
function closeDocumentConnect() {
|
|
@@ -240,6 +246,7 @@ export const useUiStore = defineStore('ui', () => {
|
|
|
240
246
|
targetFrameId: string | null = null,
|
|
241
247
|
source: DocumentSourceKind | null = null,
|
|
242
248
|
) {
|
|
249
|
+
cameFromIntegrations.value = false
|
|
243
250
|
documentImport.value = { source, targetFrameId }
|
|
244
251
|
}
|
|
245
252
|
function closeDocumentImport() {
|
|
@@ -256,12 +263,14 @@ export const useUiStore = defineStore('ui', () => {
|
|
|
256
263
|
spawnPreview.value = null
|
|
257
264
|
}
|
|
258
265
|
function openTaskConnect(source: TaskSourceKind) {
|
|
266
|
+
cameFromIntegrations.value = false
|
|
259
267
|
taskConnect.value = { source }
|
|
260
268
|
}
|
|
261
269
|
function closeTaskConnect() {
|
|
262
270
|
taskConnect.value = null
|
|
263
271
|
}
|
|
264
272
|
function openTaskImport(source: TaskSourceKind | null = null, containerId: string | null = null) {
|
|
273
|
+
cameFromIntegrations.value = false
|
|
265
274
|
taskImport.value = { source, containerId }
|
|
266
275
|
}
|
|
267
276
|
function closeTaskImport() {
|
|
@@ -294,12 +303,14 @@ export const useUiStore = defineStore('ui', () => {
|
|
|
294
303
|
addServiceOpen.value = false
|
|
295
304
|
}
|
|
296
305
|
function openGitHub() {
|
|
306
|
+
cameFromIntegrations.value = false
|
|
297
307
|
githubOpen.value = true
|
|
298
308
|
}
|
|
299
309
|
function closeGitHub() {
|
|
300
310
|
githubOpen.value = false
|
|
301
311
|
}
|
|
302
312
|
function openSlack() {
|
|
313
|
+
cameFromIntegrations.value = false
|
|
303
314
|
slackOpen.value = true
|
|
304
315
|
}
|
|
305
316
|
function closeSlack() {
|
|
@@ -321,12 +332,24 @@ export const useUiStore = defineStore('ui', () => {
|
|
|
321
332
|
commandBarOpen.value = !commandBarOpen.value
|
|
322
333
|
}
|
|
323
334
|
function openIntegrations() {
|
|
335
|
+
// Reaching the hub itself (fresh, or via a panel's Back control) clears the
|
|
336
|
+
// came-from marker — we're at the hub, not inside a hub-spawned panel.
|
|
337
|
+
cameFromIntegrations.value = false
|
|
324
338
|
integrationsOpen.value = true
|
|
325
339
|
}
|
|
326
340
|
function closeIntegrations() {
|
|
327
341
|
integrationsOpen.value = false
|
|
328
342
|
}
|
|
343
|
+
// Open an integration's own panel FROM the hub: run its open handler (which resets
|
|
344
|
+
// `cameFromIntegrations`), then mark that we came from the hub and dismiss it. The
|
|
345
|
+
// panel reads `cameFromIntegrations` to show its Back control.
|
|
346
|
+
function openFromIntegrations(open: () => void) {
|
|
347
|
+
open()
|
|
348
|
+
cameFromIntegrations.value = true
|
|
349
|
+
integrationsOpen.value = false
|
|
350
|
+
}
|
|
329
351
|
function openWorkspaceSettings(tab = 'workspace') {
|
|
352
|
+
cameFromIntegrations.value = false
|
|
330
353
|
workspaceSettingsTab.value = tab
|
|
331
354
|
workspaceSettingsOpen.value = true
|
|
332
355
|
}
|
|
@@ -337,12 +360,14 @@ export const useUiStore = defineStore('ui', () => {
|
|
|
337
360
|
workspaceSettingsTab.value = tab
|
|
338
361
|
}
|
|
339
362
|
function openObservabilityConnection() {
|
|
363
|
+
cameFromIntegrations.value = false
|
|
340
364
|
observabilityConnectionOpen.value = true
|
|
341
365
|
}
|
|
342
366
|
function closeObservabilityConnection() {
|
|
343
367
|
observabilityConnectionOpen.value = false
|
|
344
368
|
}
|
|
345
369
|
function openProviderConnection(kind: 'environment' | 'runner-pool') {
|
|
370
|
+
cameFromIntegrations.value = false
|
|
346
371
|
providerConnectionKind.value = kind
|
|
347
372
|
}
|
|
348
373
|
function closeProviderConnection() {
|
|
@@ -355,12 +380,14 @@ export const useUiStore = defineStore('ui', () => {
|
|
|
355
380
|
modelConfigOpen.value = false
|
|
356
381
|
}
|
|
357
382
|
function openVendorCredentials() {
|
|
383
|
+
cameFromIntegrations.value = false
|
|
358
384
|
vendorCredentialsOpen.value = true
|
|
359
385
|
}
|
|
360
386
|
function closeVendorCredentials() {
|
|
361
387
|
vendorCredentialsOpen.value = false
|
|
362
388
|
}
|
|
363
389
|
function openLocalModels() {
|
|
390
|
+
cameFromIntegrations.value = false
|
|
364
391
|
localModelsOpen.value = true
|
|
365
392
|
}
|
|
366
393
|
function closeLocalModels() {
|
|
@@ -373,12 +400,14 @@ export const useUiStore = defineStore('ui', () => {
|
|
|
373
400
|
sandboxOpen.value = false
|
|
374
401
|
}
|
|
375
402
|
function openUserSecrets() {
|
|
403
|
+
cameFromIntegrations.value = false
|
|
376
404
|
userSecretsOpen.value = true
|
|
377
405
|
}
|
|
378
406
|
function closeUserSecrets() {
|
|
379
407
|
userSecretsOpen.value = false
|
|
380
408
|
}
|
|
381
409
|
function openOpenRouter() {
|
|
410
|
+
cameFromIntegrations.value = false
|
|
382
411
|
openRouterOpen.value = true
|
|
383
412
|
}
|
|
384
413
|
function closeOpenRouter() {
|
|
@@ -465,6 +494,7 @@ export const useUiStore = defineStore('ui', () => {
|
|
|
465
494
|
fragmentLibraryOpen,
|
|
466
495
|
commandBarOpen,
|
|
467
496
|
integrationsOpen,
|
|
497
|
+
cameFromIntegrations,
|
|
468
498
|
workspaceSettingsOpen,
|
|
469
499
|
workspaceSettingsTab,
|
|
470
500
|
observabilityConnectionOpen,
|
|
@@ -524,6 +554,7 @@ export const useUiStore = defineStore('ui', () => {
|
|
|
524
554
|
toggleCommandBar,
|
|
525
555
|
openIntegrations,
|
|
526
556
|
closeIntegrations,
|
|
557
|
+
openFromIntegrations,
|
|
527
558
|
openWorkspaceSettings,
|
|
528
559
|
closeWorkspaceSettings,
|
|
529
560
|
setWorkspaceSettingsTab,
|
package/app/types/execution.ts
CHANGED
|
@@ -339,6 +339,13 @@ export interface PipelineStep {
|
|
|
339
339
|
* Absent on non-human-test steps. Mirrors `humanTestStepStateSchema`.
|
|
340
340
|
*/
|
|
341
341
|
humanTest?: HumanTestStepState | null
|
|
342
|
+
/**
|
|
343
|
+
* The ephemeral environment this step runs against (when its block has one), so a
|
|
344
|
+
* run's details show its lifecycle state + the exact error. Populated by the engine
|
|
345
|
+
* for container/deployer steps; the `human-test` gate uses `humanTest.environment`.
|
|
346
|
+
* Mirrors `runEnvironmentSchema`.
|
|
347
|
+
*/
|
|
348
|
+
environment?: RunEnvironment | null
|
|
342
349
|
}
|
|
343
350
|
|
|
344
351
|
/** One failing CI check the gate's precheck saw (mirrors `gateFailingCheckSchema`). */
|
|
@@ -410,6 +417,20 @@ export interface HumanTestEnvironment {
|
|
|
410
417
|
expiresAt?: number | null
|
|
411
418
|
}
|
|
412
419
|
|
|
420
|
+
/**
|
|
421
|
+
* The ephemeral environment a run's step is associated with — surfaced in run details
|
|
422
|
+
* so its spinning-up / running / shut-down / errored state + the exact error show next
|
|
423
|
+
* to the consuming step (tester/coder). Mirrors `runEnvironmentSchema`.
|
|
424
|
+
*/
|
|
425
|
+
export interface RunEnvironment {
|
|
426
|
+
id: string
|
|
427
|
+
url: string | null
|
|
428
|
+
status: HumanTestEnvironmentStatus
|
|
429
|
+
expiresAt?: number | null
|
|
430
|
+
/** The verbatim provider error when the environment failed/expired, else null. */
|
|
431
|
+
lastError?: string | null
|
|
432
|
+
}
|
|
433
|
+
|
|
413
434
|
/** One fix / pull-main round on a `human-test` gate (mirrors `humanTestRoundSchema`). */
|
|
414
435
|
export interface HumanTestRound {
|
|
415
436
|
kind: 'fix' | 'pull-main'
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Frontend mirror of the unified provisioning event-log wire shapes
|
|
2
|
+
// (`@cat-factory/contracts` provisioning-logs.ts). Drives the "View logs" drawers in
|
|
3
|
+
// the environment-provider + runner-pool config panels and the run-details env surface.
|
|
4
|
+
|
|
5
|
+
export type ProvisioningSubsystem = 'environment' | 'runner-pool' | 'container'
|
|
6
|
+
|
|
7
|
+
export type ProvisioningOperation =
|
|
8
|
+
| 'provision'
|
|
9
|
+
| 'teardown'
|
|
10
|
+
| 'status'
|
|
11
|
+
| 'dispatch'
|
|
12
|
+
| 'release'
|
|
13
|
+
| 'poll-failure'
|
|
14
|
+
|
|
15
|
+
export type ProvisioningOutcome = 'success' | 'failure'
|
|
16
|
+
|
|
17
|
+
/** One provisioning attempt (spin-up / tear-down), as returned by the logs endpoint. */
|
|
18
|
+
export interface ProvisioningLogEntry {
|
|
19
|
+
id: string
|
|
20
|
+
workspaceId: string
|
|
21
|
+
subsystem: ProvisioningSubsystem
|
|
22
|
+
operation: ProvisioningOperation
|
|
23
|
+
targetId: string | null
|
|
24
|
+
providerId: string | null
|
|
25
|
+
blockId: string | null
|
|
26
|
+
executionId: string | null
|
|
27
|
+
outcome: ProvisioningOutcome
|
|
28
|
+
/** The verbatim provider/runtime error on a failure, else null. */
|
|
29
|
+
error: string | null
|
|
30
|
+
detail: string | null
|
|
31
|
+
createdAt: number
|
|
32
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "Reusable Nuxt layer for the Agent Architecture Board SPA (components, stores, composables, pages). Consume it from a thin deployment app via `extends: ['@cat-factory/app']` and point it at your backend with NUXT_PUBLIC_API_BASE. See deploy/frontend for an example.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|