@@ -4739,6 +4739,10 @@ impl AIBlock {
47394739
47404740 if !cards. is_empty ( ) {
47414741 self . has_imported_comments = true ;
4742+ let conversation_id = self . client_ids . conversation_id ;
4743+ BlocklistAIHistoryModel :: handle ( ctx) . update ( ctx, |model, _| {
4744+ model. mark_conversation_has_imported_comments ( conversation_id) ;
4745+ } ) ;
47424746 }
47434747
47444748 self . imported_comments . insert (
@@ -5738,15 +5742,18 @@ impl AIBlock {
57385742 /// bulk "Open all in code review" button based on whether the current working
57395743 /// directory is still within the imported comments' repository.
57405744 fn update_imported_comments_disabled_state ( & mut self , ctx : & mut ViewContext < Self > ) {
5741- let cwd_location = self . current_working_directory_location ( ctx) ;
5742-
57435745 if self . has_imported_comments {
5746+ let cwd_location = self . current_working_directory_location ( ctx) ;
57445747 self . update_own_imported_comments_disabled_state ( cwd_location. as_ref ( ) , ctx) ;
5745- } else if self . model . is_latest_visible_exchange_in_root_task ( ctx) {
5748+ } else if BlocklistAIHistoryModel :: as_ref ( ctx)
5749+ . conversation_has_imported_comments ( & self . client_ids . conversation_id )
5750+ && self . model . is_latest_visible_exchange_in_root_task ( ctx)
5751+ {
57465752 // The "Open all" button is rendered by the latest visible exchange when the
57475753 // current thread has imported comments but this block does not own them directly.
57485754 // Update that block's button state from its CWD so the button disables when the
57495755 // user navigates outside the imported comments' repository.
5756+ let cwd_location = self . current_working_directory_location ( ctx) ;
57505757 self . update_open_all_button_disabled_state ( cwd_location. as_ref ( ) , ctx) ;
57515758 } else {
57525759 return ;
0 commit comments