The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fit the AI chat user credits banner on one line (#28949)
Etienne989c9ee416a4
diff --git a/packages/twenty-front/src/modules/ai/components/AiChatUserCreditsExhaustedBanner.tsx b/packages/twenty-front/src/modules/ai/components/AiChatUserCreditsExhaustedBanner.tsxindex d46cef0e4f1..c61671f4538 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatUserCreditsExhaustedBanner.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatUserCreditsExhaustedBanner.tsx@@ -63,8 +63,8 @@ export const AiChatUserCreditsExhaustedBanner = () => {}>{isFallingBackToWorkspaceCredits- ? t`Personal usage limit reached. Using workspace credits until it resets in ${plural(daysUntilReset, { one: '# day', other: '# days' })}.`- : t`Personal usage limit reached. Chats resume in ${plural(daysUntilReset, { one: '# day', other: '# days' })}.`}+ ? t`Using workspace credits for ${plural(daysUntilReset, { one: '# day', other: '# days' })}.`+ : t`Personal usage limit resets in ${plural(daysUntilReset, { one: '# day', other: '# days' })}.`}</AiChatInlineBanner>);};diff --git a/packages/twenty-front/src/modules/ai/components/__tests__/AiChatUserCreditsExhaustedBanner.test.tsx b/packages/twenty-front/src/modules/ai/components/__tests__/AiChatUserCreditsExhaustedBanner.test.tsxindex 2ee10191e7a..c1fd7e8ddbb 100644--- a/packages/twenty-front/src/modules/ai/components/__tests__/AiChatUserCreditsExhaustedBanner.test.tsx+++ b/packages/twenty-front/src/modules/ai/components/__tests__/AiChatUserCreditsExhaustedBanner.test.tsx@@ -74,12 +74,9 @@ describe('AiChatUserCreditsExhaustedBanner', () => {it.each([[UserCreditsFallback.WORKSPACE_CREDITS,- 'Personal usage limit reached. Using workspace credits until it resets in 3 days.',- ],- [- UserCreditsFallback.STOP,- 'Personal usage limit reached. Chats resume in 3 days.',+ 'Using workspace credits for 3 days.',],+ [UserCreditsFallback.STOP, 'Personal usage limit resets in 3 days.'],])('tells the member what happens until renewal with fallback %s',async (userCreditsFallback, notice) => {@@ -97,7 +94,7 @@ describe('AiChatUserCreditsExhaustedBanner', () => {);expect(- screen.queryByText(/Personal usage limit reached/),+ screen.queryByText('Using workspace credits for 3 days.'),).not.toBeInTheDocument();expect(JSON.parse(@@ -124,9 +121,7 @@ describe('AiChatUserCreditsExhaustedBanner', () => {renderBanner();expect(- await screen.findByText(- 'Personal usage limit reached. Using workspace credits until it resets in 3 days.',- ),+ await screen.findByText('Using workspace credits for 3 days.'),).toBeVisible();});@@ -143,9 +138,7 @@ describe('AiChatUserCreditsExhaustedBanner', () => {renderBanner(UserCreditsFallback.STOP);expect(- await screen.findByText(- 'Personal usage limit reached. Chats resume in 3 days.',- ),+ await screen.findByText('Personal usage limit resets in 3 days.'),).toBeVisible();});});