diff --git a/frontend/src/config/pages/clusters.config.tsx b/frontend/src/config/pages/clusters.config.tsx index e2859131..cc00b416 100644 --- a/frontend/src/config/pages/clusters.config.tsx +++ b/frontend/src/config/pages/clusters.config.tsx @@ -19,6 +19,7 @@ import { Cluster } from '../../services/api'; import Input from '../../components/form/input/InputField'; import Label from '../../components/form/Label'; import Button from '../../components/ui/button/Button'; +import { BoltIcon } from '../../icons'; export interface ColumnConfig { key: string; @@ -93,6 +94,7 @@ export const createClustersPageConfig = ( volumeDropdownRef: React.RefObject; setCurrentPage: (page: number) => void; loadClusters: () => Promise; + onGenerateIdeas?: (clusterId: number) => void; // Handler for generate ideas button } ): ClustersPageConfig => { const showSectorColumn = !handlers.activeSector; // Show when viewing all sectors @@ -129,6 +131,7 @@ export const createClustersPageConfig = ( sortable: true, sortField: 'keywords_count', width: '120px', + align: 'center' as const, render: (value: number) => value.toLocaleString(), }, { @@ -137,6 +140,7 @@ export const createClustersPageConfig = ( sortable: false, // Backend doesn't support sorting by ideas_count sortField: 'ideas_count', width: '120px', + align: 'center' as const, render: (value: number) => ( 0 ? 'success' : 'light'} @@ -155,6 +159,7 @@ export const createClustersPageConfig = ( sortable: true, sortField: 'volume', width: '120px', + align: 'center' as const, render: (value: number) => value.toLocaleString(), }, { @@ -193,6 +198,7 @@ export const createClustersPageConfig = ( sortable: false, // Backend doesn't support sorting by content_count sortField: 'content_count', width: '120px', + align: 'center' as const, render: (value: number) => value.toLocaleString(), }, { @@ -244,6 +250,32 @@ export const createClustersPageConfig = ( defaultVisible: false, render: (value: string) => formatRelativeDate(value), }, + // Generate Ideas action column - only shows button for status = 'new' + { + key: 'generate_action', + label: 'Actions', + sortable: false, + width: '120px', + render: (_value: any, row: Cluster) => { + // Only show generate button for clusters with status 'new' + if (row.status === 'new' && handlers.onGenerateIdeas) { + return ( + + ); + } + return -; + }, + }, ], filters: [ { diff --git a/frontend/src/config/pages/content.config.tsx b/frontend/src/config/pages/content.config.tsx index 0dbb0db0..3dab87f3 100644 --- a/frontend/src/config/pages/content.config.tsx +++ b/frontend/src/config/pages/content.config.tsx @@ -296,7 +296,7 @@ export const createContentPageConfig = ( sortable: true, sortField: 'word_count', width: '100px', - align: 'right', + align: 'center' as const, render: (value: number) => ( {value?.toLocaleString() || 0} diff --git a/frontend/src/config/pages/ideas.config.tsx b/frontend/src/config/pages/ideas.config.tsx index 2a8cc2e2..fcf4a272 100644 --- a/frontend/src/config/pages/ideas.config.tsx +++ b/frontend/src/config/pages/ideas.config.tsx @@ -203,6 +203,7 @@ export const createIdeasPageConfig = ( sortable: true, sortField: 'estimated_word_count', width: '100px', + align: 'center' as const, render: (value: number) => value.toLocaleString(), }, { diff --git a/frontend/src/config/pages/keywords.config.tsx b/frontend/src/config/pages/keywords.config.tsx index da9ecbc1..014b7afb 100644 --- a/frontend/src/config/pages/keywords.config.tsx +++ b/frontend/src/config/pages/keywords.config.tsx @@ -160,6 +160,7 @@ export const createKeywordsPageConfig = ( ...volumeColumn, sortable: true, sortField: 'seed_keyword__volume', // Backend expects seed_keyword__volume + align: 'center' as const, render: (value: number) => value.toLocaleString(), }, { @@ -200,6 +201,7 @@ export const createKeywordsPageConfig = ( ...countryColumn, sortable: false, // Backend doesn't support sorting by country sortField: 'seed_keyword__country', + align: 'center' as const, render: (value: string) => { const countryNames: Record = { 'US': 'United States', diff --git a/frontend/src/config/pages/table-actions.config.tsx b/frontend/src/config/pages/table-actions.config.tsx index 288352c5..63a33fd6 100644 --- a/frontend/src/config/pages/table-actions.config.tsx +++ b/frontend/src/config/pages/table-actions.config.tsx @@ -155,12 +155,7 @@ const tableActionsConfigs: Record = { icon: EditIcon, variant: 'primary', }, - { - key: 'generate_ideas', - label: 'Generate Ideas', - icon: , - variant: 'primary', - }, + // Generate Ideas moved to dedicated column - only shows for status='new' ], bulkActions: [ { @@ -175,12 +170,7 @@ const tableActionsConfigs: Record = { icon: , variant: 'secondary', }, - { - key: 'auto_generate_ideas', - label: 'Generate Ideas', - icon: , - variant: 'secondary', - }, + // Removed auto_generate_ideas - now row-level only ], }, '/planner/ideas': { diff --git a/frontend/src/config/pages/tasks.config.tsx b/frontend/src/config/pages/tasks.config.tsx index 345c310d..b21c6310 100644 --- a/frontend/src/config/pages/tasks.config.tsx +++ b/frontend/src/config/pages/tasks.config.tsx @@ -215,6 +215,7 @@ export const createTasksPageConfig = ( ...wordCountColumn, sortable: true, sortField: 'word_count', + align: 'center' as const, render: (value: number | null | undefined) => (value != null ? value.toLocaleString() : '-'), }, { diff --git a/frontend/src/layout/AppSidebar.tsx b/frontend/src/layout/AppSidebar.tsx index f0c54f2c..de7e0927 100644 --- a/frontend/src/layout/AppSidebar.tsx +++ b/frontend/src/layout/AppSidebar.tsx @@ -452,16 +452,17 @@ const AppSidebar: React.FC = () => { onMouseEnter={() => !isExpanded && setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} > - {/* Collapse/Expand Toggle Button - Position changes based on state */} + {/* Collapse/Expand Toggle Button - Fixed 5px from sidebar edge, does not move with hover */} )} +