@@ -13,7 +13,7 @@ import {replaceHeadersWithBold} from 'sentry/components/events/autofix/autofixRo
13
13
import type { AutofixInsight } from 'sentry/components/events/autofix/types' ;
14
14
import { makeAutofixQueryKey } from 'sentry/components/events/autofix/useAutofix' ;
15
15
import { useTypingAnimation } from 'sentry/components/events/autofix/useTypingAnimation' ;
16
- import { IconChevron , IconClose , IconRefresh } from 'sentry/icons' ;
16
+ import { IconChevron , IconClose } from 'sentry/icons' ;
17
17
import { t , tn } from 'sentry/locale' ;
18
18
import { space } from 'sentry/styles/space' ;
19
19
import { singleLineRenderer } from 'sentry/utils/marked/marked' ;
@@ -145,6 +145,8 @@ function AutofixInsightCard({
145
145
if ( e . key === 'Enter' && ! e . shiftKey ) {
146
146
e . preventDefault ( ) ;
147
147
handleSubmit ( e ) ;
148
+ } else if ( e . key === 'Escape' ) {
149
+ handleCancel ( ) ;
148
150
}
149
151
} }
150
152
/>
@@ -162,10 +164,10 @@ function AutofixInsightCard({
162
164
type = "submit"
163
165
priority = "primary"
164
166
size = "sm"
165
- title = { t ( 'Rethink the answer ' ) }
166
- aria-label = { t ( 'Rethink the answer ' ) }
167
+ title = { t ( 'Restart work from here ' ) }
168
+ aria-label = { t ( 'Restart work from here ' ) }
167
169
>
168
- < IconRefresh size = "sm" />
170
+ { '\u23CE' }
169
171
</ Button >
170
172
</ ButtonBar >
171
173
</ EditFormRow >
@@ -208,7 +210,7 @@ function AutofixInsightCard({
208
210
size = "zero"
209
211
borderless
210
212
onClick = { handleEdit }
211
- icon = { < IconRefresh size = "xs" /> }
213
+ icon = { < FlippedReturnIcon /> }
212
214
aria-label = { t ( 'Edit insight' ) }
213
215
title = { t ( 'Rethink the answer from here' ) }
214
216
/>
@@ -372,6 +374,8 @@ function CollapsibleChainLink({
372
374
if ( e . key === 'Enter' && ! e . shiftKey ) {
373
375
e . preventDefault ( ) ;
374
376
handleSubmit ( e ) ;
377
+ } else if ( e . key === 'Escape' ) {
378
+ handleCancel ( ) ;
375
379
}
376
380
} }
377
381
/>
@@ -388,10 +392,10 @@ function CollapsibleChainLink({
388
392
type = "submit"
389
393
priority = "primary"
390
394
size = "sm"
391
- title = { t ( 'Rethink the answer ' ) }
392
- aria-label = { t ( 'Rethink the answer ' ) }
395
+ title = { t ( 'Restart work from here ' ) }
396
+ aria-label = { t ( 'Restart work from here ' ) }
393
397
>
394
- < IconRefresh size = "sm" />
398
+ { '\u23CE' }
395
399
</ Button >
396
400
</ ButtonBar >
397
401
</ EditFormRow >
@@ -402,10 +406,12 @@ function CollapsibleChainLink({
402
406
size = "zero"
403
407
borderless
404
408
onClick = { ( ) => setIsAdding ( true ) }
405
- icon = { < IconRefresh size = "sm" /> }
406
409
title = { t ( 'Give feedback and rethink the answer' ) }
407
410
aria-label = { t ( 'Give feedback and rethink the answer' ) }
408
- />
411
+ >
412
+ < RethinkLabel > { t ( 'Rethink this answer' ) } </ RethinkLabel >
413
+ < FlippedReturnIcon />
414
+ </ AddButton >
409
415
) ) }
410
416
</ RethinkButtonContainer >
411
417
</ VerticalLineContainer >
@@ -819,4 +825,21 @@ const AddButton = styled(Button)`
819
825
}
820
826
` ;
821
827
828
+ function FlippedReturnIcon ( props : React . HTMLAttributes < HTMLSpanElement > ) {
829
+ return < CheckpointIcon { ...props } > { '\u21A9' } </ CheckpointIcon > ;
830
+ }
831
+
822
832
export default AutofixInsightCards ;
833
+
834
+ const CheckpointIcon = styled ( 'span' ) `
835
+ transform: scaleY(-1);
836
+ margin-bottom: ${ space ( 0.5 ) } ;
837
+ ` ;
838
+
839
+ const RethinkLabel = styled ( 'span' ) `
840
+ display: flex;
841
+ align-items: center;
842
+ font-size: ${ p => p . theme . fontSizeSmall } ;
843
+ color: ${ p => p . theme . subText } ;
844
+ margin-right: ${ space ( 0.5 ) } ;
845
+ ` ;
0 commit comments