Tray-Start ohne Pool oeffnet die Pool-Auswahl

Ein Projekt ohne zugewiesenen Pool liefert jetzt den Fehler NO_POOL,
statt still claudes Default-CLAUDE_CONFIG_DIR zu uebernehmen. Der
Tray-/Popup-Start faengt ihn ab, holt das Hauptfenster nach vorn und
oeffnet die Pool-Auswahl (pool-required-Event, ProjectList), mit Tests.
This commit is contained in:
marcus.hinz
2026-07-26 21:01:41 +02:00
parent b0a9e9a783
commit 082422c32a
5 changed files with 145 additions and 4 deletions
+4
View File
@@ -38,6 +38,10 @@ pub fn open_terminal(app: AppHandle, project: String) -> Result<(), String> {
if !dir.is_dir() {
return Err(format!("Projektordner fehlt: {}", dir.display()));
}
// Pool-Pflicht vor dem Fenster: Ohne zugewiesenen Pool gibt es kein
// Terminal. Die Prüfung gehört hierher und nicht erst in `term_start` —
// dort stünde bereits ein Fenster, das nur noch scheitern könnte.
project_pool_dir(&project)?;
let bundle_id = app.config().identifier.clone();
app
.run_on_main_thread(move || crate::platform::yield_activation(&bundle_id))