From 95a13f85744cabda121bf0cc9aecbcbb0150d3f9 Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Mon, 7 Sep 2026 11:09:21 +0530 Subject: [PATCH] feat: animate plugin install operations with CLIProgress spinners Wrap the network-backed plugin installs in progress spinners matching the doctor/preflight pattern: plugin install (GitHub) shows 'Installing plugin from GitHub', and plugin marketplace install shows 'Fetching plugin' then 'Installing plugin'. Non-TTY renders clean static lines. --- cmd/plugin_dynamic.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cmd/plugin_dynamic.go b/cmd/plugin_dynamic.go index ee62c270..74d13247 100644 --- a/cmd/plugin_dynamic.go +++ b/cmd/plugin_dynamic.go @@ -140,9 +140,14 @@ var pluginInstallDynamicCmd = &cobra.Command{ // Otherwise treat as GitHub repo dm := getDynamicManager() + prog := NewCLIProgress("Plugin install", []string{"Installing plugin from GitHub"}) + prog.StartStep(0) if err := dm.InstallFromGitHub(source); err != nil { + prog.Abort() return err } + prog.CompleteStep(0) + prog.Done() cmd.Printf("%s\n", auditTint("Installed plugin from "+source+".", doneGreen)) // Re-discover @@ -452,14 +457,22 @@ var pluginMarketplaceInstallCmd = &cobra.Command{ Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { mc := plugin.NewMarketplaceClient() + prog := NewCLIProgress("Plugin install", []string{"Fetching plugin", "Installing plugin"}) + prog.StartStep(0) entry, err := mc.Find(args[0]) if err != nil { + prog.Abort() return err } + prog.CompleteStep(0) + prog.StartStep(1) dir, err := mc.Install(*entry) if err != nil { + prog.Abort() return err } + prog.CompleteStep(1) + prog.Done() cmd.Printf("%s\n", auditTint("Installed "+entry.Name+" to ", doneGreen)+auditTint(dir, textPrimary)) // re-discover _ = getDynamicManager().DiscoverAll()