From 9a70851a0af76401640fed33e2bff9213371e894 Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Mon, 16 Mar 2026 13:06:16 +0100 Subject: [PATCH] refine pm cli and descriptions --- cmd/pm/init.go | 18 ++++++++++-------- cmd/pm/intro.go | 4 +++- cmd/pm/tasks/base.go | 8 ++++---- internal/commands/issues/root.go | 4 ++-- pkg/repl/executor.go | 5 +++++ 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/cmd/pm/init.go b/cmd/pm/init.go index f838814..fe69b17 100644 --- a/cmd/pm/init.go +++ b/cmd/pm/init.go @@ -86,18 +86,20 @@ func init() { RootCmd.AddCommand(issues.CommentCmd) RootCmd.AddCommand(issues.CommentsCmd) - var SurveyRootCmd = survey.RootCmd - SurveyRootCmd.GroupID = "survey" RootCmd.AddGroup(&cobra.Group{ID: "survey", Title: "Survey Commands"}) + survey.StartCmd.GroupID = "survey" + survey.StatusCmd.GroupID = "survey" + survey.SubmitCmd.GroupID = "survey" + survey.ListTasksCmd.GroupID = "survey" + survey.ListInterfacesCmd.GroupID = "survey" survey.StartCmd.RunE = runStartCmd - SurveyRootCmd.AddCommand(survey.StartCmd) - SurveyRootCmd.AddCommand(survey.StatusCmd) - SurveyRootCmd.AddCommand(survey.SubmitCmd) - SurveyRootCmd.AddCommand(survey.ListTasksCmd) - SurveyRootCmd.AddCommand(survey.ListInterfacesCmd) + RootCmd.AddCommand(survey.StartCmd) + RootCmd.AddCommand(survey.StatusCmd) + RootCmd.AddCommand(survey.SubmitCmd) - RootCmd.AddCommand(SurveyRootCmd) + RootCmd.AddCommand(survey.ListTasksCmd) + RootCmd.AddCommand(survey.ListInterfacesCmd) RootCmd.AddGroup(&cobra.Group{ID: "other", Title: "Additional Commands"}) RootCmd.SetHelpCommandGroupID("other") diff --git a/cmd/pm/intro.go b/cmd/pm/intro.go index c5f910c..b686afe 100644 --- a/cmd/pm/intro.go +++ b/cmd/pm/intro.go @@ -16,7 +16,9 @@ const ( IntroTitle = "Project Management Interface Survey" IntroductionText = `This survey evaluates how people use different project management interfaces to complete common tasks. You will complete a short set of task-based exercises and answer a few follow-up questions about the experience. -Your feedback helps us compare interface design and usability.` +Your feedback helps us compare interface design and usability. + +The survey takes around 15-20 minutes to complete.` Disclaimer = `Data Collection Notice diff --git a/cmd/pm/tasks/base.go b/cmd/pm/tasks/base.go index e69decf..782f881 100644 --- a/cmd/pm/tasks/base.go +++ b/cmd/pm/tasks/base.go @@ -78,10 +78,10 @@ func BaseDetails(interfaceType InterfaceType) TaskDetails { } return TaskDetails{ - Title: "Base Task", - Description: "This is a base task.", - TimeToComplete: "10m", - Difficulty: "Easy", + Title: "title not set", + Description: "description not set", + TimeToComplete: "not set", + Difficulty: "not set", InterfaceType: interfaceType, InterfaceDescription: interfaceDesc, } diff --git a/internal/commands/issues/root.go b/internal/commands/issues/root.go index 989bd9c..bfae1d4 100644 --- a/internal/commands/issues/root.go +++ b/internal/commands/issues/root.go @@ -34,8 +34,8 @@ type Flags struct { // RootCmd is the base command for the CLI application. var RootCmd = &cobra.Command{ Use: "pm", - Short: "Project Management CLI", - Long: `Project Management CLI for managing issues and tasks.`, + Short: "Project Management User Interface Comparison CLI", + Long: `Project Management User Interface Comparison CLI is a tool designed to evaluate and compare different project management interfaces through a series of tasks and surveys.`, PersistentPreRun: func(cmd *cobra.Command, args []string) { // Inject app into context for all commands if app != nil { diff --git a/pkg/repl/executor.go b/pkg/repl/executor.go index 2789bec..7ad82cc 100644 --- a/pkg/repl/executor.go +++ b/pkg/repl/executor.go @@ -26,6 +26,11 @@ func execute(input string) (string, error) { } if after, ok := strings.CutPrefix(input, "pm"); ok { + + if strings.Contains(strings.Split(after, " ")[1], "start") { + return "Nice try👻", nil + } + return executePMCommand(after) } return executeShellCommand(input)