refine pm cli and descriptions

This commit is contained in:
Robin Olsen
2026-03-16 13:06:16 +01:00
parent 43ca776536
commit 9a70851a0a
5 changed files with 24 additions and 15 deletions

View File

@@ -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")

View File

@@ -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

View File

@@ -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,
}

View File

@@ -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 {

View File

@@ -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)