@cat-factory/app 0.12.0 → 0.14.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.
@@ -37,6 +37,31 @@ export interface TaskSourceState extends TaskSourceDescriptor {
37
37
  enabled: boolean
38
38
  }
39
39
 
40
+ /**
41
+ * The verdict of a live "check setup" probe against a source (mirrors
42
+ * `@cat-factory/contracts`). Unlike `available` (a passive row-exists flag) this
43
+ * is the result of actually authenticating + reading, so it distinguishes a
44
+ * configured-but-broken source from a working one.
45
+ */
46
+ export type TaskSourceDiagnosticStatus =
47
+ | 'ready'
48
+ | 'not_installed'
49
+ | 'not_connected'
50
+ | 'auth_failed'
51
+ | 'forbidden'
52
+ | 'unreachable'
53
+ | 'error'
54
+
55
+ export interface TaskSourceDiagnostic {
56
+ source: TaskSourceKind
57
+ ok: boolean
58
+ status: TaskSourceDiagnosticStatus
59
+ /** A one-line, actionable explanation shown verbatim in the panel. */
60
+ message: string
61
+ /** Optional extra context (account login, repo count, signed-in user). */
62
+ detail?: string | null
63
+ }
64
+
40
65
  /** A workspace's connection to a task source (never carries credentials). */
41
66
  export interface TaskConnection {
42
67
  source: TaskSourceKind
package/nuxt.config.ts CHANGED
@@ -15,6 +15,15 @@ export default defineNuxtConfig({
15
15
  // Render as a pure client-side SPA that talks to the cat-factory backend.
16
16
  ssr: false,
17
17
 
18
+ // The board is a single dark-themed surface (neutral is mapped to `slate` and
19
+ // every component is hand-styled in slate). Pin Nuxt UI's color mode to dark so
20
+ // its own chrome (modals, inputs, selects, dropdowns) matches instead of
21
+ // following the visitor's system preference and rendering light/white overlays.
22
+ colorMode: {
23
+ preference: 'dark',
24
+ fallback: 'dark',
25
+ },
26
+
18
27
  runtimeConfig: {
19
28
  public: {
20
29
  // Base URL of the cat-factory worker API. Defaults to the local wrangler
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/app",
3
- "version": "0.12.0",
3
+ "version": "0.14.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",
@@ -1,91 +0,0 @@
1
- <script setup lang="ts">
2
- // Workspace settings: issue-tracker writeback. Two independent toggles that govern
3
- // whether the engine writes back to a task's linked tracker issue(s) as its PR
4
- // progresses — comment when the PR opens, and comment + close as resolved when it
5
- // merges. Each is overridable per task in the inspector. Persisted on the workspace
6
- // tracker settings (the selection + Jira project key are preserved on save).
7
- import { onMounted, ref, watch } from 'vue'
8
-
9
- const tracker = useTrackerStore()
10
- const toast = useToast()
11
-
12
- const commentOnPrOpen = ref(false)
13
- const resolveOnMerge = ref(false)
14
- const saving = ref(false)
15
-
16
- // Sync the local toggles from the store on mount (the tab renders when Workspace
17
- // settings opens) and whenever the stored settings change underneath.
18
- function hydrate() {
19
- commentOnPrOpen.value = tracker.settings.writebackCommentOnPrOpen
20
- resolveOnMerge.value = tracker.settings.writebackResolveOnMerge
21
- }
22
- onMounted(hydrate)
23
- watch(() => tracker.settings, hydrate, { deep: true })
24
-
25
- async function save() {
26
- saving.value = true
27
- try {
28
- // Preserve the tracker selection + Jira project key; only the writeback flags change.
29
- await tracker.save({
30
- tracker: tracker.settings.tracker,
31
- jiraProjectKey: tracker.settings.jiraProjectKey,
32
- writebackCommentOnPrOpen: commentOnPrOpen.value,
33
- writebackResolveOnMerge: resolveOnMerge.value,
34
- })
35
- toast.add({ title: 'Writeback settings saved', icon: 'i-lucide-check', color: 'success' })
36
- } catch (e) {
37
- toast.add({
38
- title: 'Could not save settings',
39
- description: e instanceof Error ? e.message : String(e),
40
- icon: 'i-lucide-triangle-alert',
41
- color: 'error',
42
- })
43
- } finally {
44
- saving.value = false
45
- }
46
- }
47
- </script>
48
-
49
- <template>
50
- <div class="space-y-4">
51
- <p class="text-xs text-slate-400">
52
- When a task is linked to a tracker issue (GitHub Issues or Jira), write back to it as the
53
- task's pull request progresses. Each toggle is the workspace default and can be overridden per
54
- task in the inspector. GitHub issues close natively; Jira issues transition to the first
55
- status in their <span class="text-slate-300">Done</span> category.
56
- </p>
57
-
58
- <label class="flex items-start gap-3 rounded-lg border border-slate-700 bg-slate-800/40 p-3">
59
- <USwitch v-model="commentOnPrOpen" />
60
- <span class="text-sm">
61
- <span class="block text-slate-200">Comment when a PR opens</span>
62
- <span class="block text-xs text-slate-500">
63
- Post a comment on the linked issue with the new pull request's link.
64
- </span>
65
- </span>
66
- </label>
67
-
68
- <label class="flex items-start gap-3 rounded-lg border border-slate-700 bg-slate-800/40 p-3">
69
- <USwitch v-model="resolveOnMerge" />
70
- <span class="text-sm">
71
- <span class="block text-slate-200">Close as resolved when a PR merges</span>
72
- <span class="block text-xs text-slate-500">
73
- Comment that the PR merged, then close / resolve the linked issue.
74
- </span>
75
- </span>
76
- </label>
77
-
78
- <div class="flex justify-end">
79
- <UButton
80
- color="primary"
81
- variant="soft"
82
- size="sm"
83
- icon="i-lucide-save"
84
- :loading="saving"
85
- @click="save"
86
- >
87
- Save
88
- </UButton>
89
- </div>
90
- </div>
91
- </template>