@bcrumbs.net/inbox 0.0.74 → 0.0.76
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/assets/ar/inbox.json +17 -0
- package/assets/en/inbox.json +9 -0
- package/e2e/qa/qa.api.d.ts +22 -0
- package/e2e/qa/qa.flows.d.ts +46 -0
- package/e2e/support/cleanup.d.ts +1 -0
- package/e2e/support/config.d.ts +2 -0
- package/e2e/support/index.d.ts +2 -2
- package/index.cjs.js +987 -284
- package/index.esm.js +988 -285
- package/package.json +3 -3
- package/src/app/ai/components/qa/QaEmptyState.d.ts +5 -0
- package/src/app/ai/components/qa/QaFormDialog.d.ts +16 -0
- package/src/app/ai/components/qa/QaLinkToastTitle.d.ts +8 -0
- package/src/app/ai/components/qa/QaTable.d.ts +10 -0
- package/src/app/ai/components/qa/SavedAsQaToastTitle.d.ts +6 -0
- package/src/app/ai/hooks/useOpenQaFromLink.d.ts +6 -0
- package/src/app/ai/hooks/useQaActions.d.ts +10 -0
- package/src/app/ai/hooks/useQaColumns.d.ts +15 -0
- package/src/app/ai/hooks/useQaDuplicateCheck.d.ts +8 -0
- package/src/app/ai/hooks/useSaveMessageAsQa.d.ts +17 -0
- package/src/app/ai/pages/QaPage.d.ts +2 -0
- package/src/app/ai/types/index.d.ts +9 -0
- package/src/app/ai/utils/crumbyChatTransport.d.ts +6 -0
- package/src/app/ai/utils/qa.d.ts +3 -0
- package/src/app/ai/utils/qaLink.d.ts +3 -0
- package/src/app/ai/utils/toolInputDeltaGuard.d.ts +10 -0
- package/src/app/auth/pages/CheckAuth.d.ts +2 -1
- package/src/app/gatewayHome/hooks/useGatewaySetup.d.ts +2 -0
- package/src/app/inbox/components/Chat/ChatContent.d.ts +1 -0
- package/src/app/inbox/components/NewConvList/ConvLimitNotice.d.ts +6 -0
- package/src/app/inbox/components/NewConvList/HeaderSection.d.ts +4 -1
- package/src/app/inbox/components/NewConvList/index.d.ts +3 -1
- package/src/app/inbox/hooks/useConvLimitToast.d.ts +6 -0
- package/src/app/inbox/hooks/useConversationsPerodicFetch.d.ts +2 -0
- package/src/assets/locales/translations.d.ts +64 -0
- package/src/graphql.autogenerated.d.ts +51 -11
package/assets/ar/inbox.json
CHANGED
|
@@ -104,6 +104,22 @@
|
|
|
104
104
|
"createChannel": "إنشاء قناة",
|
|
105
105
|
"selectToStart": "اختر محادثة للبدء"
|
|
106
106
|
},
|
|
107
|
+
"convLimit": {
|
|
108
|
+
"title_zero": "لا توجد محادثات معروضة",
|
|
109
|
+
"title_one": "عرض أحدث محادثة",
|
|
110
|
+
"title_two": "عرض أحدث محادثتين",
|
|
111
|
+
"title_few": "عرض أحدث {{count}} محادثات",
|
|
112
|
+
"title_many": "عرض أحدث {{count}} محادثة",
|
|
113
|
+
"title_other": "عرض أحدث {{count}} محادثة",
|
|
114
|
+
"description": "المحادثات الأقدم لا تظهر هنا. استخدم البحث أو الفلترة للعثور عليها",
|
|
115
|
+
"search": "بحث",
|
|
116
|
+
"toast_zero": "لا توجد محادثات معروضة. استخدم البحث أو الفلترة للعثور على المحادثات الأقدم",
|
|
117
|
+
"toast_one": "تم عرض أحدث محادثة. استخدم البحث أو الفلترة للعثور على المحادثات الأقدم",
|
|
118
|
+
"toast_two": "تم عرض أحدث محادثتين. استخدم البحث أو الفلترة للعثور على المحادثات الأقدم",
|
|
119
|
+
"toast_few": "تم عرض أحدث {{count}} محادثات. استخدم البحث أو الفلترة للعثور على المحادثات الأقدم",
|
|
120
|
+
"toast_many": "تم عرض أحدث {{count}} محادثة. استخدم البحث أو الفلترة للعثور على المحادثات الأقدم",
|
|
121
|
+
"toast_other": "تم عرض أحدث {{count}} محادثة. استخدم البحث أو الفلترة للعثور على المحادثات الأقدم"
|
|
122
|
+
},
|
|
107
123
|
"broadcastState": {
|
|
108
124
|
"all": "الكل",
|
|
109
125
|
"completed": "مكتمل",
|
|
@@ -219,6 +235,7 @@
|
|
|
219
235
|
"cancel": "إلغاء"
|
|
220
236
|
},
|
|
221
237
|
"addNotes": "إضافة ملاحظات",
|
|
238
|
+
"saveAsQa": "حفظ كسؤال وجواب",
|
|
222
239
|
"autoComplete": "تعبئة تلقائية",
|
|
223
240
|
"enhance": "تحسين",
|
|
224
241
|
"loading": "جاري التحميل...",
|
package/assets/en/inbox.json
CHANGED
|
@@ -105,6 +105,14 @@
|
|
|
105
105
|
"createChannel": "Create Channel",
|
|
106
106
|
"selectToStart": "Select a conversation to get started"
|
|
107
107
|
},
|
|
108
|
+
"convLimit": {
|
|
109
|
+
"title_one": "Showing The Latest Conversation",
|
|
110
|
+
"title_other": "Showing The Latest {{count}}",
|
|
111
|
+
"description": "Older conversations aren't shown here. Search or Filter to find them",
|
|
112
|
+
"search": "Search",
|
|
113
|
+
"toast_one": "Latest conversation shown. Search or Filter to find older messages",
|
|
114
|
+
"toast_other": "Latest {{count}} conversations shown. Search or Filter to find older messages"
|
|
115
|
+
},
|
|
108
116
|
"broadcastState": {
|
|
109
117
|
"all": "All",
|
|
110
118
|
"completed": "Completed",
|
|
@@ -220,6 +228,7 @@
|
|
|
220
228
|
"cancel": "Cancel"
|
|
221
229
|
},
|
|
222
230
|
"addNotes": "Add Notes",
|
|
231
|
+
"saveAsQa": "Save as Q&A",
|
|
223
232
|
"autoComplete": "Auto Complete",
|
|
224
233
|
"enhance": "Enhance",
|
|
225
234
|
"loading": "Loading...",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { APIRequestContext, Page } from '@playwright/test';
|
|
2
|
+
/** Tag every Q&A question created by the suite so leftovers are easy to find and purge. */
|
|
3
|
+
export declare const QA_PREFIX = "e2e-qa";
|
|
4
|
+
export type QaSession = {
|
|
5
|
+
token: string;
|
|
6
|
+
workspaceId: number;
|
|
7
|
+
};
|
|
8
|
+
type QaNode = {
|
|
9
|
+
id: string;
|
|
10
|
+
question: string;
|
|
11
|
+
};
|
|
12
|
+
/** Read the session the app stored after login. Call after the first navigation. */
|
|
13
|
+
export declare function readQaSession(page: Page): Promise<QaSession>;
|
|
14
|
+
export declare function listE2EQaEntries(request: APIRequestContext, session: QaSession): Promise<QaNode[]>;
|
|
15
|
+
/** Find the id of an entry by its exact question (used to build `?qaId=` deep links). */
|
|
16
|
+
export declare function findQaId(request: APIRequestContext, session: QaSession, question: string): Promise<string>;
|
|
17
|
+
/**
|
|
18
|
+
* Delete every suite-tagged entry in the workspace. Runs before and after each test so the
|
|
19
|
+
* duplicate check (similar-question search) never matches leftovers from an earlier test or run.
|
|
20
|
+
*/
|
|
21
|
+
export declare function deleteE2EQaEntries(request: APIRequestContext, session: QaSession): Promise<void>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type Browser, type Locator, type Page } from '@playwright/test';
|
|
2
|
+
import { type WorkspaceCleanupTarget } from '../support';
|
|
3
|
+
export declare const toasts: {
|
|
4
|
+
published: string;
|
|
5
|
+
savedAsDraft: string;
|
|
6
|
+
updated: string;
|
|
7
|
+
unpublished: string;
|
|
8
|
+
deleted: string;
|
|
9
|
+
duplicate: string;
|
|
10
|
+
};
|
|
11
|
+
export type QaValues = {
|
|
12
|
+
question: string;
|
|
13
|
+
answer?: string;
|
|
14
|
+
/** Toggles the Publish switch (only enabled once there is an answer). */
|
|
15
|
+
publish?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/** Unique, suite-tagged question. Keep `topic` distinct per entry so the similar-question check never matches. */
|
|
18
|
+
export declare function uniqueQuestion(topic: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Create a Free workspace for the suite in its own context (hooks can't use the test-scoped `page`).
|
|
21
|
+
* The shared account may own no workspace at all, so the suite never relies on a pre-existing one.
|
|
22
|
+
*/
|
|
23
|
+
export declare function createQaWorkspace(browser: Browser, name: string): Promise<WorkspaceCleanupTarget>;
|
|
24
|
+
/**
|
|
25
|
+
* A workspace with open onboarding steps auto-opens Crumby's panel on page load, over the page.
|
|
26
|
+
* Wait for that one-shot open and close it up front (closing it mid-test also drops a pending toast),
|
|
27
|
+
* then keep a handler as a fallback for any later reopen. Call right after the first navigation.
|
|
28
|
+
*/
|
|
29
|
+
export declare function dismissCrumby(page: Page): Promise<void>;
|
|
30
|
+
/** Point the app at the given workspace before any navigation. */
|
|
31
|
+
export declare function useWorkspace(page: Page, workspaceId: number): Promise<void>;
|
|
32
|
+
export declare function gotoQaPage(page: Page, search?: string): Promise<void>;
|
|
33
|
+
export declare function qaDialog(page: Page): Locator;
|
|
34
|
+
/** Open the Add dialog from the header button or the empty state (only one is rendered at a time). */
|
|
35
|
+
export declare function openAddDialog(page: Page): Promise<Locator>;
|
|
36
|
+
export declare function fillQaForm(dialog: Locator, { question, answer, publish }: QaValues): Promise<void>;
|
|
37
|
+
export declare function saveQaForm(dialog: Locator): Promise<void>;
|
|
38
|
+
/** Add an entry through the UI and wait for the dialog to close. */
|
|
39
|
+
export declare function addQa(page: Page, values: QaValues): Promise<void>;
|
|
40
|
+
export declare function qaRow(page: Page, question: string): Locator;
|
|
41
|
+
export declare function expectRowStatus(page: Page, question: string, status: 'Draft' | 'Published'): Promise<void>;
|
|
42
|
+
/** Pick an item from a row's actions dropdown (Edit / Publish / Unpublish / Delete). */
|
|
43
|
+
export declare function runRowAction(page: Page, question: string, action: string): Promise<void>;
|
|
44
|
+
export declare function confirmDelete(page: Page): Promise<void>;
|
|
45
|
+
export declare function searchQa(page: Page, text: string): Promise<void>;
|
|
46
|
+
export declare function expectToast(page: Page, text: string): Promise<void>;
|
package/e2e/support/cleanup.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { APIRequestContext } from '@playwright/test';
|
|
2
|
+
export declare function graphqlRequest<T>(request: APIRequestContext, url: string, token: string, query: string, variables: Record<string, unknown>): Promise<T>;
|
|
2
3
|
export type WorkspaceCleanupTarget = {
|
|
3
4
|
/** Numeric workspace id — `DeleteWorkspaceInput.workspaceId` is `Int!` (not a String/ID). */
|
|
4
5
|
workspaceId: number;
|
package/e2e/support/config.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export declare const E2E: {
|
|
|
14
14
|
export declare const CORE_GRAPHQL_URL: string;
|
|
15
15
|
/** Auth subgraph — exposes the `workspaces` list query used by the leftover sweep. */
|
|
16
16
|
export declare const AUTH_GRAPHQL_URL: string;
|
|
17
|
+
/** Bot subgraph — owns Crumby resources such as Q&A entries. */
|
|
18
|
+
export declare const BOT_GRAPHQL_URL: string;
|
|
17
19
|
/** Where the authenticated session (cookies + localStorage) is cached by the setup project. */
|
|
18
20
|
export declare const STORAGE_STATE_PATH: string;
|
|
19
21
|
/** The shared test user, or throw a clear error if credentials are missing. */
|
package/e2e/support/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Shared E2E foundation. Feature specs import infra from here; feature flows live beside the spec. */
|
|
2
2
|
export { test, expect, type WorkspaceCleanup } from './fixtures';
|
|
3
|
-
export { E2E, CORE_GRAPHQL_URL, AUTH_GRAPHQL_URL, STORAGE_STATE_PATH, requireTestUser } from './config';
|
|
3
|
+
export { E2E, CORE_GRAPHQL_URL, AUTH_GRAPHQL_URL, BOT_GRAPHQL_URL, STORAGE_STATE_PATH, requireTestUser, } from './config';
|
|
4
4
|
export { loginUser, readAuthToken, readWorkspaceContext, type TestUser } from './auth';
|
|
5
|
-
export { deleteWorkspaceViaCore, listE2EWorkspaces, type WorkspaceCleanupTarget } from './cleanup';
|
|
5
|
+
export { deleteWorkspaceViaCore, listE2EWorkspaces, graphqlRequest, type WorkspaceCleanupTarget, } from './cleanup';
|
|
6
6
|
export { E2E_PREFIX, RUN_ID, uniqueWorkspaceName } from './identifiers';
|