@cat-factory/app 0.72.0 → 0.73.1
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/nodes/TaskCard.vue +12 -2
- package/app/components/bootstrap/BootstrapModal.vue +23 -7
- package/app/components/brainstorm/BrainstormWindow.vue +2 -0
- package/app/components/clarity/ClarityReviewWindow.vue +2 -0
- package/app/components/consensus/ConsensusSessionWindow.vue +2 -0
- package/app/components/focus/BlockFocusView.vue +2 -0
- package/app/components/followUp/FollowUpWindow.vue +2 -0
- package/app/components/gates/GateResultView.vue +2 -0
- package/app/components/humanTest/HumanTestWindow.vue +2 -0
- package/app/components/layout/ConnectionStatusBanner.vue +81 -0
- package/app/components/layout/NotificationsInbox.vue +15 -0
- package/app/components/panels/GenericStructuredResultView.vue +2 -0
- package/app/components/panels/InspectorPanel.vue +30 -1
- package/app/components/panels/inspector/TaskExecution.vue +25 -1
- package/app/components/pipeline/PipelineBuilder.vue +110 -7
- package/app/components/requirements/RequirementsReviewWindow.vue +2 -0
- package/app/components/spec/ServiceSpecWindow.vue +2 -0
- package/app/components/testing/TestReportWindow.vue +91 -0
- package/app/composables/useKeyboardShortcuts.ts +10 -2
- package/app/pages/index.vue +6 -4
- package/app/stores/board.spec.ts +58 -1
- package/app/stores/board.ts +59 -15
- package/app/stores/brainstorm.spec.ts +35 -0
- package/app/stores/brainstorm.ts +11 -2
- package/app/stores/clarity.spec.ts +33 -0
- package/app/stores/clarity.ts +11 -2
- package/app/stores/execution.spec.ts +71 -13
- package/app/stores/execution.ts +44 -6
- package/app/stores/pipelines.ts +53 -0
- package/app/stores/recurringPipelines.ts +5 -1
- package/app/stores/requirements.spec.ts +21 -0
- package/app/stores/requirements.ts +11 -2
- package/app/stores/workspace.ts +1 -1
- package/app/utils/catalog.ts +9 -0
- package/i18n/locales/en.json +56 -5
- package/i18n/locales/es.json +56 -5
- package/i18n/locales/fr.json +56 -5
- package/i18n/locales/he.json +56 -5
- package/i18n/locales/ja.json +56 -5
- package/i18n/locales/pl.json +56 -5
- package/i18n/locales/tr.json +56 -5
- package/i18n/locales/uk.json +56 -5
- package/package.json +2 -2
|
@@ -14,6 +14,7 @@ const agentRuns = useAgentRunsStore()
|
|
|
14
14
|
const reviews = useReviewStage()
|
|
15
15
|
const toast = useToast()
|
|
16
16
|
const { t } = useI18n()
|
|
17
|
+
const { confirm } = useConfirm()
|
|
17
18
|
|
|
18
19
|
const task = computed<Block | undefined>(() => board.getBlock(props.taskId))
|
|
19
20
|
const statusMeta = computed(() => (task.value ? STATUS_META[task.value.status] : null))
|
|
@@ -106,8 +107,17 @@ function review() {
|
|
|
106
107
|
ui.focus(props.taskId)
|
|
107
108
|
}
|
|
108
109
|
|
|
109
|
-
function merge() {
|
|
110
|
-
|
|
110
|
+
async function merge() {
|
|
111
|
+
// Merging a PR into its base is consequential and effectively irreversible — gate it behind a
|
|
112
|
+
// confirm (plain, not the destructive shape). `execution.mergePr` surfaces its own error toast.
|
|
113
|
+
const ok = await confirm({
|
|
114
|
+
title: t('board.task.mergeConfirm.title'),
|
|
115
|
+
description: t('board.task.mergeConfirm.body'),
|
|
116
|
+
confirmLabel: t('board.task.mergeConfirm.confirm'),
|
|
117
|
+
icon: 'i-lucide-git-merge',
|
|
118
|
+
})
|
|
119
|
+
if (!ok) return
|
|
120
|
+
await execution.mergePr(props.taskId)
|
|
111
121
|
}
|
|
112
122
|
|
|
113
123
|
// A `blocked` task is waiting on a human for one of two reasons — an agent-raised
|
|
@@ -444,7 +444,11 @@ const statusLabel = computed<Record<BootstrapStatus, string>>(() => ({
|
|
|
444
444
|
>
|
|
445
445
|
<div class="space-y-2">
|
|
446
446
|
<div class="flex items-center gap-2">
|
|
447
|
-
<UInput
|
|
447
|
+
<UInput
|
|
448
|
+
v-model="repoName"
|
|
449
|
+
:placeholder="t('bootstrap.targetRepo.namePlaceholder')"
|
|
450
|
+
class="w-full"
|
|
451
|
+
/>
|
|
448
452
|
<UButton
|
|
449
453
|
color="neutral"
|
|
450
454
|
variant="subtle"
|
|
@@ -493,7 +497,7 @@ const statusLabel = computed<Record<BootstrapStatus, string>>(() => ({
|
|
|
493
497
|
>
|
|
494
498
|
<UInput
|
|
495
499
|
v-model="description"
|
|
496
|
-
placeholder="
|
|
500
|
+
:placeholder="t('bootstrap.description.placeholder')"
|
|
497
501
|
class="w-full"
|
|
498
502
|
/>
|
|
499
503
|
</UFormField>
|
|
@@ -640,7 +644,7 @@ const statusLabel = computed<Record<BootstrapStatus, string>>(() => ({
|
|
|
640
644
|
<USelect
|
|
641
645
|
v-model="archRepoSlug"
|
|
642
646
|
:items="repoOptions"
|
|
643
|
-
placeholder="
|
|
647
|
+
:placeholder="t('bootstrap.arch.pickRepo.placeholder')"
|
|
644
648
|
class="w-full"
|
|
645
649
|
/>
|
|
646
650
|
</UFormField>
|
|
@@ -650,14 +654,26 @@ const statusLabel = computed<Record<BootstrapStatus, string>>(() => ({
|
|
|
650
654
|
:description="t('bootstrap.arch.name.description')"
|
|
651
655
|
required
|
|
652
656
|
>
|
|
653
|
-
<UInput
|
|
657
|
+
<UInput
|
|
658
|
+
v-model="archForm.name"
|
|
659
|
+
:placeholder="t('bootstrap.arch.name.placeholder')"
|
|
660
|
+
class="w-full"
|
|
661
|
+
/>
|
|
654
662
|
</UFormField>
|
|
655
663
|
<div class="grid grid-cols-2 gap-2">
|
|
656
664
|
<UFormField :label="t('bootstrap.arch.repoOwner')" required>
|
|
657
|
-
<UInput
|
|
665
|
+
<UInput
|
|
666
|
+
v-model="archForm.repoOwner"
|
|
667
|
+
:placeholder="t('bootstrap.arch.repoOwnerPlaceholder')"
|
|
668
|
+
class="w-full"
|
|
669
|
+
/>
|
|
658
670
|
</UFormField>
|
|
659
671
|
<UFormField :label="t('bootstrap.arch.repoName')" required>
|
|
660
|
-
<UInput
|
|
672
|
+
<UInput
|
|
673
|
+
v-model="archForm.repoName"
|
|
674
|
+
:placeholder="t('bootstrap.arch.repoNamePlaceholder')"
|
|
675
|
+
class="w-full"
|
|
676
|
+
/>
|
|
661
677
|
</UFormField>
|
|
662
678
|
</div>
|
|
663
679
|
<UFormField :label="t('bootstrap.description.label')">
|
|
@@ -674,7 +690,7 @@ const statusLabel = computed<Record<BootstrapStatus, string>>(() => ({
|
|
|
674
690
|
<UTextarea
|
|
675
691
|
v-model="archForm.defaultInstructions"
|
|
676
692
|
:rows="2"
|
|
677
|
-
placeholder="
|
|
693
|
+
:placeholder="t('bootstrap.arch.defaultInstructions.placeholder')"
|
|
678
694
|
class="w-full"
|
|
679
695
|
/>
|
|
680
696
|
</UFormField>
|
|
@@ -256,6 +256,8 @@ async function resolveExceeded(choice: 'extra-round' | 'proceed' | 'stop-reset')
|
|
|
256
256
|
>
|
|
257
257
|
<div
|
|
258
258
|
class="flex max-h-[90dvh] w-full max-w-5xl flex-col overflow-hidden rounded-2xl border border-slate-800 bg-slate-900 shadow-2xl"
|
|
259
|
+
role="dialog"
|
|
260
|
+
aria-modal="true"
|
|
259
261
|
>
|
|
260
262
|
<!-- header -->
|
|
261
263
|
<header class="flex items-center gap-3 border-b border-slate-800 px-6 py-4">
|
|
@@ -246,6 +246,8 @@ async function resolveExceeded(choice: 'extra-round' | 'proceed' | 'stop-reset')
|
|
|
246
246
|
>
|
|
247
247
|
<div
|
|
248
248
|
class="flex max-h-[90dvh] w-full max-w-5xl flex-col overflow-hidden rounded-2xl border border-slate-800 bg-slate-900 shadow-2xl"
|
|
249
|
+
role="dialog"
|
|
250
|
+
aria-modal="true"
|
|
249
251
|
>
|
|
250
252
|
<!-- header -->
|
|
251
253
|
<header class="flex items-center gap-3 border-b border-slate-800 px-6 py-4">
|
|
@@ -98,6 +98,8 @@ function topScore(c: ConsensusContribution): { label: string; value: number } |
|
|
|
98
98
|
>
|
|
99
99
|
<div
|
|
100
100
|
class="flex max-h-[90dvh] w-full max-w-5xl flex-col overflow-hidden rounded-2xl border border-slate-800 bg-slate-900 shadow-2xl"
|
|
101
|
+
role="dialog"
|
|
102
|
+
aria-modal="true"
|
|
101
103
|
>
|
|
102
104
|
<!-- header -->
|
|
103
105
|
<header class="flex items-center gap-3 border-b border-slate-800 px-6 py-4">
|
|
@@ -62,6 +62,8 @@ function openApprovalFor(approvalId: string) {
|
|
|
62
62
|
<div
|
|
63
63
|
v-if="block && statusMeta && typeMeta"
|
|
64
64
|
class="absolute inset-0 z-30 flex flex-col bg-slate-950/95 backdrop-blur"
|
|
65
|
+
role="dialog"
|
|
66
|
+
aria-modal="true"
|
|
65
67
|
>
|
|
66
68
|
<!-- header / breadcrumb -->
|
|
67
69
|
<header class="flex items-center gap-3 border-b border-slate-800 px-6 py-4">
|
|
@@ -90,6 +90,8 @@ const STATUS_META: Record<
|
|
|
90
90
|
>
|
|
91
91
|
<div
|
|
92
92
|
class="m-4 flex w-full max-w-3xl flex-col overflow-hidden rounded-2xl border border-slate-800 bg-slate-900 shadow-2xl"
|
|
93
|
+
role="dialog"
|
|
94
|
+
aria-modal="true"
|
|
93
95
|
>
|
|
94
96
|
<!-- Header -->
|
|
95
97
|
<header class="flex items-center gap-3 border-b border-slate-800 px-5 py-3">
|
|
@@ -170,6 +170,8 @@ const conflictVerdict = computed(() => {
|
|
|
170
170
|
>
|
|
171
171
|
<div
|
|
172
172
|
class="m-4 flex w-full max-w-3xl flex-col overflow-hidden rounded-2xl border border-slate-800 bg-slate-900 shadow-2xl"
|
|
173
|
+
role="dialog"
|
|
174
|
+
aria-modal="true"
|
|
173
175
|
>
|
|
174
176
|
<!-- Header -->
|
|
175
177
|
<header class="flex items-center gap-3 border-b border-slate-800 px-5 py-3">
|
|
@@ -142,6 +142,8 @@ const canDestroy = computed(
|
|
|
142
142
|
>
|
|
143
143
|
<div
|
|
144
144
|
class="m-4 flex w-full max-w-3xl flex-col overflow-hidden rounded-2xl border border-slate-800 bg-slate-900 shadow-2xl"
|
|
145
|
+
role="dialog"
|
|
146
|
+
aria-modal="true"
|
|
145
147
|
>
|
|
146
148
|
<!-- Header -->
|
|
147
149
|
<header class="flex items-center gap-3 border-b border-slate-800 px-5 py-3">
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, onBeforeUnmount, ref, watch } from 'vue'
|
|
3
|
+
|
|
4
|
+
// A slim top strip shown when the real-time WebSocket has dropped and is reconnecting, so a
|
|
5
|
+
// silently-frozen board (events stop arriving, nothing updates) is no longer indistinguishable
|
|
6
|
+
// from an idle one. `useWorkspaceStream` already reconnects with exponential backoff and
|
|
7
|
+
// resyncs on reconnect — this only makes that state visible. The `connected` ref is passed in
|
|
8
|
+
// as a prop (the page owns the single stream instance; creating another here would open a
|
|
9
|
+
// second socket).
|
|
10
|
+
const props = defineProps<{ connected: boolean }>()
|
|
11
|
+
|
|
12
|
+
const { t } = useI18n()
|
|
13
|
+
|
|
14
|
+
// Only surface a RE-connection, never the initial connect: once we've been connected we know a
|
|
15
|
+
// later drop is a real interruption worth flagging. A short debounce rides out a quick socket
|
|
16
|
+
// flap so a momentary blip doesn't flash the strip.
|
|
17
|
+
const everConnected = ref(false)
|
|
18
|
+
const showAfterDelay = ref(false)
|
|
19
|
+
let timer: ReturnType<typeof setTimeout> | null = null
|
|
20
|
+
|
|
21
|
+
watch(
|
|
22
|
+
() => props.connected,
|
|
23
|
+
(connected) => {
|
|
24
|
+
if (connected) {
|
|
25
|
+
everConnected.value = true
|
|
26
|
+
showAfterDelay.value = false
|
|
27
|
+
if (timer) {
|
|
28
|
+
clearTimeout(timer)
|
|
29
|
+
timer = null
|
|
30
|
+
}
|
|
31
|
+
return
|
|
32
|
+
}
|
|
33
|
+
if (!everConnected.value || timer) return
|
|
34
|
+
timer = setTimeout(() => {
|
|
35
|
+
showAfterDelay.value = true
|
|
36
|
+
timer = null
|
|
37
|
+
}, 1500)
|
|
38
|
+
},
|
|
39
|
+
{ immediate: true },
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
const visible = computed(() => everConnected.value && !props.connected && showAfterDelay.value)
|
|
43
|
+
|
|
44
|
+
// Don't leave a pending debounce timer firing into a torn-down component.
|
|
45
|
+
onBeforeUnmount(() => {
|
|
46
|
+
if (timer) {
|
|
47
|
+
clearTimeout(timer)
|
|
48
|
+
timer = null
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<Transition name="fade">
|
|
55
|
+
<div
|
|
56
|
+
v-if="visible"
|
|
57
|
+
class="pointer-events-none absolute inset-x-0 top-0 z-50 flex justify-center px-4 pt-2"
|
|
58
|
+
>
|
|
59
|
+
<div
|
|
60
|
+
class="pointer-events-auto flex items-center gap-2 rounded-full border border-amber-500/60 bg-amber-950/90 px-3 py-1.5 text-xs text-amber-100 shadow-lg backdrop-blur"
|
|
61
|
+
role="status"
|
|
62
|
+
aria-live="polite"
|
|
63
|
+
data-testid="stream-reconnecting"
|
|
64
|
+
>
|
|
65
|
+
<UIcon name="i-lucide-loader" class="h-3.5 w-3.5 animate-spin" />
|
|
66
|
+
<span>{{ t('app.reconnecting') }}</span>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</Transition>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<style scoped>
|
|
73
|
+
.fade-enter-active,
|
|
74
|
+
.fade-leave-active {
|
|
75
|
+
transition: opacity 0.2s ease;
|
|
76
|
+
}
|
|
77
|
+
.fade-enter-from,
|
|
78
|
+
.fade-leave-to {
|
|
79
|
+
opacity: 0;
|
|
80
|
+
}
|
|
81
|
+
</style>
|
|
@@ -16,6 +16,17 @@ const toast = useToast()
|
|
|
16
16
|
|
|
17
17
|
const busy = ref<string | null>(null)
|
|
18
18
|
|
|
19
|
+
/** Toast a failed act/dismiss — the store throws, so without this a failure was silent and the
|
|
20
|
+
* item just stayed in the inbox with no explanation. */
|
|
21
|
+
function notifyError(title: string, e: unknown) {
|
|
22
|
+
toast.add({
|
|
23
|
+
title,
|
|
24
|
+
description: e instanceof Error ? e.message : String(e),
|
|
25
|
+
icon: 'i-lucide-triangle-alert',
|
|
26
|
+
color: 'error',
|
|
27
|
+
})
|
|
28
|
+
}
|
|
29
|
+
|
|
19
30
|
/** Per-type display metadata (icon, colour). The primary-action label is resolved
|
|
20
31
|
* separately through the i18n catalog (`ACTION_KEYS`). */
|
|
21
32
|
type Accent = 'warning' | 'primary' | 'error'
|
|
@@ -98,6 +109,8 @@ async function act(n: Notification) {
|
|
|
98
109
|
color: 'success',
|
|
99
110
|
icon: 'i-lucide-check',
|
|
100
111
|
})
|
|
112
|
+
} catch (e) {
|
|
113
|
+
notifyError(t('layout.notifications.toast.actFailed'), e)
|
|
101
114
|
} finally {
|
|
102
115
|
busy.value = null
|
|
103
116
|
}
|
|
@@ -112,6 +125,8 @@ async function dismiss(n: Notification) {
|
|
|
112
125
|
color: 'neutral',
|
|
113
126
|
icon: 'i-lucide-check',
|
|
114
127
|
})
|
|
128
|
+
} catch (e) {
|
|
129
|
+
notifyError(t('layout.notifications.toast.dismissFailed'), e)
|
|
115
130
|
} finally {
|
|
116
131
|
busy.value = null
|
|
117
132
|
}
|
|
@@ -60,6 +60,8 @@ const customJson = computed<string | null>(() => {
|
|
|
60
60
|
>
|
|
61
61
|
<div
|
|
62
62
|
class="m-4 flex w-full max-w-4xl flex-col overflow-hidden rounded-2xl border border-slate-800 bg-slate-900 shadow-2xl"
|
|
63
|
+
role="dialog"
|
|
64
|
+
aria-modal="true"
|
|
63
65
|
>
|
|
64
66
|
<!-- Header -->
|
|
65
67
|
<header class="flex items-center gap-3 border-b border-slate-800 px-5 py-3">
|
|
@@ -54,6 +54,21 @@ const block = computed<Block | undefined>(() =>
|
|
|
54
54
|
)
|
|
55
55
|
const level = computed(() => block.value?.level ?? 'frame')
|
|
56
56
|
const isFrame = computed(() => level.value === 'frame')
|
|
57
|
+
|
|
58
|
+
// The title to fall back to when the user clears the field and blurs. Editing the title binds
|
|
59
|
+
// straight to the store object via v-model, so there is nothing to fall back to otherwise —
|
|
60
|
+
// restore this rather than persisting (and showing) an empty title. It is captured fresh at
|
|
61
|
+
// edit start (`captureTitle` on focus), so it always reflects the current known-good value —
|
|
62
|
+
// robust against a failed save (which rolls the title back) and an external rename of the same
|
|
63
|
+
// block. Seeded here on block switch so the fallback is sane even before the first focus.
|
|
64
|
+
const lastSavedTitle = ref('')
|
|
65
|
+
watch(
|
|
66
|
+
() => block.value?.id,
|
|
67
|
+
() => {
|
|
68
|
+
lastSavedTitle.value = block.value?.title ?? ''
|
|
69
|
+
},
|
|
70
|
+
{ immediate: true },
|
|
71
|
+
)
|
|
57
72
|
const isContainer = computed(() => level.value === 'frame' || level.value === 'module')
|
|
58
73
|
const isTask = computed(() => level.value === 'task')
|
|
59
74
|
const isEpic = computed(() => level.value === 'epic')
|
|
@@ -103,11 +118,24 @@ const started = computed(
|
|
|
103
118
|
)
|
|
104
119
|
const editable = computed(() => !started.value)
|
|
105
120
|
|
|
121
|
+
// Snapshot the current title as the fallback the moment editing begins, so it reflects the
|
|
122
|
+
// last known-good value (survives a failed save or an external rename) rather than a value we
|
|
123
|
+
// only optimistically assumed had persisted.
|
|
124
|
+
function captureTitle() {
|
|
125
|
+
lastSavedTitle.value = block.value?.title ?? ''
|
|
126
|
+
}
|
|
106
127
|
function saveTitle() {
|
|
107
128
|
const b = block.value
|
|
108
129
|
if (!b) return
|
|
109
130
|
const next = b.title.trim()
|
|
110
|
-
|
|
131
|
+
// An emptied title can't persist — restore the last saved value so the field never shows a
|
|
132
|
+
// blank the user didn't intend (and the board keeps a real label).
|
|
133
|
+
if (!next) {
|
|
134
|
+
b.title = lastSavedTitle.value
|
|
135
|
+
return
|
|
136
|
+
}
|
|
137
|
+
b.title = next
|
|
138
|
+
board.updateBlock(b.id, { title: next })
|
|
111
139
|
}
|
|
112
140
|
function saveDescription() {
|
|
113
141
|
const b = block.value
|
|
@@ -253,6 +281,7 @@ const showOriginalDescription = ref(false)
|
|
|
253
281
|
size="sm"
|
|
254
282
|
class="w-full"
|
|
255
283
|
:placeholder="t('panels.inspector.titlePlaceholder')"
|
|
284
|
+
@focus="captureTitle"
|
|
256
285
|
@change="saveTitle"
|
|
257
286
|
@blur="saveTitle"
|
|
258
287
|
/>
|
|
@@ -18,6 +18,7 @@ const ui = useUiStore()
|
|
|
18
18
|
const models = useModelsStore()
|
|
19
19
|
const reviews = useReviewStage()
|
|
20
20
|
const { t, te } = useI18n()
|
|
21
|
+
const { confirm } = useConfirm()
|
|
21
22
|
|
|
22
23
|
// The async stage this task's iterative reviewer gate (requirements-review / clarity-review)
|
|
23
24
|
// is mid-cycle in (folding the answers, then re-reviewing), or null. While set, the gate is
|
|
@@ -146,6 +147,16 @@ async function stopRun() {
|
|
|
146
147
|
const resetting = ref(false)
|
|
147
148
|
async function resetRun() {
|
|
148
149
|
if (resetting.value) return
|
|
150
|
+
// Destructive: discards the run and returns the task to planned — gate it behind a confirm,
|
|
151
|
+
// matching the confirm-then-mutate contract the board delete path uses.
|
|
152
|
+
const ok = await confirm({
|
|
153
|
+
title: t('inspector.execution.resetConfirm.title'),
|
|
154
|
+
description: t('inspector.execution.resetConfirm.body'),
|
|
155
|
+
variant: 'destructive',
|
|
156
|
+
confirmLabel: t('inspector.execution.resetConfirm.confirm'),
|
|
157
|
+
icon: 'i-lucide-trash-2',
|
|
158
|
+
})
|
|
159
|
+
if (!ok) return
|
|
149
160
|
resetting.value = true
|
|
150
161
|
try {
|
|
151
162
|
await execution.cancel(props.block.id)
|
|
@@ -153,6 +164,19 @@ async function resetRun() {
|
|
|
153
164
|
resetting.value = false
|
|
154
165
|
}
|
|
155
166
|
}
|
|
167
|
+
|
|
168
|
+
// Merging a PR is consequential and effectively irreversible — confirm first. `execution.mergePr`
|
|
169
|
+
// surfaces its own error toast, so no catch is needed here.
|
|
170
|
+
async function mergePr() {
|
|
171
|
+
const ok = await confirm({
|
|
172
|
+
title: t('inspector.execution.mergeConfirm.title'),
|
|
173
|
+
description: t('inspector.execution.mergeConfirm.body'),
|
|
174
|
+
confirmLabel: t('inspector.execution.mergeConfirm.confirm'),
|
|
175
|
+
icon: 'i-lucide-git-merge',
|
|
176
|
+
})
|
|
177
|
+
if (!ok) return
|
|
178
|
+
await execution.mergePr(props.block.id)
|
|
179
|
+
}
|
|
156
180
|
</script>
|
|
157
181
|
|
|
158
182
|
<template>
|
|
@@ -436,7 +460,7 @@ async function resetRun() {
|
|
|
436
460
|
size="sm"
|
|
437
461
|
icon="i-lucide-git-merge"
|
|
438
462
|
block
|
|
439
|
-
@click="
|
|
463
|
+
@click="mergePr"
|
|
440
464
|
>
|
|
441
465
|
{{ t('inspector.execution.mergePr') }}
|
|
442
466
|
</UButton>
|
|
@@ -3,7 +3,12 @@ import { computed, ref, watch } from 'vue'
|
|
|
3
3
|
import type { AgentKind, Pipeline } from '~/types/domain'
|
|
4
4
|
import AgentPalette from '~/components/palettes/AgentPalette.vue'
|
|
5
5
|
import AgentKindIcon from '~/components/pipeline/AgentKindIcon.vue'
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
agentKindMeta,
|
|
8
|
+
companionForProducer,
|
|
9
|
+
isConsensusEligibleKind,
|
|
10
|
+
isTesterKind,
|
|
11
|
+
} from '~/utils/catalog'
|
|
7
12
|
import type { ConsensusStrategy } from '~/types/consensus'
|
|
8
13
|
|
|
9
14
|
type DraftUnit = { index: number; kind: AgentKind; companionIndex: number | null }
|
|
@@ -146,15 +151,18 @@ function companionLabel(kind: string): string | null {
|
|
|
146
151
|
}
|
|
147
152
|
|
|
148
153
|
// Surfaced as an inline hint: a gated step needs a task-estimator before it (mirrors the
|
|
149
|
-
// backend validation, which also rejects the save/start).
|
|
154
|
+
// backend validation, which also rejects the save/start). Both the companion estimate gate
|
|
155
|
+
// (`draftGating`) and the Tester QC companion's estimate gate (`draftTesterQuality[i].gating`)
|
|
156
|
+
// count — either without a preceding estimator is rejected on save.
|
|
150
157
|
const gatingNeedsEstimator = computed(() => {
|
|
151
158
|
const kinds = pipelines.draft
|
|
159
|
+
const hasEstimatorBefore = (i: number) =>
|
|
160
|
+
kinds.slice(0, i).some((k, j) => k === 'task-estimator' && pipelines.draftEnabled[j] !== false)
|
|
152
161
|
for (let i = 0; i < kinds.length; i++) {
|
|
153
|
-
if (
|
|
154
|
-
const
|
|
155
|
-
.
|
|
156
|
-
|
|
157
|
-
if (!hasEstimator) return true
|
|
162
|
+
if (pipelines.draftEnabled[i] === false) continue
|
|
163
|
+
const gated =
|
|
164
|
+
pipelines.draftGating[i]?.enabled || pipelines.draftTesterQuality[i]?.gating?.enabled
|
|
165
|
+
if (gated && !hasEstimatorBefore(i)) return true
|
|
158
166
|
}
|
|
159
167
|
return false
|
|
160
168
|
})
|
|
@@ -434,6 +442,30 @@ async function clone(p: Pipeline) {
|
|
|
434
442
|
"
|
|
435
443
|
@click="pipelines.toggleDraftFollowUps(unit.index)"
|
|
436
444
|
/>
|
|
445
|
+
<!-- Test quality-control companion: audits the Tester's report for coverage
|
|
446
|
+
before the greenlight/fixer decision and loops the Tester on gaps (Tester
|
|
447
|
+
steps only). Enabled by default. -->
|
|
448
|
+
<UButton
|
|
449
|
+
v-if="isTesterKind(unit.kind)"
|
|
450
|
+
:icon="
|
|
451
|
+
pipelines.draftTesterQuality[unit.index]?.enabled === false
|
|
452
|
+
? 'i-lucide-shield-off'
|
|
453
|
+
: 'i-lucide-shield-check'
|
|
454
|
+
"
|
|
455
|
+
:color="
|
|
456
|
+
pipelines.draftTesterQuality[unit.index]?.enabled === false
|
|
457
|
+
? 'neutral'
|
|
458
|
+
: 'secondary'
|
|
459
|
+
"
|
|
460
|
+
variant="ghost"
|
|
461
|
+
size="xs"
|
|
462
|
+
:title="
|
|
463
|
+
pipelines.draftTesterQuality[unit.index]?.enabled === false
|
|
464
|
+
? t('pipeline.builder.testerQualityEnableTooltip')
|
|
465
|
+
: t('pipeline.builder.testerQualityDisableTooltip')
|
|
466
|
+
"
|
|
467
|
+
@click="pipelines.toggleDraftTesterQuality(unit.index)"
|
|
468
|
+
/>
|
|
437
469
|
<UButton
|
|
438
470
|
icon="i-lucide-chevron-up"
|
|
439
471
|
color="neutral"
|
|
@@ -642,6 +674,77 @@ async function clone(p: Pipeline) {
|
|
|
642
674
|
</template>
|
|
643
675
|
</div>
|
|
644
676
|
</div>
|
|
677
|
+
|
|
678
|
+
<!-- Test quality-control companion config (shown when QC is enabled on a Tester
|
|
679
|
+
step): an optional estimate gate so only heavy tasks get the coverage audit. -->
|
|
680
|
+
<div
|
|
681
|
+
v-if="
|
|
682
|
+
isTesterKind(unit.kind) &&
|
|
683
|
+
pipelines.draftTesterQuality[unit.index]?.enabled !== false
|
|
684
|
+
"
|
|
685
|
+
class="ms-6 space-y-2 rounded-md border border-sky-800/40 bg-sky-950/20 p-2 text-xs"
|
|
686
|
+
>
|
|
687
|
+
<div class="flex items-center gap-1.5">
|
|
688
|
+
<UIcon name="i-lucide-shield-check" class="h-3.5 w-3.5 text-sky-400" />
|
|
689
|
+
<span class="min-w-0 flex-1 truncate text-slate-200">
|
|
690
|
+
{{ t('pipeline.builder.testerQualityLabel') }}
|
|
691
|
+
</span>
|
|
692
|
+
<UButton
|
|
693
|
+
:icon="
|
|
694
|
+
pipelines.draftTesterQuality[unit.index]?.gating?.enabled
|
|
695
|
+
? 'i-lucide-toggle-right'
|
|
696
|
+
: 'i-lucide-toggle-left'
|
|
697
|
+
"
|
|
698
|
+
:color="
|
|
699
|
+
pipelines.draftTesterQuality[unit.index]?.gating?.enabled
|
|
700
|
+
? 'success'
|
|
701
|
+
: 'neutral'
|
|
702
|
+
"
|
|
703
|
+
variant="ghost"
|
|
704
|
+
size="xs"
|
|
705
|
+
:label="t('pipeline.builder.gateOnEstimate')"
|
|
706
|
+
:title="t('pipeline.builder.testerQualityGateTooltip')"
|
|
707
|
+
@click="pipelines.toggleDraftTesterQualityGating(unit.index)"
|
|
708
|
+
/>
|
|
709
|
+
</div>
|
|
710
|
+
<div
|
|
711
|
+
v-if="pipelines.draftTesterQuality[unit.index]?.gating?.enabled"
|
|
712
|
+
class="flex flex-wrap items-center gap-2 border-t border-slate-800 pt-2"
|
|
713
|
+
>
|
|
714
|
+
<span class="text-[10px] text-slate-500">{{
|
|
715
|
+
t('pipeline.builder.runWhenAny')
|
|
716
|
+
}}</span>
|
|
717
|
+
<label class="text-slate-400">{{
|
|
718
|
+
t('pipeline.builder.complexityThreshold')
|
|
719
|
+
}}</label>
|
|
720
|
+
<input
|
|
721
|
+
v-model.number="pipelines.draftTesterQuality[unit.index]!.gating!.minComplexity"
|
|
722
|
+
type="number"
|
|
723
|
+
min="0"
|
|
724
|
+
max="1"
|
|
725
|
+
step="0.1"
|
|
726
|
+
class="w-14 rounded border border-slate-700 bg-slate-900 px-1.5 py-0.5 text-slate-100"
|
|
727
|
+
/>
|
|
728
|
+
<label class="text-slate-400">{{ t('pipeline.builder.riskThreshold') }}</label>
|
|
729
|
+
<input
|
|
730
|
+
v-model.number="pipelines.draftTesterQuality[unit.index]!.gating!.minRisk"
|
|
731
|
+
type="number"
|
|
732
|
+
min="0"
|
|
733
|
+
max="1"
|
|
734
|
+
step="0.1"
|
|
735
|
+
class="w-14 rounded border border-slate-700 bg-slate-900 px-1.5 py-0.5 text-slate-100"
|
|
736
|
+
/>
|
|
737
|
+
<label class="text-slate-400">{{ t('pipeline.builder.impactThreshold') }}</label>
|
|
738
|
+
<input
|
|
739
|
+
v-model.number="pipelines.draftTesterQuality[unit.index]!.gating!.minImpact"
|
|
740
|
+
type="number"
|
|
741
|
+
min="0"
|
|
742
|
+
max="1"
|
|
743
|
+
step="0.1"
|
|
744
|
+
class="w-14 rounded border border-slate-700 bg-slate-900 px-1.5 py-0.5 text-slate-100"
|
|
745
|
+
/>
|
|
746
|
+
</div>
|
|
747
|
+
</div>
|
|
645
748
|
</li>
|
|
646
749
|
</ol>
|
|
647
750
|
</div>
|
|
@@ -414,6 +414,8 @@ async function resolveExceeded(choice: 'extra-round' | 'proceed' | 'stop-reset')
|
|
|
414
414
|
>
|
|
415
415
|
<div
|
|
416
416
|
class="flex max-h-[90dvh] w-full max-w-5xl flex-col overflow-hidden rounded-2xl border border-slate-800 bg-slate-900 shadow-2xl"
|
|
417
|
+
role="dialog"
|
|
418
|
+
aria-modal="true"
|
|
417
419
|
>
|
|
418
420
|
<!-- header -->
|
|
419
421
|
<header class="flex items-center gap-3 border-b border-slate-800 px-6 py-4">
|
|
@@ -123,6 +123,8 @@ function kindLabel(item: RequirementItem): string {
|
|
|
123
123
|
>
|
|
124
124
|
<div
|
|
125
125
|
class="flex max-h-[90dvh] w-full max-w-5xl flex-col overflow-hidden rounded-2xl border border-slate-800 bg-slate-900 shadow-2xl"
|
|
126
|
+
role="dialog"
|
|
127
|
+
aria-modal="true"
|
|
126
128
|
>
|
|
127
129
|
<!-- header -->
|
|
128
130
|
<header class="flex items-center gap-3 border-b border-slate-800 px-6 py-4">
|