@@ -261,7 +261,6 @@ interface CollapsibleChainLinkProps {
261
261
groupId : string ;
262
262
runId : string ;
263
263
stepIndex : number ;
264
- alignment ?: 'start' | 'center' ;
265
264
insightCount ?: number ;
266
265
isCollapsed ?: boolean ;
267
266
isEmpty ?: boolean ;
@@ -280,7 +279,6 @@ function CollapsibleChainLink({
280
279
stepIndex,
281
280
groupId,
282
281
runId,
283
- alignment = 'center' ,
284
282
} : CollapsibleChainLinkProps ) {
285
283
const [ isAdding , setIsAdding ] = useState ( false ) ;
286
284
const [ newInsightText , setNewInsightText ] = useState ( '' ) ;
@@ -304,11 +302,8 @@ function CollapsibleChainLink({
304
302
} ;
305
303
306
304
return (
307
- < VerticalLineContainer isEmpty = { isEmpty } alignment = { alignment } >
308
- < RethinkButtonContainer
309
- className = "rethink-button-container"
310
- parentAlignment = { alignment }
311
- >
305
+ < VerticalLineContainer isEmpty = { isEmpty } >
306
+ < RethinkButtonContainer className = "rethink-button-container" >
312
307
{ showCollapseControl && onToggleCollapse && (
313
308
< CollapseButtonWrapper
314
309
onClick = { onToggleCollapse }
@@ -450,7 +445,6 @@ function AutofixInsightCards({
450
445
stepIndex = { stepIndex }
451
446
groupId = { groupId }
452
447
runId = { runId }
453
- alignment = "start"
454
448
/>
455
449
) }
456
450
< AnimatePresence >
@@ -489,13 +483,23 @@ function AutofixInsightCards({
489
483
runId = { runId }
490
484
insightCount = { validInsightCount }
491
485
showAddControl
492
- alignment = "start"
493
486
/>
494
487
) }
495
488
</ Fragment >
496
489
) : stepIndex === 0 && ! hasStepBelow ? (
497
490
< NoInsightsYet />
498
- ) : null }
491
+ ) : (
492
+ hasStepBelow && (
493
+ < CollapsibleChainLink
494
+ isEmpty = { false }
495
+ stepIndex = { stepIndex }
496
+ groupId = { groupId }
497
+ runId = { runId }
498
+ insightCount = { validInsightCount }
499
+ showAddControl
500
+ />
501
+ )
502
+ ) }
499
503
</ CardsColumn >
500
504
</ InsightsGridContainer >
501
505
) ;
@@ -621,7 +625,6 @@ const InsightContainer = styled(motion.div)<{expanded?: boolean}>`
621
625
` ;
622
626
623
627
const VerticalLineContainer = styled ( 'div' ) < {
624
- alignment ?: 'start' | 'center' ;
625
628
isEmpty ?: boolean ;
626
629
} > `
627
630
position: relative;
@@ -630,10 +633,6 @@ const VerticalLineContainer = styled('div')<{
630
633
display: flex;
631
634
padding: 0;
632
635
min-height: ${ p => ( p . isEmpty ? space ( 4 ) : 'auto' ) } ;
633
-
634
- .rethink-button-container {
635
- /* Styles are now primarily in RethinkButtonContainer itself */
636
- }
637
636
` ;
638
637
639
638
const VerticalLine = styled ( 'div' ) `
@@ -661,16 +660,15 @@ const CollapseButtonWrapper = styled('div')`
661
660
}
662
661
` ;
663
662
664
- const RethinkButtonContainer = styled ( 'div' ) < { parentAlignment ?: 'start' | 'center' } > `
663
+ const RethinkButtonContainer = styled ( 'div' ) `
665
664
position: relative;
666
665
display: flex;
667
- justify-content: ${ p => ( p . parentAlignment === 'start' ? ' flex-end' : 'center' ) } ;
666
+ justify-content: flex-end;
668
667
align-items: center;
669
- width: ${ p => ( p . parentAlignment === 'start' ? '100%' : 'max-content' ) } ;
670
- background: ${ p =>
671
- p . parentAlignment === 'center' ? p . theme . background : 'transparent' } ;
672
- border-radius: ${ p => ( p . parentAlignment === 'center' ? '50%' : '0' ) } ;
673
- padding: ${ p => ( p . parentAlignment === 'center' ? space ( 0.25 ) : '0' ) } ;
668
+ width: 100%;
669
+ background: ${ p => p . theme . background } ;
670
+ border-radius: 0;
671
+ padding: 0;
674
672
z-index: 1;
675
673
676
674
&:has(> ${ CollapseButtonWrapper } ) {
0 commit comments