@cat-factory/app 0.236.1 → 0.237.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.
@@ -404,20 +404,14 @@
404
404
  },
405
405
  "shared": "Partagé",
406
406
  "sharedTitle": "Partagé entre les espaces de travail de cette organisation",
407
- "bootstrapping": "Initialisation…",
408
407
  "bootstrappingRepository": "Initialisation du dépôt…",
409
408
  "bootstrapStepsCount": "{completed}/{total} étapes",
410
- "runFailed": "L’exécution a échoué",
411
- "mergedOfTotal": "{merged}/{total} fusionnées",
412
- "noTasksYet": "Pas encore de tâches",
413
- "prCount": "{count} PR",
414
409
  "prReadyCount": "{count} PR prêtes",
415
410
  "taskCount": "{count} tâche | {count} tâches",
416
411
  "moduleCount": "{count} module | {count} modules",
417
412
  "addTaskTitle": "Ajouter une tâche",
418
413
  "createTaskFromIssueTitle": "Créer une tâche depuis un ticket",
419
414
  "addRecurringTitle": "Ajouter une pipeline récurrente",
420
- "collapseTitle": "Réduire",
421
415
  "dragService": "Faire glisser le service",
422
416
  "dragTask": "Faire glisser la tâche",
423
417
  "dragToResize": "Glisser pour redimensionner",
@@ -4169,6 +4163,11 @@
4169
4163
  "noMatches": "Aucune page correspondante.",
4170
4164
  "emptySearchable": "Recherchez par titre ou choisissez un document importé.",
4171
4165
  "emptyRefOnly": "Collez l'URL ou l'ID d'une page pour la joindre.",
4166
+ "sourceLabel": "Source",
4167
+ "noSource": "Choisir une source",
4168
+ "connectSource": "Connecter {label}",
4169
+ "needsSource": "Connectez une source de documents pour joindre une page.",
4170
+ "needsSourceAdmin": "Aucune source de documents n'est connectée. Demandez à un administrateur de l'espace de travail d'en connecter une.",
4172
4171
  "refChecking": "Vérification de la référence…",
4173
4172
  "refUnrecognized": "Ce n'est pas une référence {source}. Format attendu : {expected}",
4174
4173
  "refOtherSource": "C'est un lien {claimed}, pas un lien {source}.",
@@ -4305,6 +4304,7 @@
4305
4304
  "searchIssues": "Rechercher des tickets",
4306
4305
  "searchPlaceholder": "Recherchez par titre, collez l'URL d'un ticket ou saisissez un numéro de ticket…",
4307
4306
  "createTasksIn": "Créer des tâches dans",
4307
+ "creatingIn": "Les nouvelles tâches sont créées dans {container}",
4308
4308
  "needFrameFirst": "Ajoutez d'abord un cadre de service au tableau pour créer des tâches à partir de tickets.",
4309
4309
  "searchFailed": "Échec de la recherche : {error}",
4310
4310
  "searchResults": "Résultats de la recherche",
@@ -4357,6 +4357,7 @@
4357
4357
  "labels": "Étiquettes",
4358
4358
  "labelsHelp": "Séparées par des virgules. Toutes doivent être présentes.",
4359
4359
  "adoptInto": "Ajouter le bug retenu à",
4360
+ "adoptingInto": "Le bug retenu est ajouté à {container}",
4360
4361
  "run": "Chasser",
4361
4362
  "running": "Lecture du tableau et évaluation des résultats…",
4362
4363
  "huntFailed": "La chasse a échoué",
@@ -404,20 +404,14 @@
404
404
  },
405
405
  "shared": "משותף",
406
406
  "sharedTitle": "משותף בין סביבות העבודה בארגון זה",
407
- "bootstrapping": "מאתחל…",
408
407
  "bootstrappingRepository": "מאתחל מאגר…",
409
408
  "bootstrapStepsCount": "{completed}/{total} שלבים",
410
- "runFailed": "הריצה נכשלה",
411
- "mergedOfTotal": "{merged}/{total} מוזגו",
412
- "noTasksYet": "אין עדיין משימות",
413
- "prCount": "{count} PR",
414
409
  "prReadyCount": "{count} PR מוכנים",
