@@ -67,41 +67,43 @@ export function TerminalContextSheet(props: {
6767 Tap the first and last line to select a range.
6868 </ Text >
6969 < View className = "overflow-hidden rounded-xl bg-card-alt" >
70- { lines . map ( ( line , index ) => (
71- < Pressable
72- key = { index }
73- accessibilityRole = "button"
74- accessibilityLabel = { `Line ${ index + 1 } : ${ line } ` }
75- accessibilityState = { { selected : index >= range . start && index <= range . end } }
76- onPress = { ( ) => {
77- if ( anchor === null ) {
78- setAnchor ( index ) ;
79- setRange ( { start : index , end : index } ) ;
80- } else {
81- setRange ( { start : Math . min ( anchor , index ) , end : Math . max ( anchor , index ) } ) ;
82- setAnchor ( null ) ;
70+ { lines . map (
71+ ( line , index ) => (
72+ /* oxlint-disable react/no-array-index-key -- Selection is addressed by line number in this captured terminal snapshot. */ < Pressable
73+ key = { index }
74+ accessibilityRole = "button"
75+ accessibilityLabel = { `Line ${ index + 1 } : ${ line } ` }
76+ accessibilityState = { { selected : index >= range . start && index <= range . end } }
77+ onPress = { ( ) => {
78+ if ( anchor === null ) {
79+ setAnchor ( index ) ;
80+ setRange ( { start : index , end : index } ) ;
81+ } else {
82+ setRange ( { start : Math . min ( anchor , index ) , end : Math . max ( anchor , index ) } ) ;
83+ setAnchor ( null ) ;
84+ }
85+ } }
86+ className = {
87+ index >= range . start && index <= range . end
88+ ? "flex-row gap-3 bg-primary/10 px-3 py-2"
89+ : "flex-row gap-3 px-3 py-2"
8390 }
84- } }
85- className = {
86- index >= range . start && index <= range . end
87- ? "flex-row gap-3 bg-primary/10 px-3 py-2"
88- : "flex-row gap-3 px-3 py-2"
89- }
90- >
91- < Text
92- className = "w-8 text-right text-sm text-foreground-muted"
93- style = { { fontFamily : REVIEW_MONO_FONT_FAMILY } }
9491 >
95- { index + 1 }
96- </ Text >
97- < Text
98- className = "flex-1 text-sm text-foreground"
99- style = { { fontFamily : REVIEW_MONO_FONT_FAMILY } }
100- >
101- { line || " " }
102- </ Text >
103- </ Pressable >
104- ) ) }
92+ < Text
93+ className = "w-8 text-right text-sm text-foreground-muted"
94+ style = { { fontFamily : REVIEW_MONO_FONT_FAMILY } }
95+ >
96+ { index + 1 }
97+ </ Text >
98+ < Text
99+ className = "flex-1 text-sm text-foreground"
100+ style = { { fontFamily : REVIEW_MONO_FONT_FAMILY } }
101+ >
102+ { line || " " }
103+ </ Text >
104+ </ Pressable >
105+ ) /* oxlint-enable react/no-array-index-key */ ,
106+ ) }
105107 </ View >
106108 </ ScrollView >
107109 < View
0 commit comments