The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Add an App column to the app logs console table (#28482)
martmulld7f0886826a0
diff --git a/packages/twenty-front/src/modules/log-console/components/LogConsoleAppCell.tsx b/packages/twenty-front/src/modules/log-console/components/LogConsoleAppCell.tsxnew file mode 100644index 00000000000..0547bf6bab6--- /dev/null+++ b/packages/twenty-front/src/modules/log-console/components/LogConsoleAppCell.tsx@@ -0,0 +1,26 @@+import { isNonEmptyString } from '@sniptt/guards';++import { AppChip } from '@/applications/components/AppChip';+import { useApplicationChipData } from '@/applications/hooks/useApplicationChipData';+import { SettingsTableTextCell } from '@/settings/components/SettingsTableTextCell';++type LogConsoleAppCellProps = {+ applicationId?: string | null;+};++export const LogConsoleAppCell = ({+ applicationId,+}: LogConsoleAppCellProps) => {+ const { applicationChipData } = useApplicationChipData({ applicationId });++ return (+ <SettingsTableTextCell+ startElement={+ isNonEmptyString(applicationChipData.name) ? (+ <AppChip applicationId={applicationId} size="sm" chipOnly />+ ) : null+ }+ text={applicationChipData.name}+ />+ );+};diff --git a/packages/twenty-front/src/modules/log-console/components/__stories__/LogConsole.stories.tsx b/packages/twenty-front/src/modules/log-console/components/__stories__/LogConsole.stories.tsxindex a8559f43450..aff00cafbd2 100644--- a/packages/twenty-front/src/modules/log-console/components/__stories__/LogConsole.stories.tsx+++ b/packages/twenty-front/src/modules/log-console/components/__stories__/LogConsole.stories.tsx@@ -305,6 +305,7 @@ export const AppLogsOpen: Story = {"TypeError: Cannot read properties of undefined (reading 'amount_due')",),).toHaveLength(2);+ expect(await canvas.findByText('Lead Scoring')).toBeVisible();},};diff --git a/packages/twenty-front/src/modules/log-console/constants/LogConsoleApplicationLogAppColumn.tsx b/packages/twenty-front/src/modules/log-console/constants/LogConsoleApplicationLogAppColumn.tsxnew file mode 100644index 00000000000..16a583c701f--- /dev/null+++ b/packages/twenty-front/src/modules/log-console/constants/LogConsoleApplicationLogAppColumn.tsx@@ -0,0 +1,13 @@+import { msg } from '@lingui/core/macro';++import { LogConsoleAppCell } from '@/log-console/components/LogConsoleAppCell';+import { type LogConsoleColumn } from '@/log-console/types/LogConsoleColumn';++export const LOG_CONSOLE_APPLICATION_LOG_APP_COLUMN: LogConsoleColumn = {+ id: 'app',+ label: msg`App`,+ gridTrack: 'minmax(140px, 166px)',+ renderCell: (entry) => (+ <LogConsoleAppCell applicationId={entry.properties?.applicationId} />+ ),+};diff --git a/packages/twenty-front/src/modules/log-console/constants/LogConsoleApplicationLogColumns.tsx b/packages/twenty-front/src/modules/log-console/constants/LogConsoleApplicationLogColumns.tsxindex c1ef5aeafdd..23918345ce8 100644--- a/packages/twenty-front/src/modules/log-console/constants/LogConsoleApplicationLogColumns.tsx+++ b/packages/twenty-front/src/modules/log-console/constants/LogConsoleApplicationLogColumns.tsx@@ -4,14 +4,13 @@ import { IconBrandTypescript } from 'twenty-ui/icon';import { Status } from 'twenty-ui/primitives/data-display';import { themeCssVariables } from 'twenty-ui/theme';+import { LOG_CONSOLE_APPLICATION_LOG_APP_COLUMN } from '@/log-console/constants/LogConsoleApplicationLogAppColumn';import { LOG_CONSOLE_LEVELS } from '@/log-console/constants/LogConsoleLevels';import { LOG_CONSOLE_TIME_COLUMN } from '@/log-console/constants/LogConsoleTimeColumn';import { type LogConsoleColumn } from '@/log-console/types/LogConsoleColumn';import { SettingsTableTagCell } from '@/settings/components/SettingsTableTagCell';import { SettingsTableTextCell } from '@/settings/components/SettingsTableTextCell';-const EXECUTION_ID_DISPLAYED_LENGTH = 8;-export const LOG_CONSOLE_APPLICATION_LOG_COLUMNS: LogConsoleColumn[] = [LOG_CONSOLE_TIME_COLUMN,{@@ -57,17 +56,5 @@ export const LOG_CONSOLE_APPLICATION_LOG_COLUMNS: LogConsoleColumn[] = [return <SettingsTableTextCell text={firstLine} />;},},- {- id: 'execution',- label: msg`Execution`,- gridTrack: '88px',- renderCell: (entry) => (- <SettingsTableTextCell- text={entry.properties?.executionId?.slice(- 0,- EXECUTION_ID_DISPLAYED_LENGTH,- )}- />- ),- },+ LOG_CONSOLE_APPLICATION_LOG_APP_COLUMN,];diff --git a/packages/twenty-front/src/modules/log-console/constants/LogConsoleSources.tsx b/packages/twenty-front/src/modules/log-console/constants/LogConsoleSources.tsxindex 95e03c83401..88d5e67372e 100644--- a/packages/twenty-front/src/modules/log-console/constants/LogConsoleSources.tsx+++ b/packages/twenty-front/src/modules/log-console/constants/LogConsoleSources.tsx@@ -11,6 +11,7 @@ import { doNotTranslate } from 'twenty-shared/i18n';import {IconAddressBook,IconAlertTriangle,+ IconApps,IconArrowUpRight,IconBox,IconBrandTypescript,@@ -34,6 +35,7 @@ import { LogConsoleMemberChip } from '@/log-console/components/LogConsoleMemberCimport { LogConsoleRecordChangeDetail } from '@/log-console/components/LogConsoleRecordChangeDetail';import { LogConsoleWebhookEndpointLink } from '@/log-console/components/LogConsoleWebhookEndpointLink';import { LOG_CONSOLE_ACTOR_FILTER_FIELD } from '@/log-console/constants/LogConsoleActorFilterField';+import { LOG_CONSOLE_APPLICATION_LOG_APP_COLUMN } from '@/log-console/constants/LogConsoleApplicationLogAppColumn';import { LOG_CONSOLE_APPLICATION_LOG_COLUMNS } from '@/log-console/constants/LogConsoleApplicationLogColumns';import { LOG_CONSOLE_APPLICATION_LOG_FILTER_FIELDS } from '@/log-console/constants/LogConsoleApplicationLogFilterFields';import { LOG_CONSOLE_LEVELS } from '@/log-console/constants/LogConsoleLevels';@@ -190,6 +192,12 @@ export const LOG_CONSOLE_SOURCES: LogConsoleSource[] = [},},TIME_DETAIL_FIELD,+ {+ label: msg`App`,+ Icon: IconApps,+ renderValue: (entry) =>+ LOG_CONSOLE_APPLICATION_LOG_APP_COLUMN.renderCell(entry),+ },],idFields: [{diff --git a/packages/twenty-front/src/testing/mock-data/event-logs.ts b/packages/twenty-front/src/testing/mock-data/event-logs.tsindex 40f47176382..9c68d1377a8 100644--- a/packages/twenty-front/src/testing/mock-data/event-logs.ts+++ b/packages/twenty-front/src/testing/mock-data/event-logs.ts@@ -52,6 +52,20 @@ export const mockedEventLogApplications: Pick<export const mockedEventLogInstalledApplications: CurrentWorkspace['installedApplications'] =[+ {+ id: SYNC_STRIPE_INVOICES.applicationId,+ name: 'Stripe Sync',+ universalIdentifier: '91815f31-dfc4-467e-8c3f-b1ff8e474375',+ logoUrl: null,+ createdAt: '2026-09-01T00:00:00.000Z',+ },+ {+ id: SCORE_INBOUND_LEAD.applicationId,+ name: 'Lead Scoring',+ universalIdentifier: '86eae777-f251-4ca7-94cd-f7c3319329c1',+ logoUrl: null,+ createdAt: '2026-09-01T00:00:00.000Z',+ },{id: ENRICH_COMPANY_FROM_DOMAIN.applicationId,name: 'Company Enrichment',