415
410
  "taskCount": "{count} משימה | שתי משימות | {count} משימות",
416
411
  "moduleCount": "{count} מודול | שני מודולים | {count} מודולים",
417
412
  "addTaskTitle": "הוסף משימה",
418
413
  "createTaskFromIssueTitle": "צור משימה מאישיו",
419
414
  "addRecurringTitle": "הוסף צינור מחזורי",
420
- "collapseTitle": "כווץ",
421
415
  "dragService": "גרור שירות",
422
416
  "dragTask": "גרור משימה",
423
417
  "dragToResize": "גרור לשינוי גודל",
@@ -4169,6 +4163,11 @@
4169
4163
  "noMatches": "אין דפים תואמים.",
4170
4164
  "emptySearchable": "חפש לפי כותרת, או בחר מסמך שיובא.",
4171
4165
  "emptyRefOnly": "הדבק כתובת URL או מזהה של דף כדי לצרף אותו.",
4166
+ "sourceLabel": "מקור",
4167
+ "noSource": "בחר מקור",
4168
+ "connectSource": "חבר {label}",
4169
+ "needsSource": "חבר מקור מסמכים כדי לצרף עמוד.",
4170
+ "needsSourceAdmin": "לא מחובר שום מקור מסמכים. בקש ממנהל סביבת העבודה לחבר מקור.",
4172
4171
  "refChecking": "בודקים את ההפניה…",
4173
4172
  "refUnrecognized": "זו אינה הפניה של {source}. הפורמט הצפוי: {expected}",
4174
4173
  "refOtherSource": "זה קישור של {claimed}, לא של {source}.",
@@ -4305,6 +4304,7 @@
4305
4304
  "searchIssues": "חפש ניושנים",
4306
4305
  "searchPlaceholder": "חפש לפי כותרת, הדבק URL של ניושן, או הקלד מספר ניושן…",
4307
4306
  "createTasksIn": "צור משימות ב-",
4307
+ "creatingIn": "משימות חדשות ייווצרו ב-{container}",
4308
4308
  "needFrameFirst": "הוסף תחילה מסגרת שירות ללוח כדי ליצור משימות מניושנים.",
4309
4309
  "searchFailed": "החיפוש נכשל: {error}",
4310
4310
  "searchResults": "תוצאות חיפוש",
@@ -4357,6 +4357,7 @@
4357
4357
  "labels": "תוויות",
4358
4358
  "labelsHelp": "מופרדות בפסיקים. כולן חייבות להופיע.",
4359
4359
  "adoptInto": "הוסף את הבאג הנבחר אל",
4360
+ "adoptingInto": "הבאג הנבחר יתווסף ל-{container}",
4360
4361
  "run": "צוד",
4361
4362
  "running": "קורא את הלוח ומעריך את מה שנמצא…",
4362
4363
  "huntFailed": "הציד נכשל",
@@ -2911,20 +2911,14 @@
2911
2911
  },
2912
2912
  "shared": "Condiviso",
2913
2913
  "sharedTitle": "Condiviso tra i workspace di questa org",
2914
- "bootstrapping": "Bootstrap in corso…",
2915
2914
  "bootstrappingRepository": "Bootstrap del repository in corso…",
2916
2915
  "bootstrapStepsCount": "{completed}/{total} fasi",
2917
- "runFailed": "Esecuzione fallita",
2918
- "mergedOfTotal": "{merged}/{total} unite",
2919
- "noTasksYet": "Ancora nessuna attività",
2920
- "prCount": "{count} PR",
2921
2916
  "prReadyCount": "{count} PR pronte",
2922
2917
  "taskCount": "{count} attività | {count} attività",
2923
2918
  "moduleCount": "{count} modulo | {count} moduli",
2924
2919
  "addTaskTitle": "Aggiungi attività",
2925
2920
  "createTaskFromIssueTitle": "Crea attività da issue",
2926
2921
  "addRecurringTitle": "Aggiungi pipeline ricorrente",
2927
- "collapseTitle": "Comprimi",
2928
2922
  "dragService": "Trascina il servizio",
