From 62dd39347a6516ab486222b9c5936ef048ee1ed8 Mon Sep 17 00:00:00 2001 From: Stu Leak Date: Wed, 31 Dec 2025 13:25:59 -0500 Subject: [PATCH] feat(ui): Add dialog for installing missing dependencies When users click on modules with missing dependencies (orange tiles), show a dialog listing the missing dependencies and their install commands. This helps users quickly identify what they need to install to enable the module. --- main.go | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/main.go b/main.go index b3f3d7a..3714346 100644 --- a/main.go +++ b/main.go @@ -2673,10 +2673,45 @@ func (s *appState) showBenchmarkHistory() { s.setContent(view) } +func (s *appState) showMissingDependenciesDialog(moduleID string) { + missing, _ := getModuleDependencyStatus(moduleID) + + if len(missing) == 0 { + return // No missing dependencies + } + + // Build message with missing dependencies and install commands + var message strings.Builder + message.WriteString("This module requires the following dependencies:\n\n") + + for _, depName := range missing { + if dep, ok := allDependencies[depName]; ok { + message.WriteString(fmt.Sprintf("• %s\n", dep.Name)) + if dep.InstallCmd != "" { + message.WriteString(fmt.Sprintf(" Install: %s\n\n", dep.InstallCmd)) + } + } + } + + // Create dialog + dialog.ShowInformation( + "Missing Dependencies", + message.String(), + s.window, + ) +} + func (s *appState) showModule(id string) { if id != "queue" { s.stopQueueAutoRefresh() } + + // Check if module has missing dependencies + if !isModuleAvailable(id) && id != "settings" { + s.showMissingDependenciesDialog(id) + return + } + // Track navigation history s.pushNavigationHistory(id)