@@ -271,109 +271,43 @@ export function AutofixChanges({
271
271
< AnimatePresence initial = { isChangesFirstAppearance } >
272
272
< AnimationWrapper key = "card" { ...cardAnimationProps } >
273
273
< ChangesContainer >
274
+ < HeaderWrapper >
275
+ < HeaderText >
276
+ < HeaderIconWrapper ref = { iconCodeRef } >
277
+ < IconCode size = "md" color = "blue400" />
278
+ </ HeaderIconWrapper >
279
+ { t ( 'Code Changes' ) }
280
+ < Button
281
+ size = "zero"
282
+ borderless
283
+ title = { t ( 'Chat with Seer' ) }
284
+ onClick = { handleSelectFirstChange }
285
+ analyticsEventName = "Autofix: Changes Chat"
286
+ analyticsEventKey = "autofix.changes.chat"
287
+ >
288
+ < IconChat />
289
+ </ Button >
290
+ </ HeaderText >
291
+ </ HeaderWrapper >
292
+ < AnimatePresence >
293
+ { agentCommentThread && iconCodeRef . current && (
294
+ < AutofixHighlightPopup
295
+ selectedText = ""
296
+ referenceElement = { iconCodeRef . current }
297
+ groupId = { groupId }
298
+ runId = { runId }
299
+ stepIndex = { previousDefaultStepIndex ?? 0 }
300
+ retainInsightCardIndex = {
301
+ previousInsightCount !== undefined && previousInsightCount >= 0
302
+ ? previousInsightCount
303
+ : null
304
+ }
305
+ isAgentComment
306
+ blockName = { t ( 'Seer is uncertain of the code changes...' ) }
307
+ />
308
+ ) }
309
+ </ AnimatePresence >
274
310
< ClippedBox clipHeight = { 408 } >
275
- < HeaderWrapper >
276
- < HeaderText >
277
- < HeaderIconWrapper ref = { iconCodeRef } >
278
- < IconCode size = "md" color = "blue400" />
279
- </ HeaderIconWrapper >
280
- { t ( 'Code Changes' ) }
281
- < Button
282
- size = "zero"
283
- borderless
284
- title = { t ( 'Chat with Seer' ) }
285
- onClick = { handleSelectFirstChange }
286
- analyticsEventName = "Autofix: Changes Chat"
287
- analyticsEventKey = "autofix.changes.chat"
288
- >
289
- < IconChat />
290
- </ Button >
291
- </ HeaderText >
292
- { ! prsMade && (
293
- < ButtonBar >
294
- { branchesMade ? (
295
- step . changes . length === 1 && step . changes [ 0 ] ? (
296
- < BranchButton change = { step . changes [ 0 ] } />
297
- ) : (
298
- < ScrollCarousel aria-label = { t ( 'Check out branches' ) } >
299
- { step . changes . map (
300
- change =>
301
- change . branch_name && (
302
- < BranchButton
303
- key = { `${ change . repo_external_id } -${ Math . random ( ) } ` }
304
- change = { change }
305
- />
306
- )
307
- ) }
308
- </ ScrollCarousel >
309
- )
310
- ) : (
311
- < SetupAndCreateBranchButton
312
- changes = { step . changes }
313
- groupId = { groupId }
314
- runId = { runId }
315
- isBusy = { isBusy || isPrProcessing }
316
- onProcessingChange = { setIsBranchProcessing }
317
- />
318
- ) }
319
- < SetupAndCreatePRsButton
320
- changes = { step . changes }
321
- groupId = { groupId }
322
- runId = { runId }
323
- isBusy = { isBusy || isBranchProcessing }
324
- onProcessingChange = { setIsPrProcessing }
325
- />
326
- </ ButtonBar >
327
- ) }
328
- { prsMade &&
329
- ( step . changes . length === 1 && step . changes [ 0 ] ?. pull_request ?. pr_url ? (
330
- < LinkButton
331
- size = "xs"
332
- priority = "primary"
333
- icon = { < IconOpen size = "xs" /> }
334
- href = { step . changes [ 0 ] . pull_request . pr_url }
335
- external
336
- >
337
- View PR in { step . changes [ 0 ] . repo_name }
338
- </ LinkButton >
339
- ) : (
340
- < ScrollCarousel aria-label = { t ( 'View pull requests' ) } >
341
- { step . changes . map (
342
- change =>
343
- change . pull_request ?. pr_url && (
344
- < LinkButton
345
- key = { `${ change . repo_external_id } -${ Math . random ( ) } ` }
346
- size = "xs"
347
- priority = "primary"
348
- icon = { < IconOpen size = "xs" /> }
349
- href = { change . pull_request . pr_url }
350
- external
351
- >
352
- View PR in { change . repo_name }
353
- </ LinkButton >
354
- )
355
- ) }
356
- </ ScrollCarousel >
357
- ) ) }
358
- </ HeaderWrapper >
359
- < AnimatePresence >
360
- { agentCommentThread && iconCodeRef . current && (
361
- < AutofixHighlightPopup
362
- selectedText = ""
363
- referenceElement = { iconCodeRef . current }
364
- groupId = { groupId }
365
- runId = { runId }
366
- stepIndex = { previousDefaultStepIndex ?? 0 }
367
- retainInsightCardIndex = {
368
- previousInsightCount !== undefined && previousInsightCount >= 0
369
- ? previousInsightCount
370
- : null
371
- }
372
- isAgentComment
373
- blockName = { t ( 'Seer is uncertain of the code changes...' ) }
374
- />
375
- ) }
376
- </ AnimatePresence >
377
311
{ step . changes . map ( ( change , i ) => (
378
312
< Fragment key = { change . repo_external_id } >
379
313
{ i > 0 && < Separator /> }
@@ -388,6 +322,75 @@ export function AutofixChanges({
388
322
</ Fragment >
389
323
) ) }
390
324
</ ClippedBox >
325
+ < BottomDivider />
326
+ < BottomButtonContainer >
327
+ { ! prsMade && (
328
+ < ButtonBar >
329
+ { branchesMade ? (
330
+ step . changes . length === 1 && step . changes [ 0 ] ? (
331
+ < BranchButton change = { step . changes [ 0 ] } />
332
+ ) : (
333
+ < ScrollCarousel aria-label = { t ( 'Check out branches' ) } >
334
+ { step . changes . map (
335
+ ( change , idx ) =>
336
+ change . branch_name && (
337
+ < BranchButton
338
+ key = { `${ change . repo_external_id } -${ idx } ` }
339
+ change = { change }
340
+ />
341
+ )
342
+ ) }
343
+ </ ScrollCarousel >
344
+ )
345
+ ) : (
346
+ < SetupAndCreateBranchButton
347
+ changes = { step . changes }
348
+ groupId = { groupId }
349
+ runId = { runId }
350
+ isBusy = { isBusy || isPrProcessing }
351
+ onProcessingChange = { setIsBranchProcessing }
352
+ />
353
+ ) }
354
+ < SetupAndCreatePRsButton
355
+ changes = { step . changes }
356
+ groupId = { groupId }
357
+ runId = { runId }
358
+ isBusy = { isBusy || isBranchProcessing }
359
+ onProcessingChange = { setIsPrProcessing }
360
+ />
361
+ </ ButtonBar >
362
+ ) }
363
+ { prsMade &&
364
+ ( step . changes . length === 1 && step . changes [ 0 ] ?. pull_request ?. pr_url ? (
365
+ < LinkButton
366
+ size = "xs"
367
+ priority = "primary"
368
+ icon = { < IconOpen size = "xs" /> }
369
+ href = { step . changes [ 0 ] . pull_request . pr_url }
370
+ external
371
+ >
372
+ View PR in { step . changes [ 0 ] . repo_name }
373
+ </ LinkButton >
374
+ ) : (
375
+ < ScrollCarousel aria-label = { t ( 'View pull requests' ) } >
376
+ { step . changes . map (
377
+ ( change , idx ) =>
378
+ change . pull_request ?. pr_url && (
379
+ < LinkButton
380
+ key = { `${ change . repo_external_id } -${ idx } ` }
381
+ size = "xs"
382
+ priority = "primary"
383
+ icon = { < IconOpen size = "xs" /> }
384
+ href = { change . pull_request . pr_url }
385
+ external
386
+ >
387
+ View PR in { change . repo_name }
388
+ </ LinkButton >
389
+ )
390
+ ) }
391
+ </ ScrollCarousel >
392
+ ) ) }
393
+ </ BottomButtonContainer >
391
394
</ ChangesContainer >
392
395
</ AnimationWrapper >
393
396
</ AnimatePresence >
@@ -411,8 +414,7 @@ const ChangesContainer = styled('div')`
411
414
border: 1px solid ${ p => p . theme . border } ;
412
415
border-radius: ${ p => p . theme . borderRadius } ;
413
416
box-shadow: ${ p => p . theme . dropShadowMedium } ;
414
- padding-left: ${ space ( 2 ) } ;
415
- padding-right: ${ space ( 2 ) } ;
417
+ padding: ${ p => p . theme . space . xl } ;
416
418
` ;
417
419
418
420
const Content = styled ( 'div' ) `
@@ -434,8 +436,6 @@ const PullRequestTitle = styled('div')`
434
436
` ;
435
437
436
438
const RepoChangesHeader = styled ( 'div' ) `
437
- padding-top: ${ space ( 2 ) } ;
438
- padding-bottom: 0;
439
439
display: grid;
440
440
align-items: center;
441
441
grid-template-columns: 1fr auto;
@@ -482,6 +482,17 @@ const HeaderIconWrapper = styled('div')`
482
482
justify-content: center;
483
483
` ;
484
484
485
+ const BottomDivider = styled ( 'div' ) `
486
+ border-top: 1px solid ${ p => p . theme . innerBorder } ;
487
+ margin-top: ${ p => p . theme . space . xl } ;
488
+ margin-bottom: ${ p => p . theme . space . xl } ;
489
+ ` ;
490
+
491
+ const BottomButtonContainer = styled ( 'div' ) `
492
+ display: flex;
493
+ justify-content: flex-end;
494
+ ` ;
495
+
485
496
function CreatePRsButton ( {
486
497
changes,
487
498
groupId,
@@ -641,7 +652,7 @@ function CreateBranchButton({
641
652
analyticsEventKey = "autofix.push_to_branch_clicked"
642
653
analyticsParams = { { group_id : groupId } }
643
654
>
644
- Check Out Locally
655
+ { t ( ' Check Out Locally' ) }
645
656
</ Button >
646
657
) ;
647
658
}
0 commit comments