2929
2923
  "dragTask": "Trascina l'attività",
2930
2924
  "dragToResize": "Trascina per ridimensionare",
@@ -3786,6 +3780,11 @@
3786
3780
  "noMatches": "Nessuna pagina corrispondente.",
3787
3781
  "emptySearchable": "Cerca per titolo, oppure scegli un documento importato.",
3788
3782
  "emptyRefOnly": "Incolla l'URL o l'ID di una pagina per allegarla.",
3783
+ "sourceLabel": "Fonte",
3784
+ "noSource": "Scegli una fonte",
3785
+ "connectSource": "Collega {label}",
3786
+ "needsSource": "Collega una sorgente di documenti per allegare una pagina.",
3787
+ "needsSourceAdmin": "Nessuna sorgente di documenti è collegata. Chiedi a un amministratore del workspace di collegarne una.",
3789
3788
  "refChecking": "Verifica del riferimento…",
3790
3789
  "refUnrecognized": "Non è un riferimento {source}. Formato atteso: {expected}",
3791
3790
  "refOtherSource": "È un link {claimed}, non un link {source}.",
@@ -3922,6 +3921,7 @@
3922
3921
  "searchIssues": "Cerca issue",
3923
3922
  "searchPlaceholder": "Cerca per titolo, incolla l'URL di una issue, o digita un numero di issue…",
3924
3923
  "createTasksIn": "Crea attività in",
3924
+ "creatingIn": "Le nuove attività vengono create in {container}",
3925
3925
  "needFrameFirst": "Aggiungi prima un frame di servizio alla board per creare attività dalle issue.",
3926
3926
  "searchFailed": "Ricerca non riuscita: {error}",
3927
3927
  "searchResults": "Risultati della ricerca",
@@ -3974,6 +3974,7 @@
3974
3974
  "labels": "Etichette",
3975
3975
  "labelsHelp": "Separate da virgole. Devono essere tutte presenti.",
3976
3976
  "adoptInto": "Aggiungi il bug scelto a",
3977
+ "adoptingInto": "Il bug scelto viene aggiunto a {container}",
3977
3978
  "run": "Cerca",
3978
3979
  "running": "Lettura della bacheca e valutazione di quanto trovato…",
3979
3980
  "huntFailed": "La caccia non è riuscita",
@@ -404,20 +404,14 @@
404
404
  },
405
405
  "shared": "共有",
406
406
  "sharedTitle": "この組織内のワークスペース間で共有",
407
- "bootstrapping": "ブートストラップ中…",
408
407
  "bootstrappingRepository": "リポジトリをブートストラップ中…",
409
408
  "bootstrapStepsCount": "{completed}/{total} ステップ",
410
- "runFailed": "実行に失敗しました",
411
- "mergedOfTotal": "{merged}/{total} マージ済み",
412
- "noTasksYet": "タスクはまだありません",
413
- "prCount": "{count} 件の PR",
414
409
  "prReadyCount": "{count} 件の PR が準備完了",
415
410
  "taskCount": "{count} 件のタスク | {count} 件のタスク",
416
411
  "moduleCount": "{count} 件のモジュール | {count} 件のモジュール",
417
412
  "addTaskTitle": "タスクを追加",
418
413
  "createTaskFromIssueTitle": "課題からタスクを作成",
419
414
  "addRecurringTitle": "繰り返しパイプラインを追加",
420
- "collapseTitle": "折りたたむ",
421
415
  "dragService": "サービスをドラッグ",
422
416
  "dragTask": "タスクをドラッグ",
423
417
  "dragToResize": "ドラッグしてサイズ変更",
@@ -4169,6 +4163,11 @@
4169
4163
  "noMatches": "一致するページがありません。",
4170
4164
  "emptySearchable": "タイトルで検索するか、インポート済みドキュメントを選択してください。",
4171
4165
  "emptyRefOnly": "ページの URL または ID を貼り付けて添付します。",
