Compare commits
8 Commits
LPM-152
...
v1.0.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d3fa86627 | ||
|
|
1cfd23f1b0 | ||
|
|
b3a52759ee | ||
|
|
6d13b6a94d | ||
|
|
87259a1974 | ||
|
|
da9f8ed4cb | ||
|
|
730ad6a2e2 | ||
|
|
44f192b619 |
@@ -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 \
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -3,7 +3,6 @@ package tasks
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"charm.land/huh/v2"
|
||||
@@ -15,6 +14,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.`
|
||||
@@ -22,9 +22,7 @@ Your task:
|
||||
const desc = `There is a major logical error in this code, you need to fix it.
|
||||
Change the function logic so that it correctly adds two numbers together instead of subtracting them.`
|
||||
|
||||
var textFileDescription = `
|
||||
|
||||
# Instructions for the coding task
|
||||
var textFileDescription = `# Instructions for the coding task
|
||||
|
||||
` + desc + `
|
||||
############################################################`
|
||||
@@ -35,7 +33,7 @@ function Add(a, b int) int {
|
||||
}
|
||||
`
|
||||
|
||||
var textFileContent = codingDescription + textFileDescription + "\n" + code
|
||||
var textFileContent = textFileDescription + "\n" + code
|
||||
|
||||
type CodingTask struct {
|
||||
done bool
|
||||
@@ -159,19 +157,13 @@ func (t *CodingTask) Validate(ctx context.Context) ValidationFeedback {
|
||||
return expect.ValidationFeedback
|
||||
}
|
||||
|
||||
fileContent, err := os.ReadFile("./code.txt")
|
||||
code, err := os.ReadFile("./code.txt")
|
||||
if err != nil {
|
||||
expect.Fail("Error reading code.txt file: " + err.Error())
|
||||
return expect.ValidationFeedback
|
||||
}
|
||||
|
||||
code, ok := strings.CutPrefix(string(fileContent), codingDescription+textFileDescription+"\n")
|
||||
if !ok {
|
||||
expect.Fail("The content of code.txt does not match the expected format.")
|
||||
return expect.ValidationFeedback
|
||||
}
|
||||
|
||||
expect.Contains(code, "a + b", "Function logic")
|
||||
expect.Contains(string(code), "a + b", "Function logic")
|
||||
if !expect.Valid() {
|
||||
return expect.ValidationFeedback
|
||||
}
|
||||
|
||||
@@ -317,6 +317,4 @@ func init() {
|
||||
SprintCmd.AddCommand(SprintAddCmd)
|
||||
SprintCmd.AddCommand(SprintRemoveCmd)
|
||||
SprintCmd.AddCommand(SprintDeleteCmd)
|
||||
|
||||
RootCmd.AddCommand(SprintCmd)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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())),
|
||||
)
|
||||
|
||||
@@ -215,8 +215,8 @@ func helpBarConfig(view ViewKind) HelpBarConfig {
|
||||
{Key: "n", Desc: "new sprint"},
|
||||
{Key: "S", Desc: "select sprint"},
|
||||
{Key: "pgup/pgdn", Desc: "page"},
|
||||
{Key: "h/l", Desc: "column"},
|
||||
{Key: "←/→", Desc: "move"},
|
||||
{Key: "←/→", Desc: "column"},
|
||||
{Key: "h/l", Desc: "move"},
|
||||
{Key: "a", Desc: "add"},
|
||||
{Key: "e/d/s/p/t/A/D", Desc: "edit"},
|
||||
{Key: "x", Desc: "delete"},
|
||||
@@ -225,8 +225,8 @@ func helpBarConfig(view ViewKind) HelpBarConfig {
|
||||
},
|
||||
FullItems: []HelpItem{
|
||||
{Key: "v", Desc: "list view"},
|
||||
{Key: "h/l", Desc: "switch column"},
|
||||
{Key: "←/→", Desc: "move issue"},
|
||||
{Key: "←/→", Desc: "switch column"},
|
||||
{Key: "h/l", Desc: "move issue"},
|
||||
{Key: "↑/k", Desc: "up"},
|
||||
{Key: "↓/j", Desc: "down"},
|
||||
{Key: "/", Desc: "search"},
|
||||
@@ -240,7 +240,7 @@ func helpBarConfig(view ViewKind) HelpBarConfig {
|
||||
{Key: "p", Desc: "change priority"},
|
||||
{Key: "t", Desc: "change type"},
|
||||
{Key: "A", Desc: "change assignee"},
|
||||
{Key: "D", Desc: "manage dependencies"},
|
||||
{Key: "D", Desc: "manage dependency"}, // dependencies -> dependency cuz dependencies added a newline
|
||||
{Key: "S", Desc: "select sprint"},
|
||||
{Key: "n", Desc: "new sprint"},
|
||||
{Key: "q", Desc: "quit"},
|
||||
|
||||
@@ -27,20 +27,20 @@ var defaultKanbanKeyMap = KeyMap{
|
||||
key.WithHelp("v", "dashboard"),
|
||||
),
|
||||
MoveColumnLeft: key.NewBinding(
|
||||
key.WithKeys("h"),
|
||||
key.WithHelp("h", "prev column"),
|
||||
key.WithKeys("left"),
|
||||
key.WithHelp("←", "prev column"),
|
||||
),
|
||||
MoveColumnRight: key.NewBinding(
|
||||
key.WithKeys("l"),
|
||||
key.WithHelp("l", "next column"),
|
||||
key.WithKeys("right"),
|
||||
key.WithHelp("→", "next column"),
|
||||
),
|
||||
MoveIssueLeft: key.NewBinding(
|
||||
key.WithKeys("left", "["),
|
||||
key.WithHelp("←/[", "move issue left"),
|
||||
key.WithKeys("h", "["),
|
||||
key.WithHelp("h/[", "move issue left"),
|
||||
),
|
||||
MoveIssueRight: key.NewBinding(
|
||||
key.WithKeys("right", "]"),
|
||||
key.WithHelp("→/]", "move issue right"),
|
||||
key.WithKeys("l", "]"),
|
||||
key.WithHelp("l/]", "move issue right"),
|
||||
),
|
||||
AddComment: key.NewBinding(
|
||||
key.WithKeys("c"),
|
||||
|
||||
1
task
1
task
Submodule task deleted from 8d7e6a8b7d
Reference in New Issue
Block a user