diff --git a/client/src/ui/handlers/ui.rs b/client/src/ui/handlers/ui.rs index 5b206c8..73fac6d 100644 --- a/client/src/ui/handlers/ui.rs +++ b/client/src/ui/handlers/ui.rs @@ -320,7 +320,12 @@ pub async fn run_ui() -> Result<()> { match grpc_client.get_table_structure(prof_name.clone(), tbl_name.clone()).await { Ok(structure_response) => { let new_columns: Vec = structure_response.columns.iter().map(|c| c.name.clone()).collect(); - form_state = FormState::new(prof_name.clone(), tbl_name.clone(), new_columns); + + // --- START FIX --- + // Apply the same filtering logic here that is used on initial load. + let filtered_columns = filter_user_columns(new_columns); + form_state = FormState::new(prof_name.clone(), tbl_name.clone(), filtered_columns); + // --- END FIX --- if let Err(e) = UiService::fetch_and_set_table_count(&mut grpc_client, &mut form_state).await { app_state.update_dialog_content(&format!("Error fetching count: {}", e), vec!["OK".to_string()], DialogPurpose::LoginFailed);