4166
+ "sourceLabel": "ソース",
4167
+ "noSource": "ソースを選択",
4168
+ "connectSource": "{label} を接続",
4169
+ "needsSource": "ページを添付するにはドキュメントソースを接続してください。",
4170
+ "needsSourceAdmin": "ドキュメントソースが接続されていません。ワークスペースの管理者に接続を依頼してください。",
4172
4171
  "refChecking": "参照を確認しています…",
4173
4172
  "refUnrecognized": "{source} の参照ではありません。想定される形式: {expected}",
4174
4173
  "refOtherSource": "これは {claimed} のリンクであり、{source} のものではありません。",
@@ -4305,6 +4304,7 @@
4305
4304
  "searchIssues": "課題を検索",
4306
4305
  "searchPlaceholder": "タイトルで検索、課題の URL を貼り付け、または課題番号を入力…",
4307
4306
  "createTasksIn": "タスクの作成先",
4307
+ "creatingIn": "新しいタスクは {container} に作成されます",
4308
4308
  "needFrameFirst": "課題からタスクを作成するには、先にボードにサービスフレームを追加してください。",
4309
4309
  "searchFailed": "検索に失敗しました: {error}",
4310
4310
  "searchResults": "検索結果",
@@ -4357,6 +4357,7 @@
4357
4357
  "labels": "ラベル",
4358
4358
  "labelsHelp": "カンマ区切り。すべて付いている必要があります。",
4359
4359
  "adoptInto": "選んだバグの追加先",
4360
+ "adoptingInto": "選んだバグは {container} に追加されます",
4360
4361
  "run": "ハント",
4361
4362
  "running": "ボードを読み取り、見つかったものを評価しています…",
4362
4363
  "huntFailed": "ハントに失敗しました",
@@ -404,20 +404,14 @@
404
404
  },
405
405
  "shared": "Współdzielone",
406
406
  "sharedTitle": "Współdzielone między obszarami roboczymi tej organizacji",
407
- "bootstrapping": "Inicjalizacja…",
408
407
  "bootstrappingRepository": "Inicjalizacja repozytorium…",
409
408
  "bootstrapStepsCount": "{completed}/{total} kroków",
410
- "runFailed": "Uruchomienie nie powiodło się",
411
- "mergedOfTotal": "{merged}/{total} scalonych",
412
- "noTasksYet": "Brak zadań",
413
- "prCount": "{count} PR",
414
409
  "prReadyCount": "{count} PR gotowych",
415
410
  "taskCount": "{count} zadanie | {count} zadania | {count} zadań",
416
411
  "moduleCount": "{count} moduł | {count} moduły | {count} modułów",
417
412
  "addTaskTitle": "Dodaj zadanie",
418
413
  "createTaskFromIssueTitle": "Utwórz zadanie ze zgłoszenia",
419
414
  "addRecurringTitle": "Dodaj cykliczny pipeline",
420
- "collapseTitle": "Zwiń",
421
415
  "dragService": "Przeciągnij usługę",
422
416
  "dragTask": "Przeciągnij zadanie",
423
417
  "dragToResize": "Przeciągnij, aby zmienić rozmiar",
@@ -4169,6 +4163,11 @@
4169
4163
  "noMatches": "Brak pasujących stron.",
4170
4164
  "emptySearchable": "Wyszukaj według tytułu lub wybierz zaimportowany dokument.",
4171
4165
  "emptyRefOnly": "Wklej adres URL lub identyfikator strony, aby ją dołączyć.",
4166
+ "sourceLabel": "Źródło",
4167
+ "noSource": "Wybierz źródło",
4168
+ "connectSource": "Połącz {label}",
4169
+ "needsSource": "Połącz źródło dokumentów, aby dołączyć stronę.",
4170
+ "needsSourceAdmin": "Nie podłączono żadnego źródła dokumentów. Poproś administratora przestrzeni roboczej, aby je podłączył.",
4172
4171
  "refChecking": "Sprawdzanie odwołania…",
4173
4172
  "refUnrecognized": "To nie jest odwołanie {source}. Oczekiwano: {expected}",
4174
4173
  "refOtherSource": "To jest link {claimed}, a nie {source}.",
@@ -4305,6 +4304,7 @@
4305
4304
  "searchIssues": "Szukaj zgłoszeń",
