From caa01e638fdc07d31cc12de306bddb70b6f0e9ce Mon Sep 17 00:00:00 2001 From: Nate Meyer <672246+notnmeyer@users.noreply.github.com> Date: Thu, 21 May 2026 06:40:24 -0700 Subject: [PATCH 1/2] unhide --- cmd/campaigns.go | 7 +++---- cmd/components.go | 7 +++---- cmd/email_messages.go | 7 +++---- cmd/themes.go | 5 ++--- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/cmd/campaigns.go b/cmd/campaigns.go index 1c08a94..485a4e4 100644 --- a/cmd/campaigns.go +++ b/cmd/campaigns.go @@ -3,8 +3,8 @@ package cmd import ( "fmt" - "github.com/loops-so/loops-go" "github.com/loops-so/cli/internal/config" + "github.com/loops-so/loops-go" "github.com/spf13/cobra" ) @@ -27,9 +27,8 @@ func runCampaignsList(cfg *config.Config, params loops.PaginationParams) ([]loop } var campaignsCmd = &cobra.Command{ - Use: "campaigns", - Short: "Manage campaigns", - Hidden: true, + Use: "campaigns", + Short: "Manage campaigns", } var campaignsListCmd = &cobra.Command{ diff --git a/cmd/components.go b/cmd/components.go index f727a7d..5969d73 100644 --- a/cmd/components.go +++ b/cmd/components.go @@ -3,8 +3,8 @@ package cmd import ( "fmt" - "github.com/loops-so/loops-go" "github.com/loops-so/cli/internal/config" + "github.com/loops-so/loops-go" "github.com/spf13/cobra" ) @@ -27,9 +27,8 @@ func runComponentsList(cfg *config.Config, params loops.PaginationParams) ([]loo } var componentsCmd = &cobra.Command{ - Use: "components", - Short: "Manage components", - Hidden: true, + Use: "components", + Short: "Manage components", } var componentsListCmd = &cobra.Command{ diff --git a/cmd/email_messages.go b/cmd/email_messages.go index 1e16ba7..278b581 100644 --- a/cmd/email_messages.go +++ b/cmd/email_messages.go @@ -11,8 +11,8 @@ import ( "github.com/alecthomas/chroma/v2/formatters" "github.com/alecthomas/chroma/v2/lexers" "github.com/charmbracelet/colorprofile" - "github.com/loops-so/loops-go" "github.com/loops-so/cli/internal/config" + "github.com/loops-so/loops-go" "github.com/spf13/cobra" ) @@ -103,9 +103,8 @@ func fetchLatestRevisionID(cfg *config.Config, id string) (string, error) { } var emailMessagesCmd = &cobra.Command{ - Use: "email-messages", - Short: "Manage email messages", - Hidden: true, + Use: "email-messages", + Short: "Manage email messages", } var emailMessagesGetCmd = &cobra.Command{ diff --git a/cmd/themes.go b/cmd/themes.go index ff6be51..f21d031 100644 --- a/cmd/themes.go +++ b/cmd/themes.go @@ -28,9 +28,8 @@ func runThemesList(cfg *config.Config, params loops.PaginationParams) ([]loops.T } var themesCmd = &cobra.Command{ - Use: "themes", - Short: "Manage themes", - Hidden: true, + Use: "themes", + Short: "Manage themes", } var themesListCmd = &cobra.Command{ From 431cc6bd63dfd5c9809912935254e5c8851eee38 Mon Sep 17 00:00:00 2001 From: Nate Meyer <672246+notnmeyer@users.noreply.github.com> Date: Thu, 21 May 2026 06:44:47 -0700 Subject: [PATCH 2/2] fix tests --- cmd/agent_context_test.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cmd/agent_context_test.go b/cmd/agent_context_test.go index 690261b..864f414 100644 --- a/cmd/agent_context_test.go +++ b/cmd/agent_context_test.go @@ -143,13 +143,16 @@ func TestExtractFlagGroups_AllAnnotationKeys(t *testing.T) { } func TestBuildAgentContext_HiddenCommands(t *testing.T) { - ctx := buildAgentContext(rootCmd) - spam := findAgentCommand(ctx.Commands, "campaigns") - if spam == nil { - t.Fatal("campaigns not found in output (hidden commands should still be included)") + root := &cobra.Command{Use: "root"} + root.AddCommand(&cobra.Command{Use: "secret", Hidden: true}) + + ctx := buildAgentContext(root) + secret := findAgentCommand(ctx.Commands, "secret") + if secret == nil { + t.Fatal("secret not found in output (hidden commands should still be included)") } - if !spam.Hidden { - t.Error("campaigns should be hidden=true") + if !secret.Hidden { + t.Error("secret should be hidden=true") } }