4 Commits

Author SHA1 Message Date
Robin Olsen
1cfd23f1b0 Enhance command structure and user feedback in task management
- Added SprintCmd to issues command group
- taskLoop hide survey related commands when in repl
- Updated coding task instructions for clarity
- Removed redundant SprintCmd registration
- Improved REPL command handling for better user experience avoiding a chash if users type pm
- Enhanced task UI to display additional information
2026-04-03 11:19:57 +02:00
Robin Olsen
b3a52759ee Add environment variables for LazyOS project management survey to avoid sticky keys 2026-04-03 11:18:31 +02:00
Robin Olsen
6d13b6a94d Remove subproject reference from task 2026-04-01 15:02:19 +02:00
Robin Olsen
87259a1974 Improve TUI interface description for clarity and detail 2026-04-01 15:00:00 +02:00
9 changed files with 39 additions and 15 deletions

View File

@@ -1,5 +1,11 @@
FROM lscr.io/linuxserver/webtop:latest
ENV SELKIES_MANUAL_WIDTH=1920
ENV SELKIES_MANUAL_HEIGHT=1080
ENV MAX_RESOLUTION=1920x1080
ENV PIXELFLUX_WAYLAND=true
ENV TITLE="LazyOS - Project Management Survey"
RUN apk add --no-cache \
ca-certificates \
exo \

View File

@@ -73,6 +73,7 @@ func init() {
issues.CloseCmd.GroupID = "issues"
issues.DeleteCmd.GroupID = "issues"
issues.DepCmd.GroupID = "issues"
issues.SprintCmd.GroupID = "issues"
RootCmd.AddCommand(issues.CreateCmd)
RootCmd.AddCommand(issues.GetCmd)
@@ -81,6 +82,7 @@ func init() {
RootCmd.AddCommand(issues.CloseCmd)
RootCmd.AddCommand(issues.DeleteCmd)
RootCmd.AddCommand(issues.DepCmd)
RootCmd.AddCommand(issues.SprintCmd)
RootCmd.AddGroup(&cobra.Group{ID: "comment", Title: "Comment Management"})
issues.CommentCmd.GroupID = "comment"

View File

@@ -158,7 +158,12 @@ func runStartCmd(cmd *cobra.Command, args []string) error {
return nil
}
func taskLoop(ctx context.Context, application *task.App, surveyTasks map[string]task.Tasker, interfaces map[string]task.Interface) error {
func taskLoop(
ctx context.Context,
application *task.App,
surveyTasks map[string]task.Tasker,
interfaces map[string]task.Interface,
) error {
var iNames []string
for name := range interfaces {
iNames = append(iNames, name)
@@ -196,6 +201,15 @@ func taskLoop(ctx context.Context, application *task.App, surveyTasks map[string
return fmt.Errorf("failed to write task details: %w", err)
}
if tasks.InterfaceToType(selected) == tasks.InterfaceTypeREPL {
survey.StartCmd.Hidden = true
survey.StatusCmd.Hidden = true
survey.SubmitCmd.Hidden = true
replCmd.Hidden = true
tuiCmd.Hidden = true
webCmd.Hidden = true
}
fmt.Println("\033[H\033[2J")
if err := runner.Run(ctx, t, selected, tasks.InterfaceToType(selected)); err != nil {
return err

View File

@@ -77,15 +77,19 @@ func BaseDetails(interfaceType InterfaceType) TaskDetails {
case InterfaceTypeTUI:
interfaceDesc = `About our TUI Interface?
- TUI stands for Terminal User Interface. It is a user interface that uses text-based elements to allow users to interact with the application.
- TUI stands for Terminal User Interface.
It is a user interface that uses text-based elements to interact with the application.
- The main way to interact with a TUI is through keyboard inputs, where you can navigate through menus, select options, and input data using the keyboard.
- The main way to interact with a TUI is through keyboard inputs,
where you can navigate through menus, select options, and input data using the keyboard.
- At the bottom of the interface you will find the help menu, which lists available keybinds.
- The interface has parts:
- List View: This view shows the available issues in a list format, allowing you to browse through them and select one to work on.
- Kanban: This view allowtwos you to manage and track the progress of different of issues.
- List View: This view shows the available issues in a list format,
allowing you to browse through them and select one to work on.
- Kanban: This view allows you to manage and track the progress of different issues,
this also they main way of creating and managing sprints.
- Press "q" to quit task during the survey.`
case InterfaceTypeWeb:

View File

@@ -15,6 +15,7 @@ const codingDescription = `You are tasked with fixing a logical error in the cod
Your task:
1. A text file will appear in this directory(your desktop):
- Name: code.txt
- Open it and follow the instructions inside.
- Save the file after you are done.
2. Change status of the Issue "Fix major error" to Closed.`
@@ -165,7 +166,7 @@ func (t *CodingTask) Validate(ctx context.Context) ValidationFeedback {
return expect.ValidationFeedback
}
code, ok := strings.CutPrefix(string(fileContent), codingDescription+textFileDescription+"\n")
code, ok := strings.CutPrefix(string(fileContent), textFileDescription+"\n")
if !ok {
expect.Fail("The content of code.txt does not match the expected format.")
return expect.ValidationFeedback

View File

@@ -317,6 +317,4 @@ func init() {
SprintCmd.AddCommand(SprintAddCmd)
SprintCmd.AddCommand(SprintRemoveCmd)
SprintCmd.AddCommand(SprintDeleteCmd)
RootCmd.AddCommand(SprintCmd)
}

View File

@@ -25,12 +25,11 @@ func (r *REPL) execute(input string) (string, error) {
return executePMCommand("status")
}
if input == "pm" {
return executePMCommand("help")
}
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)

View File

@@ -120,7 +120,7 @@ func (m TaskModel) View() tea.View {
}
detailsText := fmt.Sprintf(
"Interface Type: %s | Time to complete: %s | Difficulty: %s",
"Interface Type: %s | Time to complete: %s | Difficulty: %s\n",
m.InterfaceType,
m.TimeToComplete,
m.Difficulty,
@@ -140,6 +140,7 @@ func (m TaskModel) View() tea.View {
centerInCard(descStyle.Render(m.Description)),
"",
centerInCard(detailsStyle.Render(detailsText)),
centerInCard(style.TextStyle.Render(`On your desktop "Task Details.txt" will contain the same details`)),
centerInCard(infoStyle.Render(m.interfaceHelpText())),
centerInCard(infoStyle.Render(m.getQuitHelpText())),
)

1
task

Submodule task deleted from 8d7e6a8b7d