4306
4305
  "searchPlaceholder": "Szukaj według tytułu, wklej adres URL zgłoszenia lub wpisz numer zgłoszenia…",
4307
4306
  "createTasksIn": "Utwórz zadania w",
4307
+ "creatingIn": "Nowe zadania powstaną w {container}",
4308
4308
  "needFrameFirst": "Najpierw dodaj ramę usługi do tablicy, aby tworzyć zadania ze zgłoszeń.",
4309
4309
  "searchFailed": "Wyszukiwanie nie powiodło się: {error}",
4310
4310
  "searchResults": "Wyniki wyszukiwania",
@@ -4357,6 +4357,7 @@
4357
4357
  "labels": "Etykiety",
4358
4358
  "labelsHelp": "Oddzielone przecinkami. Wszystkie muszą występować.",
4359
4359
  "adoptInto": "Dodaj wybrany błąd do",
4360
+ "adoptingInto": "Wybrany błąd trafi do {container}",
4360
4361
  "run": "Poluj",
4361
4362
  "running": "Odczytywanie tablicy i ocenianie znalezionych zgłoszeń…",
4362
4363
  "huntFailed": "Polowanie nie powiodło się",
@@ -404,20 +404,14 @@
404
404
  },
405
405
  "shared": "Paylaşılan",
406
406
  "sharedTitle": "Bu organizasyondaki çalışma alanları arasında paylaşılan",
407
- "bootstrapping": "Bootstrap yapılıyor…",
408
407
  "bootstrappingRepository": "Depo bootstrap'lanıyor…",
409
408
  "bootstrapStepsCount": "{completed}/{total} adım",
410
- "runFailed": "Çalıştırma başarısız oldu",
411
- "mergedOfTotal": "{merged}/{total} birleştirildi",
412
- "noTasksYet": "Henüz görev yok",
413
- "prCount": "{count} PR",
414
409
  "prReadyCount": "{count} PR hazır",
415
410
  "taskCount": "{count} görev | {count} görev",
416
411
  "moduleCount": "{count} modül | {count} modül",
417
412
  "addTaskTitle": "Görev ekle",
418
413
  "createTaskFromIssueTitle": "Sorundan görev oluştur",
419
414
  "addRecurringTitle": "Yinelenen pipeline ekle",
420
- "collapseTitle": "Daralt",
421
415
  "dragService": "Servisi sürükle",
422
416
  "dragTask": "Görevi sürükle",
423
417
  "dragToResize": "Yeniden boyutlandırmak için sürükle",
@@ -4169,6 +4163,11 @@
4169
4163
  "noMatches": "Eşleşen sayfa yok.",
4170
4164
  "emptySearchable": "Başlığa göre ara veya içe aktarılmış bir belge seç.",
4171
4165
  "emptyRefOnly": "Eklemek için bir sayfa URL'si veya ID'si yapıştır.",
4166
+ "sourceLabel": "Kaynak",
4167
+ "noSource": "Bir kaynak seç",
4168
+ "connectSource": "{label} bağla",
4169
+ "needsSource": "Bir sayfa eklemek için bir belge kaynağı bağla.",
4170
+ "needsSourceAdmin": "Bağlı belge kaynağı yok. Bir çalışma alanı yöneticisinden birini bağlamasını iste.",
4172
4171
  "refChecking": "Referans denetleniyor…",
4173
4172
  "refUnrecognized": "Bu bir {source} referansı değil. Beklenen: {expected}",
4174
4173
  "refOtherSource": "Bu bir {claimed} bağlantısı, {source} bağlantısı değil.",
@@ -4305,6 +4304,7 @@
4305
4304
  "searchIssues": "Sorunlarda ara",
4306
4305
  "searchPlaceholder": "Başlığa göre ara, bir sorun URL'si yapıştır veya bir sorun numarası yaz…",
4307
4306
  "createTasksIn": "Görevleri şurada oluştur",
4307
+ "creatingIn": "Yeni görevler {container} içinde oluşturulur",
4308
4308
  "needFrameFirst": "Sorunlardan görev oluşturmak için önce panoya bir servis çerçevesi ekle.",
