@@ -19,7 +19,7 @@ type Props = {
1919 on_change : ( task : Task ) => void
2020 on_add : ( ) => void
2121 on_add_subtask ?: ( parent_task : Task ) => void
22- on_copy : ( text : string ) => void
22+ on_forward : ( text : string ) => void
2323 on_delete : ( created_at : number ) => void
2424}
2525
@@ -55,9 +55,6 @@ export const Tasks: React.FC<Props> = (props) => {
5555 const [ editing_timestamp , set_editing_timestamp ] = useState < number | null > (
5656 null
5757 )
58- const [ last_copied_timestamp , set_last_copied_timestamp ] = useState <
59- number | null
60- > ( null )
6158 const prevent_edit_ref = useRef ( false )
6259
6360 use_auto_focus_new_task ( props . tasks , set_editing_timestamp )
@@ -67,12 +64,6 @@ export const Tasks: React.FC<Props> = (props) => {
6764 [ props . tasks ]
6865 )
6966
70- // Reset copied highlight only on structural changes to tasks
71- // so it stays highlighted when set as done by response preview.
72- useEffect ( ( ) => {
73- set_last_copied_timestamp ( null )
74- } , [ structure_signature ] )
75-
7667 const tree = useMemo ( ( ) => add_ids ( props . tasks ) , [ props . tasks ] )
7768
7869 const handle_tree_reorder = ( new_tree : SortableTask [ ] ) => {
@@ -90,7 +81,6 @@ export const Tasks: React.FC<Props> = (props) => {
9081 depth : number
9182 } ) => {
9283 const is_editing = editing_timestamp == params . task . created_at
93- const is_copied = last_copied_timestamp == params . task . created_at
9484 const has_children = params . task . children && params . task . children . length > 0
9585
9686 const checked_children_count = has_children
@@ -99,9 +89,7 @@ export const Tasks: React.FC<Props> = (props) => {
9989
10090 return (
10191 < div
102- className = { cn ( styles . item , {
103- [ styles [ 'item--copied' ] ] : is_copied
104- } ) }
92+ className = { styles . item }
10593 style = { { paddingLeft : `${ 10 + params . depth * 20 } px` } }
10694 >
10795 { [ ...Array ( params . depth ) ] . map ( ( _ , i ) => (
@@ -168,13 +156,12 @@ export const Tasks: React.FC<Props> = (props) => {
168156 >
169157 { params . task . text && (
170158 < IconButton
171- codicon_icon = "copy "
159+ codicon_icon = "forward "
172160 on_click = { ( e ) => {
173161 e . stopPropagation ( )
174- props . on_copy ( params . task . text )
175- set_last_copied_timestamp ( params . task . created_at )
162+ props . on_forward ( params . task . text )
176163 } }
177- title = "Copy Task "
164+ title = "Use "
178165 />
179166 ) }
180167 < IconButton
@@ -187,15 +174,15 @@ export const Tasks: React.FC<Props> = (props) => {
187174 is_editing ? null : params . task . created_at
188175 )
189176 }
190- title = { is_editing ? 'Save task ' : 'Edit task ' }
177+ title = { is_editing ? 'Done ' : 'Edit' }
191178 />
192179 < IconButton
193180 codicon_icon = "trash"
194181 on_click = { ( e ) => {
195182 e . stopPropagation ( )
196183 props . on_delete ( params . task . created_at )
197184 } }
198- title = "Delete task "
185+ title = "Delete"
199186 />
200187 </ div >
201188 </ div >
0 commit comments