From 964dcb857f36743bc4bcb8ee395da262592b7945 Mon Sep 17 00:00:00 2001 From: Siarhei Simanovich Date: Fri, 13 Feb 2026 11:45:14 +0100 Subject: [PATCH] fix(audit): show column title in hint sidebar title (Issue #2109) --- .../src/constants/grid-columns/configs.ts | 26 ++++++++++--------- .../constants/grid-columns/grid-columns.tsx | 6 ++--- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/apps/ai-dial-admin/src/constants/grid-columns/configs.ts b/apps/ai-dial-admin/src/constants/grid-columns/configs.ts index 1fe12cb01..aea900567 100644 --- a/apps/ai-dial-admin/src/constants/grid-columns/configs.ts +++ b/apps/ai-dial-admin/src/constants/grid-columns/configs.ts @@ -22,17 +22,19 @@ export const numericColumn: Partial = { filterValueGetter: (params) => numberValueFormatter(params.data[params.colDef.field || '']), }; -export const priceColumn: Partial = { - ...numericColumn, - headerComponentParams: { - innerHeaderComponent: HeaderWithHintButton, - innerHeaderComponentParams: { - hintText: - 'The calculated price is an approximation. Since different models, applications, and configurations may have varying token usage and processing costs, it’s not possible to determine the exact final price in advance. \n' + - 'The estimate gives you a general idea of expected costs, but the actual price may differ depending on how the chat unfolds (e.g., message length, complexity, model type, or additional features used).', - hintTitle: 'Total Price', +export const priceColumn = (title: string): Partial => { + return { + ...numericColumn, + headerComponentParams: { + innerHeaderComponent: HeaderWithHintButton, + innerHeaderComponentParams: { + hintText: + 'The calculated price is an approximation. Since different models, applications, and configurations may have varying token usage and processing costs, it’s not possible to determine the exact final price in advance. \n' + + 'The estimate gives you a general idea of expected costs, but the actual price may differ depending on how the chat unfolds (e.g., message length, complexity, model type, or additional features used).', + hintTitle: title, + }, }, - }, - valueFormatter: ({ value }) => `$${priceValueFormatter(value)}`, - filterValueGetter: (params) => priceValueFormatter(params.data[params.colDef.field || '']), + valueFormatter: ({ value }) => `$${priceValueFormatter(value)}`, + filterValueGetter: (params) => priceValueFormatter(params.data[params.colDef.field || '']), + }; }; diff --git a/apps/ai-dial-admin/src/constants/grid-columns/grid-columns.tsx b/apps/ai-dial-admin/src/constants/grid-columns/grid-columns.tsx index f0f6667c6..5c8f998fa 100644 --- a/apps/ai-dial-admin/src/constants/grid-columns/grid-columns.tsx +++ b/apps/ai-dial-admin/src/constants/grid-columns/grid-columns.tsx @@ -362,13 +362,13 @@ export const USAGE_LOG_TRACES_COLUMNS: ColDef[] = [ headerName: 'Deployment Price', minWidth: 180, hide: false, - ...priceColumn, + ...priceColumn('Deployment Price'), }, { field: 'price', headerName: 'Total Price', hide: false, - ...priceColumn, + ...priceColumn('Total Price'), }, { field: 'number_request_messages', @@ -418,7 +418,7 @@ export const USAGE_LOG_CONVERSATIONS_COLUMNS: ColDef[] = [ field: 'deployment_price', headerName: 'Total Price', hide: false, - ...priceColumn, + ...priceColumn('Total Price'), }, { field: 'number_request_messages',