4309
4309
  "searchFailed": "Arama başarısız: {error}",
4310
4310
  "searchResults": "Arama sonuçları",
@@ -4357,6 +4357,7 @@
4357
4357
  "labels": "Etiketler",
4358
4358
  "labelsHelp": "Virgülle ayrılır. Hepsinin bulunması gerekir.",
4359
4359
  "adoptInto": "Seçilen hatayı şuraya ekle",
4360
+ "adoptingInto": "Seçilen hata {container} içine eklenir",
4360
4361
  "run": "Avla",
4361
4362
  "running": "Pano okunuyor ve bulunanlar değerlendiriliyor…",
4362
4363
  "huntFailed": "Av başarısız oldu",
@@ -404,20 +404,14 @@
404
404
  },
405
405
  "shared": "Спільне",
406
406
  "sharedTitle": "Спільне для робочих просторів цієї організації",
407
- "bootstrapping": "Ініціалізація…",
408
407
  "bootstrappingRepository": "Ініціалізація репозиторію…",
409
408
  "bootstrapStepsCount": "{completed}/{total} кроків",
410
- "runFailed": "Запуск не вдався",
411
- "mergedOfTotal": "{merged}/{total} злито",
412
- "noTasksYet": "Поки немає завдань",
413
- "prCount": "{count} PR",
414
409
  "prReadyCount": "{count} PR готово",
415
410
  "taskCount": "{count} завдання | {count} завдання | {count} завдань",
416
411
  "moduleCount": "{count} модуль | {count} модулі | {count} модулів",
417
412
  "addTaskTitle": "Додати завдання",
418
413
  "createTaskFromIssueTitle": "Створити завдання зі звернення",
419
414
  "addRecurringTitle": "Додати періодичний конвеєр",
420
- "collapseTitle": "Згорнути",
421
415
  "dragService": "Перетягнути сервіс",
422
416
  "dragTask": "Перетягнути завдання",
423
417
  "dragToResize": "Перетягніть, щоб змінити розмір",
@@ -4169,6 +4163,11 @@
4169
4163
  "noMatches": "Немає відповідних сторінок.",
4170
4164
  "emptySearchable": "Шукайте за назвою або виберіть імпортований документ.",
4171
4165
  "emptyRefOnly": "Вставте URL або ідентифікатор сторінки, щоб долучити її.",
4166
+ "sourceLabel": "Джерело",
4167
+ "noSource": "Виберіть джерело",
4168
+ "connectSource": "Підключити {label}",
4169
+ "needsSource": "Підключіть джерело документів, щоб долучити сторінку.",
4170
+ "needsSourceAdmin": "Не підключено жодного джерела документів. Попросіть адміністратора робочого простору підключити його.",
4172
4171
  "refChecking": "Перевіряємо посилання…",
4173
4172
  "refUnrecognized": "Це не посилання {source}. Очікується: {expected}",
4174
4173
  "refOtherSource": "Це посилання {claimed}, а не {source}.",
@@ -4305,6 +4304,7 @@
4305
4304
  "searchIssues": "Шукати завдання",
4306
4305
  "searchPlaceholder": "Шукайте за назвою, вставте URL завдання або введіть номер завдання…",
4307
4306
  "createTasksIn": "Створити завдання в",
4307
+ "creatingIn": "Нові завдання створюються в {container}",
4308
4308
  "needFrameFirst": "Спочатку додайте рамку сервісу на дошку, щоб створювати завдання з тікетів.",
4309
4309
  "searchFailed": "Не вдалося виконати пошук: {error}",
4310
4310
  "searchResults": "Результати пошуку",
@@ -4357,6 +4357,7 @@
4357
4357
  "labels": "Мітки",
4358
4358
  "labelsHelp": "Через кому. Усі мають бути присутні.",
4359
4359
  "adoptInto": "Додати обрану помилку до",
4360
+ "adoptingInto": "Обрана помилка додається до {container}",
4360
4361
  "run": "Полювати",
4361
4362
  "running": "Читаємо дошку та оцінюємо знайдене…",
