@cat-factory/app 0.87.0 → 0.87.2

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.
@@ -5,6 +5,8 @@
5
5
  // message. Tone (summary/pre classes) is passed by the host so it blends into each surface
6
6
  // (rose banner vs slate history) while the guard + the `showDetail` key + the whitespace-
7
7
  // preserving `<pre>` structure live in one place.
8
+ import CopyButton from '~/components/common/CopyButton.vue'
9
+
8
10
  defineProps<{
9
11
  detail: string | null
10
12
  message: string
@@ -20,8 +22,15 @@ const { t } = useI18n()
20
22
  <summary class="cursor-pointer" :class="summaryClass">
21
23
  {{ t('board.failure.showDetail') }}
22
24
  </summary>
23
- <pre class="mt-1 max-h-32 overflow-auto whitespace-pre-wrap rounded p-1.5" :class="preClass">{{
24
- detail
25
- }}</pre>
25
+ <!-- The stack trace / extended detail: the first thing a user does with it is copy it, so
26
+ offer a copy affordance floated over the scroll box (UX-39). -->
27
+ <div class="relative mt-1">
28
+ <CopyButton :text="detail" class="absolute end-1 top-1 z-10" />
29
+ <pre
30
+ class="max-h-32 overflow-auto whitespace-pre-wrap rounded p-1.5 pe-9"
31
+ :class="preClass"
32
+ >{{ detail }}</pre
33
+ >
34
+ </div>
26
35
  </details>
27
36
  </template>
@@ -0,0 +1,30 @@
1
+ <script setup lang="ts">
2
+ // Standard icon-only "copy to clipboard" button with confirmation feedback. Routes through
3
+ // `useCopyToClipboard` so success/failure is always toasted (UX-38), and carries both a
4
+ // `title` and an `aria-label` so it's named for pointer tooltips and screen readers alike.
5
+ // Used to make error/detail surfaces copyable (UX-39) — the first thing a user does with a
6
+ // stack trace or failure summary is copy it.
7
+ const props = defineProps<{
8
+ /** The text to place on the clipboard. */
9
+ text: string
10
+ /** Accessible name + tooltip; defaults to the generic "Copy". */
11
+ label?: string
12
+ size?: 'xs' | 'sm' | 'md'
13
+ }>()
14
+
15
+ const { t } = useI18n()
16
+ const { copy } = useCopyToClipboard()
17
+ const label = computed(() => props.label ?? t('common.copy'))
18
+ </script>
19
+
20
+ <template>
21
+ <UButton
22
+ icon="i-lucide-copy"
23
+ color="neutral"
24
+ variant="ghost"
25
+ :size="size ?? 'xs'"
26
+ :title="label"
27
+ :aria-label="label"
28
+ @click.stop="copy(text)"
29
+ />
30
+ </template>
@@ -8,6 +8,7 @@
8
8
  // as `consensus` stream events arrive.
9
9
  import { computed } from 'vue'
10
10
  import type { ConsensusContribution, ConsensusSession } from '~/types/consensus'
11
+ import CopyButton from '~/components/common/CopyButton.vue'
11
12
 
12
13
  const { t, n } = useI18n()
13
14
 
@@ -149,9 +150,12 @@ function topScore(c: ConsensusContribution): { label: string; value: number } |
149
150
  <!-- failure -->
150
151
  <div
151
152
  v-if="session.status === 'failed'"
152
- class="mb-5 rounded-lg border border-rose-800/60 bg-rose-950/40 px-4 py-3 text-sm text-rose-200"
153
+ class="mb-5 flex items-start gap-2 rounded-lg border border-rose-800/60 bg-rose-950/40 px-4 py-3 text-sm text-rose-200"
153
154
  >
154
- {{ t('consensus.failed', { error: session.error ?? t('consensus.unknownError') }) }}
155
+ <span class="min-w-0 flex-1">{{
156
+ t('consensus.failed', { error: session.error ?? t('consensus.unknownError') })
157
+ }}</span>
158
+ <CopyButton v-if="session.error" :text="session.error" class="-me-1 shrink-0" />
155
159
  </div>
156
160
 
157
161
  <!-- synthesized result -->
@@ -12,6 +12,7 @@ import StepRestartControl from '~/components/panels/StepRestartControl.vue'
12
12
  import StepRunMeta from '~/components/panels/StepRunMeta.vue'
13
13
  import AttemptEntryHeader from '~/components/panels/AttemptEntryHeader.vue'
14
14
  import GateFailingCheckList from '~/components/gates/GateFailingCheckList.vue'
15
+ import CopyButton from '~/components/common/CopyButton.vue'
15
16
 
16
17
  const board = useBoardStore()
17
18
  const execution = useExecutionStore()
@@ -252,12 +253,15 @@ const conflictVerdict = computed(() => {
252
253
  <template v-else> {{ t('gates.humanReview.suffixAwaiting') }}</template>
253
254
  </span>
254
255
  </div>
255
- <p
256
+ <div
256
257
  v-if="gate.lastFailureSummary"
257
- class="mt-2 whitespace-pre-wrap rounded-md border border-slate-800 bg-slate-950/40 px-3 py-2 text-[12px] leading-relaxed text-slate-300"
258
+ class="relative mt-2 rounded-md border border-slate-800 bg-slate-950/40 px-3 py-2"
258
259
  >
259
- {{ gate.lastFailureSummary }}
260
- </p>
260
+ <CopyButton :text="gate.lastFailureSummary" class="absolute end-1 top-1" />
261
+ <p class="whitespace-pre-wrap pe-8 text-[12px] leading-relaxed text-slate-300">
262
+ {{ gate.lastFailureSummary }}
263
+ </p>
264
+ </div>
261
265
  <a
262
266
  v-if="prUrl"
263
267
  :href="prUrl"
@@ -330,12 +334,15 @@ const conflictVerdict = computed(() => {
330
334
  <!-- GitHub's API reports mergeability as a single bit (no file list), but the
331
335
  conflict resolver discovers the conflicting files in the container and
332
336
  reports them back — surface that account here. -->
333
- <p
337
+ <div
334
338
  v-if="gate.lastFailureSummary"
335
- class="mt-2 whitespace-pre-wrap rounded-md border border-slate-800 bg-slate-950/40 px-3 py-2 text-[12px] leading-relaxed text-slate-300"
339
+ class="relative mt-2 rounded-md border border-slate-800 bg-slate-950/40 px-3 py-2"
336
340
  >
337
- {{ gate.lastFailureSummary }}
338
- </p>
341
+ <CopyButton :text="gate.lastFailureSummary" class="absolute end-1 top-1" />
342
+ <p class="whitespace-pre-wrap pe-8 text-[12px] leading-relaxed text-slate-300">
343
+ {{ gate.lastFailureSummary }}
344
+ </p>
345
+ </div>
339
346
  <a
340
347
  v-if="prUrl"
341
348
  :href="prUrl"
@@ -195,8 +195,9 @@ onKeyStroke('Escape', () => {
195
195
  if (open.value) close()
196
196
  })
197
197
 
198
+ const { copy } = useCopyToClipboard()
198
199
  async function copyOutput() {
199
- if (step.value?.output) await navigator.clipboard?.writeText(step.value.output)
200
+ if (step.value?.output) await copy(step.value.output)
200
201
  }
201
202
  </script>
202
203
 
@@ -1,6 +1,5 @@
1
1
  <script setup lang="ts">
2
2
  import { computed } from 'vue'
3
- import { useClipboard } from '@vueuse/core'
4
3
  import type { PipelineStep, RunContainerStatus } from '~/types/execution'
5
4
  import { containerPhaseLabel } from '~/utils/pipelineRender'
6
5
 
@@ -65,19 +64,7 @@ const phaseLabel = computed(() => containerPhaseLabel(props.step.container?.phas
65
64
 
66
65
  // Make the container id / URL one-click copyable (they're long and used to be
67
66
  // select-and-copy-by-hand), with a toast confirming the copy landed.
68
- const toast = useToast()
69
- const { copy, isSupported } = useClipboard()
70
- async function copyText(text: string) {
71
- // Only claim success once the write actually landed — a failed/unsupported clipboard
72
- // (insecure context, denied permission) must not show a misleading "Copied" toast.
73
- try {
74
- if (!isSupported.value) throw new Error('clipboard unsupported')
75
- await copy(text)
76
- toast.add({ title: t('common.copied'), color: 'success', icon: 'i-lucide-check' })
77
- } catch {
78
- toast.add({ title: t('common.copyFailed'), color: 'error', icon: 'i-lucide-x' })
79
- }
80
- }
67
+ const { copy: copyText } = useCopyToClipboard()
81
68
  </script>
82
69
 
83
70
  <template>
@@ -70,9 +70,10 @@ function formatClock(ms?: number | null): string | null {
70
70
  return ms ? d(new Date(ms), 'long') : null
71
71
  }
72
72
 
73
+ const { copy } = useCopyToClipboard()
73
74
  async function copyRunId() {
74
75
  const id = props.step.runId ?? props.instanceId
75
- if (id) await navigator.clipboard?.writeText(id)
76
+ if (id) await copy(id)
76
77
  }
77
78
  </script>
78
79
 
@@ -40,8 +40,9 @@ function formatClock(ms?: number | null): string | null {
40
40
  return ms ? d(new Date(ms), 'long') : null
41
41
  }
42
42
 
43
+ const { copy } = useCopyToClipboard()
43
44
  async function copyRunId() {
44
- if (runId.value) await navigator.clipboard?.writeText(runId.value)
45
+ if (runId.value) await copy(runId.value)
45
46
  }
46
47
  </script>
47
48
 
@@ -269,8 +269,9 @@ function optional(label: string): string {
269
269
  // example (not prose), so it stays inline rather than in the i18n catalog — mirroring the format
270
270
  // examples the i18n rules keep out of message bodies.
271
271
  const AUTO_SETUP_COMMAND = 'cat-factory k3s'
272
+ const { copy } = useCopyToClipboard()
272
273
  async function copyAutoSetupCommand() {
273
- await navigator.clipboard?.writeText(AUTO_SETUP_COMMAND)
274
+ await copy(AUTO_SETUP_COMMAND)
274
275
  }
275
276
  </script>
276
277
 
@@ -0,0 +1,29 @@
1
+ // Shared clipboard-with-feedback primitive. Wraps VueUse's `useClipboard` with a toast that
2
+ // confirms the copy actually landed (or reports failure) — the pattern first written inline in
3
+ // `StepContainerStatus.vue`, extracted here so every copy affordance behaves the same.
4
+ //
5
+ // UX-38: several copy handlers called `navigator.clipboard?.writeText(...)` directly with no
6
+ // feedback and no catch, so in an insecure context or when permission was denied the copy was a
7
+ // silent no-op the user couldn't tell apart from success. Routing every copy through this seam
8
+ // makes the outcome always visible.
9
+ import { useClipboard } from '@vueuse/core'
10
+
11
+ export function useCopyToClipboard() {
12
+ const { t } = useI18n()
13
+ const toast = useToast()
14
+ const { copy: writeClipboard, isSupported } = useClipboard()
15
+
16
+ async function copy(text: string) {
17
+ // Only claim success once the write actually landed — a failed/unsupported clipboard
18
+ // (insecure context, denied permission) must not show a misleading "Copied" toast.
19
+ try {
20
+ if (!isSupported.value) throw new Error('clipboard unsupported')
21
+ await writeClipboard(text)
22
+ toast.add({ title: t('common.copied'), color: 'success', icon: 'i-lucide-check' })
23
+ } catch {
24
+ toast.add({ title: t('common.copyFailed'), color: 'error', icon: 'i-lucide-x' })
25
+ }
26
+ }
27
+
28
+ return { copy, isSupported }
29
+ }
@@ -1664,9 +1664,9 @@
1664
1664
  "environment-provider": "Custom HTTP provider",
1665
1665
  "environment-providerDesc": "Provision ephemeral environments through your own HTTP management API. Best when you already have bespoke preview-env tooling.",
1666
1666
  "compose": "Docker Compose preview env",
1667
- "composeDesc": "Stand the repo's own docker-compose.yml up on a local Docker daemon as the Tester's URL. Best for local Compose-based apps. Image-based stacks only; needs a Docker daemon, so local deployments only."
1667
+ "composeDesc": "Stand the repo's own docker-compose.yml up on a local Docker daemon as the Tester's URL. Best for local Compose-based apps. Supports pre-built images or building from source; needs a Docker daemon, so local deployments only."
1668
1668
  },
1669
- "dockerComposeInfo": "Docker Compose services stand up on the runtime's local Docker: no connection needed (the run's container must support Docker-in-Docker).",
1669
+ "dockerComposeInfo": "Docker Compose services stand up on the runtime's local Docker: no connection needed (the run's container must support Docker-in-Docker). Configure the service, port, and image source (pull pre-built or build from source) on the service's environment settings.",
1670
1670
  "engine": {
1671
1671
  "local-k3s": "Local k3s",
1672
1672
  "remote-kubernetes": "Remote Kubernetes"
@@ -2108,9 +2108,10 @@
2108
2108
  "testEnvBackend": {
2109
2109
  "label": "Dónde se ejecutan los entornos de prueba",
2110
2110
  "local-compose": "docker-compose en contenedor",
2111
- "environment-provider": "Proveedor de entornos"
2111
+ "environment-provider": "Proveedor de entornos",
2112
+ "composeDesc": "Levanta el docker-compose.yml del propio repositorio en un daemon de Docker local como URL del Tester. Ideal para apps locales basadas en Compose. Admite imágenes prediseñadas o compilación desde el código fuente; requiere un daemon de Docker, por lo que solo en despliegues locales."
2112
2113
  },
2113
- "dockerComposeInfo": "Los servicios de Docker Compose se levantan en el Docker local del runtime: no hace falta conexión (el contenedor de la ejecución debe admitir Docker-in-Docker).",
2114
+ "dockerComposeInfo": "Los servicios de Docker Compose se levantan en el Docker local del runtime: no se necesita conexión (el contenedor de la ejecución debe admitir Docker-in-Docker). Configura el servicio, el puerto y el origen de la imagen (usar prediseñada o compilar desde el código fuente) en los ajustes de entorno del servicio.",
2114
2115
  "engine": {
2115
2116
  "local-k3s": "k3s local",
2116
2117
  "remote-kubernetes": "Kubernetes remoto"
@@ -2108,9 +2108,10 @@
2108
2108
  "testEnvBackend": {
2109
2109
  "label": "Où s'exécutent les environnements de test",
2110
2110
  "local-compose": "docker-compose dans le conteneur",
2111
- "environment-provider": "Fournisseur d'environnements"
2111
+ "environment-provider": "Fournisseur d'environnements",
2112
+ "composeDesc": "Démarre le docker-compose.yml du dépôt sur un démon Docker local comme URL du Testeur. Idéal pour les applications locales basées sur Compose. Prend en charge les images préconstruites ou la construction depuis les sources ; nécessite un démon Docker, donc uniquement pour les déploiements locaux."
2112
2113
  },
2113
- "dockerComposeInfo": "Les services Docker Compose démarrent sur le Docker local du runtime: aucune connexion requise (le conteneur de l'exécution doit prendre en charge Docker-in-Docker).",
2114
+ "dockerComposeInfo": "Les services Docker Compose démarrent sur le Docker local du runtime : aucune connexion requise (le conteneur d’exécution doit prendre en charge Docker-in-Docker). Configurez le service, le port et la source de l’image (image préconstruite ou construction depuis les sources) dans les paramètres d’environnement du service.",
2114
2115
  "engine": {
2115
2116
  "local-k3s": "k3s local",
2116
2117
  "remote-kubernetes": "Kubernetes distant"
@@ -1616,9 +1616,10 @@
1616
1616
  "kubernetes": "אשכול Kubernetes",
1617
1617
  "kubernetesDesc": "הקצה מרחב שמות לכל PR באשכול Kubernetes שאתה מפעיל.",
1618
1618
  "environment-provider": "ספק HTTP מותאם",
1619
- "environment-providerDesc": "הקצה סביבות ארעיות דרך ממשק ניהול HTTP משלך."
1619
+ "environment-providerDesc": "הקצה סביבות ארעיות דרך ממשק ניהול HTTP משלך.",
1620
+ "composeDesc": "מריץ את קובץ docker-compose.yml של המאגר עצמו על דימון Docker מקומי ככתובת ה-URL של הבוחן. מתאים בעיקר לאפליקציות מקומיות מבוססות Compose. תומך בתמונות בנויות מראש או בבנייה מקוד המקור; דורש דימון Docker, ולכן פריסות מקומיות בלבד."
1620
1621
  },
1621
- "dockerComposeInfo": "שירותי Docker Compose עולים על ה-Docker המקומי של זמן הריצה: אין צורך בחיבור (הקונטיינר של הריצה חייב לתמוך ב-Docker-in-Docker).",
1622
+ "dockerComposeInfo": "שירותי Docker Compose עולים על ה-Docker המקומי של סביבת הריצה: אין צורך בחיבור (מכולת ההרצה חייבת לתמוך ב-Docker-in-Docker). הגדר את השירות, הפורט ומקור התמונה (משיכת תמונה בנויה מראש או בנייה מקוד המקור) בהגדרות הסביבה של השירות.",
1622
1623
  "engine": {
1623
1624
  "local-k3s": "k3s מקומי",
1624
1625
  "remote-kubernetes": "Kubernetes מרוחק"
@@ -1618,9 +1618,9 @@
1618
1618
  "environment-provider": "カスタム HTTP プロバイダー",
1619
1619
  "environment-providerDesc": "自前の HTTP 管理 API を通じて一時的な環境をプロビジョニングします。",
1620
1620
  "compose": "Docker Compose プレビュー環境",
1621
- "composeDesc": "リポジトリ自身の docker-compose.yml をローカルの Docker デーモンで起動し、テスターの URL として使用します。ローカルの Compose ベースのアプリに最適です。イメージベースのスタックのみ対応。Docker デーモンが必要なため、ローカルデプロイメント専用です。"
1621
+ "composeDesc": "リポジトリ自身の docker-compose.yml をローカルの Docker デーモンで起動し、テスターの URL として使用します。ローカルの Compose ベースのアプリに最適です。ビルド済みイメージまたはソースからのビルドに対応。Docker デーモンが必要なため、ローカルデプロイのみ。"
1622
1622
  },
1623
- "dockerComposeInfo": "Docker Compose サービスはランタイムのローカル Docker 上で起動します。接続は不要です(実行のコンテナが Docker-in-Docker をサポートする必要があります)。",
1623
+ "dockerComposeInfo": "Docker Compose サービスはランタイムのローカル Docker 上で起動します。接続は不要です(実行コンテナが Docker-in-Docker をサポートしている必要があります)。サービス、ポート、イメージソース(ビルド済みを取得するかソースからビルドするか)はサービスの環境設定で構成してください。",
1624
1624
  "engine": {
1625
1625
  "local-k3s": "ローカル k3s",
1626
1626
  "remote-kubernetes": "リモート Kubernetes"
@@ -2108,9 +2108,10 @@
2108
2108
  "testEnvBackend": {
2109
2109
  "label": "Gdzie działają środowiska testowe",
2110
2110
  "local-compose": "docker-compose w kontenerze",
2111
- "environment-provider": "Dostawca środowisk"
2111
+ "environment-provider": "Dostawca środowisk",
2112
+ "composeDesc": "Uruchamia własny plik docker-compose.yml repozytorium na lokalnym demonie Dockera jako adres URL Testera. Najlepsze dla lokalnych aplikacji opartych na Compose. Obsługuje gotowe obrazy lub budowanie ze źródeł; wymaga demona Dockera, więc tylko wdrożenia lokalne."
2112
2113
  },
2113
- "dockerComposeInfo": "Usługi Docker Compose uruchamiane na lokalnym Dockerze środowiska uruchomieniowego: połączenie nie jest potrzebne (kontener uruchomienia musi obsługiwać Docker-in-Docker).",
2114
+ "dockerComposeInfo": "Usługi Docker Compose uruchamiają się na lokalnym Dockerze środowiska uruchomieniowego: połączenie nie jest potrzebne (kontener uruchomienia musi obsługiwać Docker-in-Docker). Skonfiguruj usługę, port i źródło obrazu (pobranie gotowego lub budowanie ze źródeł) w ustawieniach środowiska usługi.",
2114
2115
  "engine": {
2115
2116
  "local-k3s": "Lokalny k3s",
2116
2117
  "remote-kubernetes": "Zdalny Kubernetes"
@@ -1618,9 +1618,9 @@
1618
1618
  "environment-provider": "Özel HTTP sağlayıcısı",
1619
1619
  "environment-providerDesc": "Geçici ortamları kendi HTTP yönetim API'niz aracılığıyla sağlayın.",
1620
1620
  "compose": "Docker Compose önizleme ortamı",
1621
- "composeDesc": "Deponun kendi docker-compose.yml dosyasını yerel bir Docker daemon üzerinde Tester'ın URL'si olarak ayağa kaldırır. Yerel Compose tabanlı uygulamalar için idealdir. Yalnızca imaj tabanlı stack'ler; bir Docker daemon gerektirir, bu nedenle yalnızca yerel dağıtımlar içindir."
1621
+ "composeDesc": "Deponun kendi docker-compose.yml dosyasını yerel bir Docker arka plan hizmetinde Test Edici URLsi olarak ayağa kaldırır. Yerel Compose tabanlı uygulamalar için idealdir. Önceden oluşturulmuş imgeleri veya kaynaktan derlemeyi destekler; bir Docker arka plan hizmeti gerektirir, bu nedenle yalnızca yerel dağıtımlarda çalışır."
1622
1622
  },
1623
- "dockerComposeInfo": "Docker Compose servisleri çalışma zamanının yerel Docker'ında ayağa kalkar: bağlantı gerekmez (çalıştırmanın kapsayıcısı Docker-in-Docker desteklemelidir).",
1623
+ "dockerComposeInfo": "Docker Compose hizmetleri çalışma zamanının yerel Docker’ında ayağa kalkar: bağlantı gerekmez (çalıştırmanın kapsayıcısı Docker-in-Docker’ı desteklemelidir). Hizmeti, bağlantı noktasını ve imge kaynağını (önceden oluşturulmuş imge çekme veya kaynaktan derleme) hizmetin ortam ayarlarında yapılandırın.",
1624
1624
  "engine": {
1625
1625
  "local-k3s": "Yerel k3s",
1626
1626
  "remote-kubernetes": "Uzak Kubernetes"
@@ -2108,9 +2108,10 @@
2108
2108
  "testEnvBackend": {
2109
2109
  "label": "Де виконуються тестові середовища",
2110
2110
  "local-compose": "docker-compose у контейнері",
2111
- "environment-provider": "Провайдер середовищ"
2111
+ "environment-provider": "Провайдер середовищ",
2112
+ "composeDesc": "Піднімає власний docker-compose.yml репозиторію на локальному демоні Docker як URL Тестувальника. Найкраще підходить для локальних застосунків на основі Compose. Підтримує готові образи або збирання з вихідного коду; потребує демона Docker, тому лише для локальних розгортань."
2112
2113
  },
2113
- "dockerComposeInfo": "Служби Docker Compose піднімаються на локальному Docker середовища виконання: з'єднання не потрібне (контейнер запуску має підтримувати Docker-in-Docker).",
2114
+ "dockerComposeInfo": "Служби Docker Compose піднімаються на локальному Docker середовища виконання: підключення не потрібне (контейнер запуску має підтримувати Docker-in-Docker). Налаштуйте службу, порт і джерело образу (завантаження готового чи збирання з вихідного коду) у налаштуваннях середовища служби.",
2114
2115
  "engine": {
2115
2116
  "local-k3s": "Локальний k3s",
2116
2117
  "remote-kubernetes": "Віддалений Kubernetes"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/app",
3
- "version": "0.87.0",
3
+ "version": "0.87.2",
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",
@@ -34,7 +34,7 @@
34
34
  "valibot": "^1.4.2",
35
35
  "vue": "^3.5.39",
36
36
  "wretch": "^3.0.9",
37
- "@cat-factory/contracts": "0.94.0"
37
+ "@cat-factory/contracts": "0.95.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@toad-contracts/testing": "0.3.2",