fix(tui): retain per-instance Java labels across switches
Cache completed and in-flight Java inspections by instance and execution context, refresh changed executables and settings, and cover cached rendering and configuration changes. Remove instance names from Overview activity labels.
This commit is contained in:
1 parent
f5068d09d2
commit
ce0bb34401
10 files changed
+266
-62
No files matched your search
@@ -145,7 +145,7 @@ async fn reconcile(job: ReconcileJob, task: &ProgressTask) -> ReconcileResult {
|
||||
} = job;
|
||||
let instance_name = instance.name;
|
||||
let instance_created = instance.created;
|
||||
task.set_action(format!("Checking content for {instance_name}"));
|
||||
task.set_action("Checking content");
|
||||
task.set_sub_action("Reading saved content index");
|
||||
task.set_progress(0, 1);
|
||||
let paths = InstancePaths::new(instances_dir.join(&instance_name));
|
||||
@@ -178,7 +178,7 @@ async fn reconcile(job: ReconcileJob, task: &ProgressTask) -> ReconcileResult {
|
||||
Ok(())
|
||||
} else {
|
||||
let registry = ProviderRegistry::configured(client);
|
||||
task.set_action(format!("Identifying content for {instance_name}"));
|
||||
task.set_action("Identifying content");
|
||||
resolve_queries(
|
||||
®istry,
|
||||
&inventory.queries,
|
||||
@@ -187,7 +187,7 @@ async fn reconcile(job: ReconcileJob, task: &ProgressTask) -> ReconcileResult {
|
||||
)
|
||||
.await
|
||||
};
|
||||
task.set_action(format!("Saving content index for {instance_name}"));
|
||||
task.set_action("Saving content index");
|
||||
task.set_sub_action("Validating content files");
|
||||
task.set_progress(0, inventory.manifest.files.len() as u64);
|
||||
let save_progress = task.handle();
|
||||
|
||||
@@ -250,10 +250,7 @@ pub(super) async fn scan_with_registry(
|
||||
return snapshot;
|
||||
}
|
||||
let total = projects.len() as u64;
|
||||
let progress = crate::feedback::progress::ProgressTask::start(format!(
|
||||
"Checking content updates for {}",
|
||||
instance.name
|
||||
));
|
||||
let progress = crate::feedback::progress::ProgressTask::start("Checking content updates");
|
||||
progress.set_progress(0, total);
|
||||
let mut completed = 0;
|
||||
let mut projects = projects.into_iter();
|
||||
|
||||
@@ -178,7 +178,7 @@ pub async fn execute_import(
|
||||
);
|
||||
let name = unique_instance_name(&summary.name, &manager.instances_dir)
|
||||
.inspect_err(|_| crate::feedback::progress::clear())?;
|
||||
crate::feedback::progress::set_action(format!("Importing '{name}'..."));
|
||||
crate::feedback::progress::set_action("Importing instance...");
|
||||
crate::feedback::progress::set_sub_action(format!(
|
||||
"{} {}",
|
||||
summary.game_version, summary.loader
|
||||
|
||||
@@ -315,10 +315,7 @@ impl InstanceManager {
|
||||
&minecraft_dir,
|
||||
&environment,
|
||||
);
|
||||
let task = crate::feedback::progress::ProgressTask::start(format!(
|
||||
"Rebuilding runtime for '{}'",
|
||||
config.name
|
||||
));
|
||||
let task = crate::feedback::progress::ProgressTask::start("Rebuilding runtime");
|
||||
task.set_sub_action(format!("Minecraft {}", config.game_version));
|
||||
let metadata_paths = crate::storage::MetadataPaths::new(&self.meta_dir);
|
||||
for directory in [
|
||||
|
||||
@@ -556,6 +556,8 @@ fn update_checks_prioritize_list_rows_and_publish_before_the_rest_finish() {
|
||||
let overview = terminal.backend().to_string();
|
||||
assert!(overview.contains("8%"));
|
||||
assert!(overview.contains("1/12 item(s) checked"));
|
||||
assert!(overview.contains("Checking content updates"));
|
||||
assert!(!overview.contains(&instance().name));
|
||||
for pause in pauses.values() {
|
||||
pause.add_permits(1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user