File tree Expand file tree Collapse file tree
content-gen/src/app/frontend/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -457,9 +457,11 @@ function App() {
457457 setSelectedProducts ( prev => {
458458 const isSelected = prev . some ( p => ( p . sku || p . product_name ) === ( product . sku || product . product_name ) ) ;
459459 if ( isSelected ) {
460- return prev . filter ( p => ( p . sku || p . product_name ) !== ( product . sku || product . product_name ) ) ;
460+ // Deselect - but user must have at least one selected to proceed
461+ return [ ] ;
461462 } else {
462- return [ ...prev , product ] ;
463+ // Single selection mode - replace any existing selection
464+ return [ product ] ;
463465 }
464466 } ) ;
465467 } , [ ] ) ;
@@ -670,6 +672,7 @@ function App() {
670672 onSelectConversation = { handleSelectConversation }
671673 onNewConversation = { handleNewConversation }
672674 refreshTrigger = { historyRefreshTrigger }
675+ isGenerating = { isLoading }
673676 />
674677 </ div >
675678 ) }
Original file line number Diff line number Diff line change @@ -26,14 +26,16 @@ interface ChatHistoryProps {
2626 onSelectConversation : ( conversationId : string ) => void ;
2727 onNewConversation : ( ) => void ;
2828 refreshTrigger ?: number ; // Increment to trigger refresh
29+ isGenerating ?: boolean ; // True when content generation is in progress
2930}
3031
3132export function ChatHistory ( {
3233 currentConversationId,
3334 currentMessages = [ ] ,
3435 onSelectConversation,
3536 onNewConversation,
36- refreshTrigger = 0
37+ refreshTrigger = 0 ,
38+ isGenerating = false
3739} : ChatHistoryProps ) {
3840 const [ conversations , setConversations ] = useState < ConversationSummary [ ] > ( [ ] ) ;
3941 const [ isLoading , setIsLoading ] = useState ( true ) ;
@@ -218,13 +220,15 @@ export function ChatHistory({
218220 </ Link >
219221 ) }
220222 < Link
221- onClick = { onNewConversation }
223+ onClick = { isGenerating ? undefined : onNewConversation }
222224 style = { {
223225 display : 'flex' ,
224226 alignItems : 'center' ,
225227 gap : '8px' ,
226228 fontSize : '13px' ,
227- color : tokens . colorNeutralForeground1 ,
229+ color : isGenerating ? tokens . colorNeutralForegroundDisabled : tokens . colorNeutralForeground1 ,
230+ cursor : isGenerating ? 'not-allowed' : 'pointer' ,
231+ pointerEvents : isGenerating ? 'none' : 'auto' ,
228232 } }
229233 >
230234 < Compose20Regular />
Original file line number Diff line number Diff line change @@ -383,30 +383,6 @@ export function InlineContentPreview({
383383 </ div >
384384 ) }
385385
386- { /* Action Chip - for quick follow-up requests */ }
387- { image_content ?. image_url && (
388- < div
389- className = "action-chip"
390- onClick = { ( ) => onActionChipClick ?.( 'Create an other image with same paint color, but a modern kitchen area, with no text on it' ) }
391- style = { {
392- display : 'inline-flex' ,
393- alignItems : 'center' ,
394- gap : '6px' ,
395- padding : '10px 16px' ,
396- borderRadius : '20px' ,
397- backgroundColor : tokens . colorBrandBackground2 ,
398- color : tokens . colorBrandForeground1 ,
399- fontSize : '13px' ,
400- cursor : 'pointer' ,
401- border : `1px solid ${ tokens . colorBrandStroke1 } ` ,
402- transition : 'all 0.15s ease-in-out' ,
403- marginBottom : '16px' ,
404- } }
405- >
406- Create an other image with same paint color, but a modern kitchen area, with no text on it
407- </ div >
408- ) }
409-
410386 < Divider style = { { margin : '16px 0' } } />
411387
412388 { /* User guidance callout for compliance status */ }
Original file line number Diff line number Diff line change @@ -97,11 +97,16 @@ export function ProductReview({
9797 appearance = "primary"
9898 icon = { < Sparkle20Regular /> }
9999 onClick = { onConfirm }
100- disabled = { isAwaitingResponse }
100+ disabled = { isAwaitingResponse || products . length === 0 }
101101 size = "small"
102102 >
103103 Generate Content
104104 </ Button >
105+ { products . length === 0 && (
106+ < Text size = { 200 } style = { { color : tokens . colorNeutralForeground3 , alignSelf : 'center' } } >
107+ Select a product to continue
108+ </ Text >
109+ ) }
105110 </ div >
106111 ) }
107112
You can’t perform that action at this time.
0 commit comments