4362
4363
  "huntFailed": "Полювання не вдалося",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/app",
3
- "version": "0.236.1",
3
+ "version": "0.237.1",
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",
@@ -40,7 +40,7 @@
40
40
  "valibot": "^1.4.2",
41
41
  "vue": "3.5.40",
42
42
  "wretch": "^3.0.9",
43
- "@cat-factory/contracts": "0.256.0"
43
+ "@cat-factory/contracts": "0.257.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@toad-contracts/testing": "0.3.2",
@@ -1,100 +0,0 @@
1
- import { describe, it, expect } from 'vitest'
2
- import { buildSourceChoices, reconcileSource } from './taskSources'
3
- import type { TaskSourceState } from '~/types/domain'
4
-
5
- /**
6
- * The pure tracker-selection behind `<ContextIssuePicker>` and `<BugHuntModal>`. Pins what
7
- * the always-visible selector promises: the tracker in use is named even when it is the only
8
- * one, a tracker the workspace hasn't got yet is offered as something to ADD (worded for its
9
- * actual state), and the selection stays valid as the offered set changes underneath it.
10
- */
11
- const state = (source: string, { available = true, enabled = true } = {}): TaskSourceState =>
12
- ({
13
- source,
14
- label: source.toUpperCase(),
15
- icon: `i-lucide-${source}`,
16
- available,
17
- enabled,
18
- credentialFields: [],
19
- refLabel: '',
20
- refPlaceholder: '',
21
- }) as unknown as TaskSourceState
22
-
23
- describe('buildSourceChoices', () => {
24
- it('lists a single offered tracker, marked active (the selector is never hidden)', () => {
25
- const groups = buildSourceChoices([state('github')], 'github')
26
- expect(groups).toEqual([
27
- [
28
- {
29
- action: 'select',
30
- source: 'github',
31
- label: 'GITHUB',
32
- icon: 'i-lucide-github',
33
- active: true,
34
- },
35
- ],
36
- ])
37
- })
38
-
39
- it('marks only the selected tracker active', () => {
40
- const [offered] = buildSourceChoices([state('github'), state('jira')], 'jira')
41
- expect(offered!.map((c) => [c.source, 'active' in c && c.active])).toEqual([
42
- ['github', false],
43
- ['jira', true],
44
- ])
45
- })
46
-
47
- it('offers an unavailable tracker as `connect` and an available-but-off one as `enable`', () => {
48
- const [, addable] = buildSourceChoices(
49
- [state('github'), state('jira', { available: false }), state('linear', { enabled: false })],
50
- 'github',
51
- )
52
- expect(addable).toEqual([
53
- { action: 'connect', source: 'jira', label: 'JIRA', icon: 'i-lucide-jira' },
54
- { action: 'enable', source: 'linear', label: 'LINEAR', icon: 'i-lucide-linear' },
55
- ])
56
- })
57
-
58
- // What a surface's "nothing connected yet" state renders its add buttons from: it flattens
59
- // the groups, so every choice there has to be addable. A `select` leaking through would
60
- // offer to connect a tracker the workspace already has.
61
- it('yields only addable choices when the workspace offers no tracker', () => {
62
- const choices = buildSourceChoices(
63
- [state('jira', { available: false }), state('linear', { enabled: false })],
64
- undefined,
65
- ).flat()
66
- expect(choices.map((c) => c.action)).toEqual(['connect', 'enable'])
67
- })
68
-
69
- it('drops empty groups so the menu renders no stray separator', () => {
70
- expect(buildSourceChoices([state('github')], 'github')).toHaveLength(1)
71
- expect(buildSourceChoices([state('jira', { available: false })], undefined)).toHaveLength(1)
72
- expect(buildSourceChoices([], undefined)).toEqual([])
73
- })
74
- })
75
-
76
- describe('reconcileSource', () => {
77
- it('selects the tracker the user just went off to connect, once it is offered', () => {
78
- expect(reconcileSource(['github', 'jira'], 'github', 'jira')).toBe('jira')
79
- })
80
-
81
- it('keeps the current selection while the connect is still pending', () => {
82
- expect(reconcileSource(['github'], 'github', 'jira')).toBe('github')
83
- })
84
-
85
- it('keeps a still-offered selection', () => {
86
- expect(reconcileSource(['github', 'jira'], 'jira', null)).toBe('jira')
87
- })
88
-
89
- it('falls back to the first offered tracker when the selection stopped being offered', () => {
90
- expect(reconcileSource(['github'], 'jira', null)).toBe('github')
91
- })
92
-
93
- it('selects the first offered tracker when nothing is selected yet', () => {
94
- expect(reconcileSource(['github'], undefined, null)).toBe('github')
95
- })
96
-
97
- it('resolves to nothing when the workspace offers no tracker at all', () => {
98
- expect(reconcileSource([], 'jira', 'jira')).toBeUndefined()
99
- })
100
- })
@@ -1,76 +0,0 @@
1
- import type { TaskSourceKind, TaskSourceState } from '~/types/domain'
2
-
3
- /**
4
- * Pure tracker-selection logic shared by every surface that picks a task source: which
5
- * tracker is selected, and what its menu offers. Kept out of the components so their
6
- * `computed`s and the unit spec call the same code.
7
- *
8
- * The menu is deliberately two-tier — pick an already-offered tracker, or go and add
9
- * one — because a tracker-picking surface is exactly where a user discovers the tracker
10
- * they want is missing, and sending them off to the Integrations hub loses whatever they
11
- * had in progress. Today `<ContextIssuePicker>` (attach a context issue) and
12
- * `<BugHuntModal>` (scan a board for bugs) both render it.
13
- */
14
-
15
- /** One row of a tracker menu. */
16
- export type SourceChoice =
17
- /** An offered tracker the surface can use right now. */
18
- | { action: 'select'; source: TaskSourceKind; label: string; icon: string; active: boolean }
19
- /**
20
- * A configured tracker that is not offered yet, so it can be added from here. `connect`
21
- * has no credential/App behind it; `enable` is connected but toggled off for the
22
- * workspace. Both open the same connect modal, which serves either case — only the
23
- * wording differs, so the user isn't told to "connect" something already connected.
24
- */
25
- | { action: 'connect' | 'enable'; source: TaskSourceKind; label: string; icon: string }
26
-
27
- /**
28
- * A tracker menu, as non-empty groups (the offered trackers, then the ones the user could
29
- * add). Empty groups are dropped so the menu never renders a stray separator.
30
- */
31
- export function buildSourceChoices(
32
- sources: TaskSourceState[],
33
- selected: TaskSourceKind | undefined,
34
- ): SourceChoice[][] {
35
- const offered: SourceChoice[] = []
36
- const addable: SourceChoice[] = []
37
- for (const s of sources) {
38
- if (s.available && s.enabled) {
39
- offered.push({
40
- action: 'select',
41
- source: s.source,
42
- label: s.label,
43
- icon: s.icon,
44
- active: s.source === selected,
45
- })
46
- } else {
47
- addable.push({
48
- action: s.available ? 'enable' : 'connect',
49
- source: s.source,
50
- label: s.label,
51
- icon: s.icon,
52
- })
53
- }
54
- }
55
- return [offered, addable].filter((group) => group.length > 0)
56
- }
57
-
58
- /**
59
- * The source a surface should hold once the offered set changes — after a connect, a
60
- * disconnect, or the per-workspace toggle flipping elsewhere.
61
- *
62
- * `awaiting` is the tracker the user just left to connect: the moment it becomes offered
63
- * it wins, so they land back on the source they went to add rather than on whatever was
64
- * selected before. Otherwise a still-offered selection is kept, and a selection that
65
- * stopped being offered falls back to the first one (reading a tracker the workspace no
66
- * longer offers only yields errors).
67
- */
68
- export function reconcileSource(
69
- offered: TaskSourceKind[],
70
- selected: TaskSourceKind | undefined,
71
- awaiting: TaskSourceKind | null,
72
- ): TaskSourceKind | undefined {
73
- if (awaiting && offered.includes(awaiting)) return awaiting
74
- if (selected && offered.includes(selected)) return selected
75
- return offered[0]
76
- }