From 40d25cc716b5ded4b38bd17f77cf5391f74752c6 Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Wed, 18 Mar 2026 11:23:10 +0100 Subject: [PATCH 1/7] start with upgdrade (broken right now) --- cmd/pm/intro.go | 6 +- cmd/pm/intro_questionnare.go | 4 +- cmd/pm/main.go | 4 +- cmd/pm/runner.go | 4 +- cmd/pm/tasks/backlogRefinement.go | 2 +- cmd/pm/tasks/base.go | 2 +- cmd/pm/tasks/codingTask.go | 2 +- cmd/pm/tasks/createIssue.go | 2 +- cmd/pm/tasks/dependencyManagement.go | 2 +- cmd/pm/tasks/gitTask.go | 2 +- cmd/pm/tasks/priorityManagement.go | 2 +- cmd/pm/tasks/sprintPlanning.go | 2 +- go.mod | 64 ++++++------ go.sum | 136 ++++++++++++-------------- internal/app/initializer.go | 2 +- internal/commands/issues/close.go | 2 +- internal/commands/issues/delete.go | 2 +- internal/commands/issues/list.go | 6 +- internal/commands/issues/root.go | 2 +- internal/models/task.go | 2 +- internal/storage/mongo.go | 8 +- internal/style/styles.go | 2 +- internal/style/themes.go | 8 +- pkg/task/questionnaire.go | 4 +- pkg/task/runner.go | 2 +- pkg/task/taskui.go | 4 +- pkg/tui/components/header.go | 2 +- pkg/tui/components/helpbar.go | 2 +- pkg/tui/components/issue_detail.go | 6 +- pkg/tui/components/issue_list.go | 13 +-- pkg/tui/components/keymap.go | 3 +- pkg/tui/components/modals.go | 2 +- pkg/tui/issues/operations.go | 45 +++++++-- pkg/tui/styles/styles.go | 2 +- pkg/tui/tui.go | 2 +- pkg/tui/views/dashboard/keys.go | 4 +- pkg/tui/views/dashboard/model.go | 20 ++-- pkg/tui/views/dashboard/operations.go | 4 +- pkg/tui/views/dashboard/view.go | 2 +- pkg/tui/views/kanban/keys.go | 4 +- pkg/tui/views/kanban/model.go | 37 +++---- pkg/tui/views/kanban/operations.go | 4 +- pkg/tui/views/kanban/view.go | 2 +- pkg/tui/views/root.go | 2 +- pkg/web/web.go | 2 +- 45 files changed, 218 insertions(+), 218 deletions(-) diff --git a/cmd/pm/intro.go b/cmd/pm/intro.go index b686afe..9d23844 100644 --- a/cmd/pm/intro.go +++ b/cmd/pm/intro.go @@ -3,11 +3,11 @@ package main import ( "strings" + "charm.land/bubbles/v2/key" + "charm.land/bubbletea/v2" + "charm.land/lipgloss/v2" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/internal/style" - "github.com/charmbracelet/bubbles/key" - tea "github.com/charmbracelet/bubbletea" - "github.com/charmbracelet/lipgloss" ) const stages = 2 diff --git a/cmd/pm/intro_questionnare.go b/cmd/pm/intro_questionnare.go index 2bdf809..d9486a9 100644 --- a/cmd/pm/intro_questionnare.go +++ b/cmd/pm/intro_questionnare.go @@ -1,9 +1,9 @@ package main import ( + "charm.land/bubbletea/v2" + "charm.land/huh/v2" "github.com/LazyBachelor/LazyPM/pkg/task" - tea "github.com/charmbracelet/bubbletea" - "github.com/charmbracelet/huh" ) type IntroQuestionnaire struct{} diff --git a/cmd/pm/main.go b/cmd/pm/main.go index d6bd53c..49c5dbf 100644 --- a/cmd/pm/main.go +++ b/cmd/pm/main.go @@ -3,9 +3,9 @@ package main import ( "context" + "charm.land/fang/v2" "github.com/LazyBachelor/LazyPM/internal/app" - issues "github.com/LazyBachelor/LazyPM/internal/commands/issues" - "github.com/charmbracelet/fang" + "github.com/LazyBachelor/LazyPM/internal/commands/issues" ) var App *app.App diff --git a/cmd/pm/runner.go b/cmd/pm/runner.go index 98c69d3..d524ed8 100644 --- a/cmd/pm/runner.go +++ b/cmd/pm/runner.go @@ -7,11 +7,11 @@ import ( "math/rand" "time" + "charm.land/huh/v2" "github.com/LazyBachelor/LazyPM/cmd/pm/tasks" "github.com/LazyBachelor/LazyPM/internal/commands/survey" "github.com/LazyBachelor/LazyPM/internal/storage" "github.com/LazyBachelor/LazyPM/pkg/task" - "github.com/charmbracelet/huh" "github.com/spf13/cobra" ) @@ -54,7 +54,7 @@ func runStartCmd(cmd *cobra.Command, args []string) error { Title("Do you want to continue without submitting your responses?"). Description("You can fix your database connection and submit your responses later with the submit command."). Value(&continueWithoutSubmitting). - WithTheme(huh.ThemeBase16()). + WithTheme(huh.ThemeBase16(true)). RunAccessible(cmd.OutOrStdout(), cmd.InOrStdin()); err != nil { return fmt.Errorf("failed to read user input: %w", err) } diff --git a/cmd/pm/tasks/backlogRefinement.go b/cmd/pm/tasks/backlogRefinement.go index c39c1a0..f04201f 100644 --- a/cmd/pm/tasks/backlogRefinement.go +++ b/cmd/pm/tasks/backlogRefinement.go @@ -4,9 +4,9 @@ import ( "context" "strings" + "charm.land/huh/v2" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/internal/utils/check" - "github.com/charmbracelet/huh" ) const backlogRefinementDescription = `You are tasked with backlog refinement. diff --git a/cmd/pm/tasks/base.go b/cmd/pm/tasks/base.go index f0be177..057ea88 100644 --- a/cmd/pm/tasks/base.go +++ b/cmd/pm/tasks/base.go @@ -3,13 +3,13 @@ package tasks import ( "context" + "charm.land/huh/v2" "github.com/LazyBachelor/LazyPM/internal/app" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/pkg/repl" "github.com/LazyBachelor/LazyPM/pkg/task" "github.com/LazyBachelor/LazyPM/pkg/tui" "github.com/LazyBachelor/LazyPM/pkg/web" - "github.com/charmbracelet/huh" ) type App = app.App diff --git a/cmd/pm/tasks/codingTask.go b/cmd/pm/tasks/codingTask.go index 0573ced..18d313a 100644 --- a/cmd/pm/tasks/codingTask.go +++ b/cmd/pm/tasks/codingTask.go @@ -5,9 +5,9 @@ import ( "os" "strings" + "charm.land/huh/v2" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/internal/utils/check" - "github.com/charmbracelet/huh" ) const codingDescription = `You are tasked with doing a chore in the codebase. diff --git a/cmd/pm/tasks/createIssue.go b/cmd/pm/tasks/createIssue.go index b78f194..c34dc8e 100644 --- a/cmd/pm/tasks/createIssue.go +++ b/cmd/pm/tasks/createIssue.go @@ -4,9 +4,9 @@ import ( "context" "fmt" + "charm.land/huh/v2" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/internal/utils/check" - "github.com/charmbracelet/huh" ) const description = `You are tasked with creating a new issue in the project management system. diff --git a/cmd/pm/tasks/dependencyManagement.go b/cmd/pm/tasks/dependencyManagement.go index ac620f7..d1c6a4a 100644 --- a/cmd/pm/tasks/dependencyManagement.go +++ b/cmd/pm/tasks/dependencyManagement.go @@ -4,9 +4,9 @@ import ( "context" "fmt" + "charm.land/huh/v2" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/internal/utils/check" - "github.com/charmbracelet/huh" ) const dependencyManagementDescription = `You are tasked with managing issue dependencies. diff --git a/cmd/pm/tasks/gitTask.go b/cmd/pm/tasks/gitTask.go index 5ed1515..40be4f6 100644 --- a/cmd/pm/tasks/gitTask.go +++ b/cmd/pm/tasks/gitTask.go @@ -6,9 +6,9 @@ import ( "os" "strings" + "charm.land/huh/v2" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/internal/utils/check" - "github.com/charmbracelet/huh" "github.com/go-git/go-git/v6" ) diff --git a/cmd/pm/tasks/priorityManagement.go b/cmd/pm/tasks/priorityManagement.go index 2351e19..2bb729b 100644 --- a/cmd/pm/tasks/priorityManagement.go +++ b/cmd/pm/tasks/priorityManagement.go @@ -4,9 +4,9 @@ import ( "context" "fmt" + "charm.land/huh/v2" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/internal/utils/check" - "github.com/charmbracelet/huh" ) const priorityManagementDescription = `You are tasked with managing issue priorities. diff --git a/cmd/pm/tasks/sprintPlanning.go b/cmd/pm/tasks/sprintPlanning.go index 86b26fb..68330ca 100644 --- a/cmd/pm/tasks/sprintPlanning.go +++ b/cmd/pm/tasks/sprintPlanning.go @@ -3,9 +3,9 @@ package tasks import ( "context" + "charm.land/huh/v2" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/internal/utils/check" - "github.com/charmbracelet/huh" ) const sprintPlanningDescription = `You are tasked with sprint planning. diff --git a/go.mod b/go.mod index c41c87b..ee97108 100644 --- a/go.mod +++ b/go.mod @@ -1,26 +1,26 @@ module github.com/LazyBachelor/LazyPM -go 1.25.6 +go 1.26.1 require ( - charm.land/lipgloss/v2 v2.0.0-beta.3.0.20251106193318-19329a3e8410 - github.com/go-git/go-git/v6 v6.0.0-20260222090600-424e9964d3a3 + github.com/go-git/go-git/v6 v6.0.0-20260317113930-fb0d09929504 github.com/joho/godotenv v1.5.1 github.com/muesli/reflow v0.3.0 github.com/steveyegge/beads v0.49.6 go.mongodb.org/mongo-driver v1.17.9 + go.mongodb.org/mongo-driver/v2 v2.5.0 ) // Terminal dependencies require ( + charm.land/bubbles/v2 v2.0.0 + charm.land/bubbletea/v2 v2.0.2 + charm.land/fang/v2 v2.0.1 + charm.land/huh/v2 v2.0.3 + charm.land/lipgloss/v2 v2.0.2 github.com/c-bata/go-prompt v0.2.6 - github.com/charmbracelet/bubbles v0.21.1 - github.com/charmbracelet/bubbletea v1.3.10 - github.com/charmbracelet/fang v0.4.4 - github.com/charmbracelet/huh v0.8.0 - github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834 github.com/spf13/cobra v1.10.2 - golang.org/x/term v0.40.0 + golang.org/x/term v0.41.0 ) // Web dependencies @@ -36,61 +36,55 @@ require ( require ( github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/ProtonMail/go-crypto v1.3.0 // indirect + github.com/ProtonMail/go-crypto v1.4.0 // indirect github.com/a-h/parse v0.0.0-20250122154542-74294addb73e // indirect github.com/andybalholm/brotli v1.2.0 // indirect github.com/atotto/clipboard v0.1.4 // indirect - github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/catppuccin/go v0.3.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/charmbracelet/colorprofile v0.4.1 // indirect - github.com/charmbracelet/ultraviolet v0.0.0-20260209111912-3cca7cf7b09b // indirect + github.com/charmbracelet/colorprofile v0.4.3 // indirect + github.com/charmbracelet/ultraviolet v0.0.0-20260316091819-b93f6a3b8502 // indirect github.com/charmbracelet/x/ansi v0.11.6 // indirect - github.com/charmbracelet/x/cellbuf v0.0.15 // indirect - github.com/charmbracelet/x/exp/charmtone v0.0.0-20260209194814-eeb2896ac759 // indirect + github.com/charmbracelet/x/exp/charmtone v0.0.0-20260316093931-f2fb44ab3145 // indirect + github.com/charmbracelet/x/exp/ordered v0.1.0 // indirect github.com/charmbracelet/x/exp/strings v0.1.0 // indirect github.com/charmbracelet/x/term v0.2.2 // indirect github.com/charmbracelet/x/termios v0.1.1 // indirect github.com/charmbracelet/x/windows v0.2.2 // indirect github.com/cli/browser v1.3.0 // indirect - github.com/clipperhouse/displaywidth v0.10.0 // indirect - github.com/clipperhouse/uax29/v2 v2.6.0 // indirect - github.com/cloudflare/circl v1.6.1 // indirect + github.com/clipperhouse/displaywidth v0.11.0 // indirect + github.com/clipperhouse/uax29/v2 v2.7.0 // indirect + github.com/cloudflare/circl v1.6.3 // indirect github.com/cyphar/filepath-securejoin v0.6.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/emirpasic/gods v1.18.1 // indirect - github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect github.com/fatih/color v1.18.0 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.12 // indirect + github.com/gabriel-vasile/mimetype v1.4.13 // indirect github.com/go-git/gcfg/v2 v2.0.2 // indirect - github.com/go-git/go-billy/v6 v6.0.0-20260114122816-19306b749ecc // indirect + github.com/go-git/go-billy/v6 v6.0.0-20260226131633-45bd0956d66f // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-viper/mapstructure/v2 v2.5.0 // indirect github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/google/go-cmp v0.7.0 // indirect github.com/haatos/goshipit v0.0.0-20260305043009-36e5c9a2e5c6 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/kevinburke/ssh_config v1.5.0 // indirect - github.com/klauspost/compress v1.18.0 // indirect + github.com/kevinburke/ssh_config v1.6.0 // indirect + github.com/klauspost/compress v1.18.2 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/lucasb-eyer/go-colorful v1.3.0 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-localereader v0.0.1 // indirect - github.com/mattn/go-runewidth v0.0.19 // indirect + github.com/mattn/go-runewidth v0.0.21 // indirect github.com/mattn/go-tty v0.0.7 // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect - github.com/montanaflynn/stats v0.7.1 // indirect - github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect github.com/muesli/cancelreader v0.2.2 // indirect github.com/muesli/mango v0.2.0 // indirect github.com/muesli/mango-cobra v1.3.0 // indirect github.com/muesli/mango-pflag v0.2.0 // indirect github.com/muesli/roff v0.1.0 // indirect - github.com/muesli/termenv v0.16.0 // indirect github.com/natefinch/atomic v1.0.1 // indirect github.com/ncruces/go-sqlite3 v0.30.5 // indirect github.com/ncruces/julianday v1.0.0 // indirect @@ -98,6 +92,7 @@ require ( github.com/pjbgf/sha1cd v0.5.0 // indirect github.com/pkg/term v1.2.0-beta.2 // indirect github.com/rivo/uniseg v0.4.7 // indirect + github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/sagikazarmark/locafero v0.12.0 // indirect github.com/sahilm/fuzzy v0.1.1 // indirect github.com/sergi/go-diff v1.4.0 // indirect @@ -113,14 +108,15 @@ require ( github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/crypto v0.48.0 // indirect + golang.org/x/crypto v0.49.0 // indirect golang.org/x/exp v0.0.0-20260209203927-2842357ff358 // indirect golang.org/x/mod v0.33.0 // indirect - golang.org/x/net v0.50.0 // indirect - golang.org/x/sync v0.19.0 // indirect - golang.org/x/sys v0.41.0 // indirect - golang.org/x/text v0.34.0 // indirect + golang.org/x/net v0.52.0 // indirect + golang.org/x/sync v0.20.0 // indirect + golang.org/x/sys v0.42.0 // indirect + golang.org/x/text v0.35.0 // indirect golang.org/x/tools v0.42.0 // indirect + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 3ce74b3..18ba4da 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,21 @@ -charm.land/lipgloss/v2 v2.0.0-beta.3.0.20251106193318-19329a3e8410 h1:D9PbaszZYpB4nj+d6HTWr1onlmlyuGVNfL9gAi8iB3k= -charm.land/lipgloss/v2 v2.0.0-beta.3.0.20251106193318-19329a3e8410/go.mod h1:1qZyvvVCenJO2M1ac2mX0yyiIZJoZmDM4DG4s0udJkU= +charm.land/bubbles/v2 v2.0.0 h1:tE3eK/pHjmtrDiRdoC9uGNLgpopOd8fjhEe31B/ai5s= +charm.land/bubbles/v2 v2.0.0/go.mod h1:rCHoleP2XhU8um45NTuOWBPNVHxnkXKTiZqcclL/qOI= +charm.land/bubbletea/v2 v2.0.2 h1:4CRtRnuZOdFDTWSff9r8QFt/9+z6Emubz3aDMnf/dx0= +charm.land/bubbletea/v2 v2.0.2/go.mod h1:3LRff2U4WIYXy7MTxfbAQ+AdfM3D8Xuvz2wbsOD9OHQ= +charm.land/fang/v2 v2.0.1 h1:zQCM8JQJ1JnQX/66B5jlCYBUxL2as5JXQZ2KJ6EL0mY= +charm.land/fang/v2 v2.0.1/go.mod h1:S1GmkpcvK+OB5w9caywUnJcsMew45Ot8FXqoz8ALrII= +charm.land/huh/v2 v2.0.3 h1:2cJsMqEPwSywGHvdlKsJyQKPtSJLVnFKyFbsYZTlLkU= +charm.land/huh/v2 v2.0.3/go.mod h1:93eEveeeqn47MwiC3tf+2atZ2l7Is88rAtmZNZ8x9Wc= +charm.land/lipgloss/v2 v2.0.2 h1:xFolbF8JdpNkM2cEPTfXEcW1p6NRzOWTSamRfYEw8cs= +charm.land/lipgloss/v2 v2.0.2/go.mod h1:KjPle2Qd3YmvP1KL5OMHiHysGcNwq6u83MUjYkFvEkM= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/ProtonMail/go-crypto v1.3.0 h1:ILq8+Sf5If5DCpHQp4PbZdS1J7HDFRXz/+xKBiRGFrw= -github.com/ProtonMail/go-crypto v1.3.0/go.mod h1:9whxjD8Rbs29b4XWbB8irEcE8KHMqaR2e7GWU1R+/PE= +github.com/ProtonMail/go-crypto v1.4.0 h1:Zq/pbM3F5DFgJiMouxEdSVY44MVoQNEKp5d5QxIQceQ= +github.com/ProtonMail/go-crypto v1.4.0/go.mod h1:e1OaTyu5SYVrO9gKOEhTc+5UcXtTUa+P3uLudwcgPqo= github.com/a-h/parse v0.0.0-20250122154542-74294addb73e h1:HjVbSQHy+dnlS6C3XajZ69NYAb5jbGNfHanvm1+iYlo= github.com/a-h/parse v0.0.0-20250122154542-74294addb73e/go.mod h1:3mnrkvGpurZ4ZrTDbYU84xhwXW2TjTKShSwjRi2ihfQ= github.com/a-h/templ v0.3.1001 h1:yHDTgexACdJttyiyamcTHXr2QkIeVF1MukLy44EAhMY= @@ -20,42 +28,30 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= -github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= -github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= -github.com/aymanbagabas/go-udiff v0.3.1 h1:LV+qyBQ2pqe0u42ZsUEtPiCaUoqgA9gYRDs3vj1nolY= -github.com/aymanbagabas/go-udiff v0.3.1/go.mod h1:G0fsKmG+P6ylD0r6N/KgQD/nWzgfnl8ZBcNLgcbrw8E= +github.com/aymanbagabas/go-udiff v0.4.1 h1:OEIrQ8maEeDBXQDoGCbbTTXYJMYRCRO1fnodZ12Gv5o= +github.com/aymanbagabas/go-udiff v0.4.1/go.mod h1:0L9PGwj20lrtmEMeyw4WKJ/TMyDtvAoK9bf2u/mNo3w= github.com/c-bata/go-prompt v0.2.6 h1:POP+nrHE+DfLYx370bedwNhsqmpCUynWPxuHi0C5vZI= github.com/c-bata/go-prompt v0.2.6/go.mod h1:/LMAke8wD2FsNu9EXNdHxNLbd9MedkPnCdfpU9wwHfY= github.com/catppuccin/go v0.3.0 h1:d+0/YicIq+hSTo5oPuRi5kOpqkVA5tAsU6dNhvRu+aY= github.com/catppuccin/go v0.3.0/go.mod h1:8IHJuMGaUUjQM82qBrGNBv7LFq6JI3NnQCF6MOlZjpc= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/charmbracelet/bubbles v0.21.1 h1:nj0decPiixaZeL9diI4uzzQTkkz1kYY8+jgzCZXSmW0= -github.com/charmbracelet/bubbles v0.21.1/go.mod h1:HHvIYRCpbkCJw2yo0vNX1O5loCwSr9/mWS8GYSg50Sk= -github.com/charmbracelet/bubbletea v1.3.10 h1:otUDHWMMzQSB0Pkc87rm691KZ3SWa4KUlvF9nRvCICw= -github.com/charmbracelet/bubbletea v1.3.10/go.mod h1:ORQfo0fk8U+po9VaNvnV95UPWA1BitP1E0N6xJPlHr4= -github.com/charmbracelet/colorprofile v0.4.1 h1:a1lO03qTrSIRaK8c3JRxJDZOvhvIeSco3ej+ngLk1kk= -github.com/charmbracelet/colorprofile v0.4.1/go.mod h1:U1d9Dljmdf9DLegaJ0nGZNJvoXAhayhmidOdcBwAvKk= -github.com/charmbracelet/fang v0.4.4 h1:G4qKxF6or/eTPgmAolwPuRNyuci3hTUGGX1rj1YkHJY= -github.com/charmbracelet/fang v0.4.4/go.mod h1:P5/DNb9DddQ0Z0dbc0P3ol4/ix5Po7Ofr2KMBfAqoCo= -github.com/charmbracelet/huh v0.8.0 h1:Xz/Pm2h64cXQZn/Jvele4J3r7DDiqFCNIVteYukxDvY= -github.com/charmbracelet/huh v0.8.0/go.mod h1:5YVc+SlZ1IhQALxRPpkGwwEKftN/+OlJlnJYlDRFqN4= -github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834 h1:ZR7e0ro+SZZiIZD7msJyA+NjkCNNavuiPBLgerbOziE= -github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834/go.mod h1:aKC/t2arECF6rNOnaKaVU6y4t4ZeHQzqfxedE/VkVhA= -github.com/charmbracelet/ultraviolet v0.0.0-20260209111912-3cca7cf7b09b h1:jyHmbVXscPtC1S4Cg2OW1Zq3bwTJoY6/q40Ahi8CqaA= -github.com/charmbracelet/ultraviolet v0.0.0-20260209111912-3cca7cf7b09b/go.mod h1:42rCfhmE+4ZM7twEctghIzlIWyPj6FCDTBiMepHE2Ss= +github.com/charmbracelet/colorprofile v0.4.3 h1:QPa1IWkYI+AOB+fE+mg/5/4HRMZcaXex9t5KX76i20Q= +github.com/charmbracelet/colorprofile v0.4.3/go.mod h1:/zT4BhpD5aGFpqQQqw7a+VtHCzu+zrQtt1zhMt9mR4Q= +github.com/charmbracelet/ultraviolet v0.0.0-20260316091819-b93f6a3b8502 h1:hzWNs3UQRSUTS6YCbLaQnwqKBFXT5Yh1OOw6+26apqg= +github.com/charmbracelet/ultraviolet v0.0.0-20260316091819-b93f6a3b8502/go.mod h1:mkUCcxn9w9j89JJp3pOza5tmDQZPgIB75UfmQlFYvas= github.com/charmbracelet/x/ansi v0.11.6 h1:GhV21SiDz/45W9AnV2R61xZMRri5NlLnl6CVF7ihZW8= github.com/charmbracelet/x/ansi v0.11.6/go.mod h1:2JNYLgQUsyqaiLovhU2Rv/pb8r6ydXKS3NIttu3VGZQ= -github.com/charmbracelet/x/cellbuf v0.0.15 h1:ur3pZy0o6z/R7EylET877CBxaiE1Sp1GMxoFPAIztPI= -github.com/charmbracelet/x/cellbuf v0.0.15/go.mod h1:J1YVbR7MUuEGIFPCaaZ96KDl5NoS0DAWkskup+mOY+Q= -github.com/charmbracelet/x/conpty v0.1.0 h1:4zc8KaIcbiL4mghEON8D72agYtSeIgq8FSThSPQIb+U= -github.com/charmbracelet/x/conpty v0.1.0/go.mod h1:rMFsDJoDwVmiYM10aD4bH2XiRgwI7NYJtQgl5yskjEQ= +github.com/charmbracelet/x/conpty v0.1.1 h1:s1bUxjoi7EpqiXysVtC+a8RrvPPNcNvAjfi4jxsAuEs= +github.com/charmbracelet/x/conpty v0.1.1/go.mod h1:OmtR77VODEFbiTzGE9G1XiRJAga6011PIm4u5fTNZpk= github.com/charmbracelet/x/errors v0.0.0-20240508181413-e8d8b6e2de86 h1:JSt3B+U9iqk37QUU2Rvb6DSBYRLtWqFqfxf8l5hOZUA= github.com/charmbracelet/x/errors v0.0.0-20240508181413-e8d8b6e2de86/go.mod h1:2P0UgXMEa6TsToMSuFqKFQR+fZTO9CNGUNokkPatT/0= -github.com/charmbracelet/x/exp/charmtone v0.0.0-20260209194814-eeb2896ac759 h1:U0li+kYsNefPhJPP9SfwQJNbQ58iXWRtidnj1Rqf//g= -github.com/charmbracelet/x/exp/charmtone v0.0.0-20260209194814-eeb2896ac759/go.mod h1:nsExn0DGyX0lh9LwLHTn2Gg+hafdzfSXnC+QmEJTZFY= +github.com/charmbracelet/x/exp/charmtone v0.0.0-20260316093931-f2fb44ab3145 h1:btzh82+J19XPOKCSIBuEGmfFVnSb6UNIg1xAkrUeeAU= +github.com/charmbracelet/x/exp/charmtone v0.0.0-20260316093931-f2fb44ab3145/go.mod h1:nsExn0DGyX0lh9LwLHTn2Gg+hafdzfSXnC+QmEJTZFY= github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f h1:pk6gmGpCE7F3FcjaOEKYriCvpmIN4+6OS/RD0vm4uIA= github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f/go.mod h1:IfZAMTHB6XkZSeXUqriemErjAWCCzT0LwjKFYCZyw0I= +github.com/charmbracelet/x/exp/ordered v0.1.0 h1:55/qLwjIh0gL0Vni+QAWk7T/qRVP6sBf+2agPBgnOFE= +github.com/charmbracelet/x/exp/ordered v0.1.0/go.mod h1:5UHwmG+is5THxMyCJHNPCn2/ecI07aKNrW+LcResjJ8= github.com/charmbracelet/x/exp/strings v0.1.0 h1:i69S2XI7uG1u4NLGeJPSYU++Nmjvpo9nwd6aoEm7gkA= github.com/charmbracelet/x/exp/strings v0.1.0/go.mod h1:/ehtMPNh9K4odGFkqYJKpIYyePhdp1hLBRvyY4bWkH8= github.com/charmbracelet/x/term v0.2.2 h1:xVRT/S2ZcKdhhOuSP4t5cLi5o+JxklsoEObBSgfgZRk= @@ -64,16 +60,16 @@ github.com/charmbracelet/x/termios v0.1.1 h1:o3Q2bT8eqzGnGPOYheoYS8eEleT5ZVNYNy8 github.com/charmbracelet/x/termios v0.1.1/go.mod h1:rB7fnv1TgOPOyyKRJ9o+AsTU/vK5WHJ2ivHeut/Pcwo= github.com/charmbracelet/x/windows v0.2.2 h1:IofanmuvaxnKHuV04sC0eBy/smG6kIKrWG2/jYn2GuM= github.com/charmbracelet/x/windows v0.2.2/go.mod h1:/8XtdKZzedat74NQFn0NGlGL4soHB0YQZrETF96h75k= -github.com/charmbracelet/x/xpty v0.1.2 h1:Pqmu4TEJ8KeA9uSkISKMU3f+C1F6OGBn8ABuGlqCbtI= -github.com/charmbracelet/x/xpty v0.1.2/go.mod h1:XK2Z0id5rtLWcpeNiMYBccNNBrP2IJnzHI0Lq13Xzq4= +github.com/charmbracelet/x/xpty v0.1.3 h1:eGSitii4suhzrISYH50ZfufV3v085BXQwIytcOdFSsw= +github.com/charmbracelet/x/xpty v0.1.3/go.mod h1:poPYpWuLDBFCKmKLDnhBp51ATa0ooD8FhypRwEFtH3Y= github.com/cli/browser v1.3.0 h1:LejqCrpWr+1pRqmEPDGnTZOjsMe7sehifLynZJuqJpo= github.com/cli/browser v1.3.0/go.mod h1:HH8s+fOAxjhQoBUAsKuPCbqUuxZDhQ2/aD+SzsEfBTk= -github.com/clipperhouse/displaywidth v0.10.0 h1:GhBG8WuerxjFQQYeuZAeVTuyxuX+UraiZGD4HJQ3Y8g= -github.com/clipperhouse/displaywidth v0.10.0/go.mod h1:XqJajYsaiEwkxOj4bowCTMcT1SgvHo9flfF3jQasdbs= -github.com/clipperhouse/uax29/v2 v2.6.0 h1:z0cDbUV+aPASdFb2/ndFnS9ts/WNXgTNNGFoKXuhpos= -github.com/clipperhouse/uax29/v2 v2.6.0/go.mod h1:Wn1g7MK6OoeDT0vL+Q0SQLDz/KpfsVRgg6W7ihQeh4g= -github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= -github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= +github.com/clipperhouse/displaywidth v0.11.0 h1:lBc6kY44VFw+TDx4I8opi/EtL9m20WSEFgwIwO+UVM8= +github.com/clipperhouse/displaywidth v0.11.0/go.mod h1:bkrFNkf81G8HyVqmKGxsPufD3JhNl3dSqnGhOoSD/o0= +github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk= +github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM= +github.com/cloudflare/circl v1.6.3 h1:9GPOhQGF9MCYUeXyMYlqTR6a5gTrgR/fBLXvUgtVcg8= +github.com/cloudflare/circl v1.6.3/go.mod h1:2eXP6Qfat4O/Yhh8BznvKnJ+uzEoTQ6jVKJRn81BiS4= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= @@ -88,28 +84,26 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= -github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= -github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= -github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= +github.com/gabriel-vasile/mimetype v1.4.13 h1:46nXokslUBsAJE/wMsp5gtO500a4F3Nkz9Ufpk2AcUM= +github.com/gabriel-vasile/mimetype v1.4.13/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c= github.com/gliderlabs/ssh v0.3.8/go.mod h1:xYoytBv1sV0aL3CavoDuJIQNURXkkfPA/wxQ1pL1fAU= github.com/go-chi/chi/v5 v5.2.5 h1:Eg4myHZBjyvJmAFjFvWgrqDTXFyOzjj7YIm3L3mu6Ug= github.com/go-chi/chi/v5 v5.2.5/go.mod h1:X7Gx4mteadT3eDOMTsXzmI4/rwUpOwBHLpAfupzFJP0= github.com/go-git/gcfg/v2 v2.0.2 h1:MY5SIIfTGGEMhdA7d7JePuVVxtKL7Hp+ApGDJAJ7dpo= github.com/go-git/gcfg/v2 v2.0.2/go.mod h1:/lv2NsxvhepuMrldsFilrgct6pxzpGdSRC13ydTLSLs= -github.com/go-git/go-billy/v6 v6.0.0-20260114122816-19306b749ecc h1:rhkjrnRkamkRC7woapp425E4CAH6RPcqsS9X8LA93IY= -github.com/go-git/go-billy/v6 v6.0.0-20260114122816-19306b749ecc/go.mod h1:X1oe0Z2qMsa9hkar3AAPuL9hu4Mi3ztXEjdqRhr6fcc= +github.com/go-git/go-billy/v6 v6.0.0-20260226131633-45bd0956d66f h1:Uvbx7nITO3Sd1GdXarX0TbyYmOaSNIJP0mm4LocEyyA= +github.com/go-git/go-billy/v6 v6.0.0-20260226131633-45bd0956d66f/go.mod h1:ZW9JC5gionMP1kv5uiaOaV23q0FFmNrVOV8VW+y/acc= github.com/go-git/go-git-fixtures/v5 v5.1.2-0.20260122163445-0622d7459a67 h1:3hutPZF+/FBjR/9MdsLJ7e1mlt9pwHgwxMW7CrbmWII= github.com/go-git/go-git-fixtures/v5 v5.1.2-0.20260122163445-0622d7459a67/go.mod h1:xKt0pNHST9tYHvbiLxSY27CQWFwgIxBJuDrOE0JvbZw= -github.com/go-git/go-git/v6 v6.0.0-20260222090600-424e9964d3a3 h1:lgm4zCVktmdFyACShxJvn/WJZgtUA7ysOKFeVD4UZpY= -github.com/go-git/go-git/v6 v6.0.0-20260222090600-424e9964d3a3/go.mod h1:B88nWzfnhTlIikoJ4d84Nc9noKS5mJoA7SgDdkt0aPU= +github.com/go-git/go-git/v6 v6.0.0-20260317113930-fb0d09929504 h1:ANi8zxy/EJBPilQZPMEG2bBzSNf9RkT0qrd5sB+ked0= +github.com/go-git/go-git/v6 v6.0.0-20260317113930-fb0d09929504/go.mod h1:DI8P0o+7Go2ainlUPsVcn9PMtEkg3umUXnxw6Kxppag= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/form/v4 v4.3.0 h1:OVttojbQv2WNCs4P+VnjPtrt/+30Ipw4890W3OaFlvk= @@ -124,23 +118,22 @@ github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPE github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/haatos/goshipit v0.0.0-20260305043009-36e5c9a2e5c6 h1:Yakj3J1ZxYCpFtBHUVkSBNA80LK/8bNrl/LA8fSvvFw= github.com/haatos/goshipit v0.0.0-20260305043009-36e5c9a2e5c6/go.mod h1:2A31H3xgQHTgNp8OlX7aliXaY3QFwtI7XHuaP8G1ZSw= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/kevinburke/ssh_config v1.5.0 h1:3cPZmE54xb5j3G5xQCjSvokqNwU2uW+3ry1+PRLSPpA= -github.com/kevinburke/ssh_config v1.5.0/go.mod h1:q2RIzfka+BXARoNexmF9gkxEX7DmvbW9P4hIVx2Kg4M= -github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= -github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= +github.com/kevinburke/ssh_config v1.6.0 h1:J1FBfmuVosPHf5GRdltRLhPJtJpTlMdKTBjRgTaQBFY= +github.com/kevinburke/ssh_config v1.6.0/go.mod h1:q2RIzfka+BXARoNexmF9gkxEX7DmvbW9P4hIVx2Kg4M= +github.com/klauspost/compress v1.18.2 h1:iiPHWW0YrcFgpBYhsA6D1+fqHssJscY/Tm/y2Uqnapk= +github.com/klauspost/compress v1.18.2/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -162,22 +155,16 @@ github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcME github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= -github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw= -github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= +github.com/mattn/go-runewidth v0.0.21 h1:jJKAZiQH+2mIinzCJIaIG9Be1+0NR+5sz/lYEEjdM8w= +github.com/mattn/go-runewidth v0.0.21/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= github.com/mattn/go-tty v0.0.3/go.mod h1:ihxohKRERHTVzN+aSVRwACLCeqIoZAWpoICkkvrWyR0= github.com/mattn/go-tty v0.0.7 h1:KJ486B6qI8+wBO7kQxYgmmEFDaFEE96JMBQ7h400N8Q= github.com/mattn/go-tty v0.0.7/go.mod h1:f2i5ZOvXBU/tCABmLmOfzLz9azMo5wdAaElRNnJKr+k= github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= -github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE= -github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= -github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= github.com/muesli/mango v0.2.0 h1:iNNc0c5VLQ6fsMgAqGQofByNUBH2Q2nEbD6TaI+5yyQ= @@ -190,8 +177,6 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/roff v0.1.0 h1:YD0lalCotmYuF5HhZliKWlIx7IEhiXeSfq7hNjFqGF8= github.com/muesli/roff v0.1.0/go.mod h1:pjAHQM9hdUUwm/krAfrLGgJkXJ+YuhtsfZ42kieB2Ig= -github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= -github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= github.com/natefinch/atomic v1.0.1 h1:ZPYKxkqQOx3KZ+RsbnP/YsgvxWQPGxjC0oBt2AhwV0A= github.com/natefinch/atomic v1.0.1/go.mod h1:N/D/ELrljoqDyT3rZrsUmtsuzvHkeB/wWjHV22AZRbM= github.com/ncruces/go-sqlite3 v0.30.5 h1:6usmTQ6khriL8oWilkAZSJM/AIpAlVL2zFrlcpDldCE= @@ -258,12 +243,14 @@ github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfS github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.mongodb.org/mongo-driver v1.17.9 h1:IexDdCuuNJ3BHrELgBlyaH9p60JXAvdzWR128q+U5tU= go.mongodb.org/mongo-driver v1.17.9/go.mod h1:LlOhpH5NUEfhxcAwG0UEkMqwYcc4JU18gtCdGudk/tQ= +go.mongodb.org/mongo-driver/v2 v2.5.0 h1:yXUhImUjjAInNcpTcAlPHiT7bIXhshCTL3jVBkF3xaE= +go.mongodb.org/mongo-driver/v2 v2.5.0/go.mod h1:yOI9kBsufol30iFsl1slpdq1I0eHPzybRWdyYUs8K/0= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= -golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= +golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4= +golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA= golang.org/x/exp v0.0.0-20260209203927-2842357ff358 h1:kpfSV7uLwKJbFSEgNhWzGSL47NDSF/5pYYQw1V0ub6c= golang.org/x/exp v0.0.0-20260209203927-2842357ff358/go.mod h1:R3t0oliuryB5eenPWl3rrQxwnNM3WTwnsRZZiXLAAW8= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -272,13 +259,13 @@ golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.50.0 h1:ucWh9eiCGyDR3vtzso0WMQinm2Dnt8cFMuQa9K33J60= -golang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM= +golang.org/x/net v0.52.0 h1:He/TN1l0e4mmR3QqHMT2Xab3Aj3L9qjbhRm78/6jrW0= +golang.org/x/net v0.52.0/go.mod h1:R1MAz7uMZxVMualyPXb+VaqGSa3LIaUqk0eEt3w36Sw= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= -golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= +golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -289,22 +276,21 @@ golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200918174421-af09f7315aff/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= -golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= +golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= -golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= +golang.org/x/term v0.41.0 h1:QCgPso/Q3RTJx2Th4bDLqML4W6iJiaXFq2/ftQF13YU= +golang.org/x/term v0.41.0/go.mod h1:3pfBgksrReYfZ5lvYM0kSO0LIkAl4Yl2bXOkKP7Ec2A= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= -golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= +golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8= +golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= diff --git a/internal/app/initializer.go b/internal/app/initializer.go index c523275..79eb8fb 100644 --- a/internal/app/initializer.go +++ b/internal/app/initializer.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/charmbracelet/huh" + "charm.land/huh/v2" ) type Initializer interface { diff --git a/internal/commands/issues/close.go b/internal/commands/issues/close.go index ce4bfcb..3dcd1f2 100644 --- a/internal/commands/issues/close.go +++ b/internal/commands/issues/close.go @@ -3,7 +3,7 @@ package issues import ( "fmt" - "github.com/charmbracelet/huh" + "charm.land/huh/v2" "github.com/spf13/cobra" ) diff --git a/internal/commands/issues/delete.go b/internal/commands/issues/delete.go index 019b3f9..c8ca2b2 100644 --- a/internal/commands/issues/delete.go +++ b/internal/commands/issues/delete.go @@ -5,8 +5,8 @@ import ( "fmt" "strings" + "charm.land/huh/v2" "github.com/LazyBachelor/LazyPM/internal/models" - "github.com/charmbracelet/huh" "github.com/spf13/cobra" ) diff --git a/internal/commands/issues/list.go b/internal/commands/issues/list.go index e9eae24..46c0167 100644 --- a/internal/commands/issues/list.go +++ b/internal/commands/issues/list.go @@ -44,12 +44,10 @@ func runGetIssuesCmd(cmd *cobra.Command, args []string) error { // Only set filter fields if the corresponding flags // were explicitly provided by the user. if cmd.Flags().Changed("status") { - s := models.Status(listFlags.status) - filter.Status = &s + filter.Status = new(models.Status(listFlags.status)) } if cmd.Flags().Changed("type") { - t := models.IssueType(listFlags.issueType) - filter.IssueType = &t + filter.IssueType = new(models.IssueType(listFlags.issueType)) } if cmd.Flags().Changed("priority") { filter.Priority = &listFlags.priority diff --git a/internal/commands/issues/root.go b/internal/commands/issues/root.go index bfae1d4..3c1e5d3 100644 --- a/internal/commands/issues/root.go +++ b/internal/commands/issues/root.go @@ -4,8 +4,8 @@ import ( "bytes" "context" + "charm.land/fang/v2" "github.com/LazyBachelor/LazyPM/internal/models" - "github.com/charmbracelet/fang" "github.com/spf13/cobra" ) diff --git a/internal/models/task.go b/internal/models/task.go index efbb145..8eaa938 100644 --- a/internal/models/task.go +++ b/internal/models/task.go @@ -3,7 +3,7 @@ package models import ( "context" - "github.com/charmbracelet/huh" + "charm.land/huh/v2" ) type Tasker interface { diff --git a/internal/storage/mongo.go b/internal/storage/mongo.go index 474b819..b00e06a 100644 --- a/internal/storage/mongo.go +++ b/internal/storage/mongo.go @@ -7,11 +7,11 @@ import ( "os" "strings" + "charm.land/huh/v2" "github.com/LazyBachelor/LazyPM/internal/models" - "github.com/charmbracelet/huh" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) type MongoStorage struct { diff --git a/internal/style/styles.go b/internal/style/styles.go index 85c8b50..5e56d2f 100644 --- a/internal/style/styles.go +++ b/internal/style/styles.go @@ -1,7 +1,7 @@ package style import ( - "github.com/charmbracelet/lipgloss" + "charm.land/lipgloss/v2" ) // Color palette diff --git a/internal/style/themes.go b/internal/style/themes.go index c6861bd..d677340 100644 --- a/internal/style/themes.go +++ b/internal/style/themes.go @@ -1,12 +1,12 @@ package style import ( - "github.com/charmbracelet/huh" - "github.com/charmbracelet/lipgloss" + "charm.land/huh/v2" + "charm.land/lipgloss/v2" ) -func HuhCenterTheme() *huh.Theme { - theme := huh.ThemeBase16() +func HuhCenterTheme() *huh.Styles { + theme := huh.ThemeBase16(true) theme.Focused.Base = lipgloss.NewStyle().Align(lipgloss.Center) diff --git a/pkg/task/questionnaire.go b/pkg/task/questionnaire.go index 369ef08..b94e318 100644 --- a/pkg/task/questionnaire.go +++ b/pkg/task/questionnaire.go @@ -1,11 +1,11 @@ package task import ( + "charm.land/bubbletea/v2" + "charm.land/huh/v2" "charm.land/lipgloss/v2" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/internal/style" - tea "github.com/charmbracelet/bubbletea" - "github.com/charmbracelet/huh" ) type Questions = models.Questions diff --git a/pkg/task/runner.go b/pkg/task/runner.go index e65f59e..a87ca7b 100644 --- a/pkg/task/runner.go +++ b/pkg/task/runner.go @@ -5,8 +5,8 @@ import ( "fmt" "log/slog" + "charm.land/bubbletea/v2" "github.com/LazyBachelor/LazyPM/internal/models" - tea "github.com/charmbracelet/bubbletea" ) type App = models.App diff --git a/pkg/task/taskui.go b/pkg/task/taskui.go index 0d50afd..0a5fbff 100644 --- a/pkg/task/taskui.go +++ b/pkg/task/taskui.go @@ -4,11 +4,11 @@ import ( "fmt" "strings" + "charm.land/bubbles/v2/key" + "charm.land/bubbletea/v2" "charm.land/lipgloss/v2" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/internal/style" - "github.com/charmbracelet/bubbles/key" - tea "github.com/charmbracelet/bubbletea" ) type TaskDetails = models.TaskDetails diff --git a/pkg/tui/components/header.go b/pkg/tui/components/header.go index 87d434d..62bde83 100644 --- a/pkg/tui/components/header.go +++ b/pkg/tui/components/header.go @@ -1,8 +1,8 @@ package components import ( + "charm.land/lipgloss/v2" "github.com/LazyBachelor/LazyPM/pkg/tui/styles" - "github.com/charmbracelet/lipgloss" ) type Header struct { diff --git a/pkg/tui/components/helpbar.go b/pkg/tui/components/helpbar.go index c413784..1facdc9 100644 --- a/pkg/tui/components/helpbar.go +++ b/pkg/tui/components/helpbar.go @@ -1,8 +1,8 @@ package components import ( + "charm.land/lipgloss/v2" "github.com/LazyBachelor/LazyPM/pkg/tui/styles" - "github.com/charmbracelet/lipgloss" ) type ViewKind int diff --git a/pkg/tui/components/issue_detail.go b/pkg/tui/components/issue_detail.go index 9d15b65..5a3430d 100644 --- a/pkg/tui/components/issue_detail.go +++ b/pkg/tui/components/issue_detail.go @@ -3,10 +3,10 @@ package components import ( "time" + "charm.land/bubbles/v2/viewport" + "charm.land/lipgloss/v2" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/pkg/tui/styles" - "github.com/charmbracelet/bubbles/viewport" - "github.com/charmbracelet/lipgloss" ) type IssueDetail struct { @@ -23,7 +23,6 @@ func NewIssueDetail() IssueDetail { } } - func (i *IssueDetail) SetIssue(issue models.Issue) { i.issue = issue i.refreshContent() @@ -35,7 +34,6 @@ func (i *IssueDetail) SetComments(comments []*models.Comment) { i.refreshContent() } - func (i *IssueDetail) SetSize(width, height int) { i.viewport.Height = height i.viewport.Width = width diff --git a/pkg/tui/components/issue_list.go b/pkg/tui/components/issue_list.go index da81d08..47d63b7 100644 --- a/pkg/tui/components/issue_list.go +++ b/pkg/tui/components/issue_list.go @@ -6,18 +6,17 @@ import ( "io" "sort" + "charm.land/bubbles/v2/list" + "charm.land/bubbles/v2/textarea" + "charm.land/bubbles/v2/textinput" + "charm.land/bubbletea/v2" + "charm.land/lipgloss/v2" "github.com/LazyBachelor/LazyPM/internal/app" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/pkg/tui/styles" - "github.com/charmbracelet/bubbles/list" - "github.com/charmbracelet/bubbles/textarea" - "github.com/charmbracelet/bubbles/textinput" - tea "github.com/charmbracelet/bubbletea" - "github.com/charmbracelet/lipgloss" "github.com/muesli/reflow/truncate" ) - type IssueList struct { list list.Model app *app.App @@ -26,7 +25,6 @@ type IssueList struct { highlightSelected bool } - type ListIssue struct { models.Issue } @@ -157,7 +155,6 @@ func ListenForValidation(ch chan models.ValidationFeedback) tea.Cmd { } } - func NewIssueList(app *app.App, width, height int) IssueList { // NewIssueList creates an IssueList populated from the app. issues, err := app.Issues.SearchIssues(context.Background(), "", models.IssueFilter{}) diff --git a/pkg/tui/components/keymap.go b/pkg/tui/components/keymap.go index 89ce532..e2c4092 100644 --- a/pkg/tui/components/keymap.go +++ b/pkg/tui/components/keymap.go @@ -1,6 +1,6 @@ package components -import "github.com/charmbracelet/bubbles/key" +import "charm.land/bubbles/v2/key" // CommonKeyMap holds the key bindings shared between the issues dashboard // and the kanban board. @@ -82,4 +82,3 @@ func DefaultCommonKeyMap() CommonKeyMap { ), } } - diff --git a/pkg/tui/components/modals.go b/pkg/tui/components/modals.go index 5eee8d7..156d561 100644 --- a/pkg/tui/components/modals.go +++ b/pkg/tui/components/modals.go @@ -1,9 +1,9 @@ package components import ( + "charm.land/lipgloss/v2" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/pkg/tui/styles" - "github.com/charmbracelet/lipgloss" ) // modalBoxWidth returns a clamped width for modal content. Never returns a value < 1. diff --git a/pkg/tui/issues/operations.go b/pkg/tui/issues/operations.go index 6798692..823ee5f 100644 --- a/pkg/tui/issues/operations.go +++ b/pkg/tui/issues/operations.go @@ -3,22 +3,47 @@ package issues import ( "context" + "charm.land/bubbletea/v2" "github.com/LazyBachelor/LazyPM/internal/app" "github.com/LazyBachelor/LazyPM/internal/models" - tea "github.com/charmbracelet/bubbletea" ) // Msg types used by both dashboard and kanban TUI views. type ( - TitleUpdatedMsg struct{ IssueID string; Err error } - DescriptionUpdatedMsg struct{ IssueID string; Err error } - StatusUpdatedMsg struct{ IssueID string; Err error } - PriorityUpdatedMsg struct{ IssueID string; Err error } - TypeUpdatedMsg struct{ IssueID string; Err error } - AssigneeUpdatedMsg struct{ IssueID string; Err error } - SelectIssueMsg struct{ IssueID string } - CreatedMsg struct{ Issue *models.Issue; Err error } - DeletedMsg struct{ IssueID string; Err error; PreviousIndex int } + TitleUpdatedMsg struct { + IssueID string + Err error + } + DescriptionUpdatedMsg struct { + IssueID string + Err error + } + StatusUpdatedMsg struct { + IssueID string + Err error + } + PriorityUpdatedMsg struct { + IssueID string + Err error + } + TypeUpdatedMsg struct { + IssueID string + Err error + } + AssigneeUpdatedMsg struct { + IssueID string + Err error + } + SelectIssueMsg struct{ IssueID string } + CreatedMsg struct { + Issue *models.Issue + Err error + } + DeletedMsg struct { + IssueID string + Err error + PreviousIndex int + } ) // UpdateIssueTitleCmd returns a command that updates an issue's title. diff --git a/pkg/tui/styles/styles.go b/pkg/tui/styles/styles.go index 73909f3..5e6e70f 100644 --- a/pkg/tui/styles/styles.go +++ b/pkg/tui/styles/styles.go @@ -1,6 +1,6 @@ package styles -import "github.com/charmbracelet/lipgloss" +import "charm.land/lipgloss/v2" var ( Primary = lipgloss.AdaptiveColor{Light: "#5A56E0", Dark: "#7571F9"} diff --git a/pkg/tui/tui.go b/pkg/tui/tui.go index f7df2e8..34d4377 100644 --- a/pkg/tui/tui.go +++ b/pkg/tui/tui.go @@ -3,10 +3,10 @@ package tui import ( "context" + "charm.land/bubbletea/v2" "github.com/LazyBachelor/LazyPM/internal/app" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/pkg/tui/views" - tea "github.com/charmbracelet/bubbletea" ) type Config = models.Config diff --git a/pkg/tui/views/dashboard/keys.go b/pkg/tui/views/dashboard/keys.go index 0793cb8..9c7c1b3 100644 --- a/pkg/tui/views/dashboard/keys.go +++ b/pkg/tui/views/dashboard/keys.go @@ -1,10 +1,10 @@ package dashboard import ( + "charm.land/bubbles/v2/key" + "charm.land/bubbletea/v2" "github.com/LazyBachelor/LazyPM/pkg/tui/components" "github.com/LazyBachelor/LazyPM/pkg/tui/msgs" - "github.com/charmbracelet/bubbles/key" - tea "github.com/charmbracelet/bubbletea" ) type DashboardKeyMap struct { diff --git a/pkg/tui/views/dashboard/model.go b/pkg/tui/views/dashboard/model.go index bed24a1..bc75e80 100644 --- a/pkg/tui/views/dashboard/model.go +++ b/pkg/tui/views/dashboard/model.go @@ -3,12 +3,12 @@ package dashboard import ( "context" + "charm.land/bubbles/v2/textarea" + "charm.land/bubbles/v2/textinput" + "charm.land/bubbletea/v2" "github.com/LazyBachelor/LazyPM/internal/app" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/pkg/tui/components" - "github.com/charmbracelet/bubbles/textarea" - "github.com/charmbracelet/bubbles/textinput" - tea "github.com/charmbracelet/bubbletea" ) // Use shared types from components for consistency. @@ -46,21 +46,21 @@ type Model struct { deleteConfirmID string deleteConfirmIndex int - choosingStatus bool + choosingStatus bool statusIssueID string - choosingPriority bool + choosingPriority bool priorityIssueID string - choosingType bool + choosingType bool typeIssueID string - editingAssignee bool + editingAssignee bool assigneeInput textinput.Model assigneeIssueID string - addingComment bool + addingComment bool commentInput textarea.Model commentIssueID string - choosingCloseReason bool + choosingCloseReason bool closeReasonIssueID string - closingOtherReason bool + closingOtherReason bool closeReasonInput textarea.Model feedbackChan chan models.ValidationFeedback quitChan chan bool diff --git a/pkg/tui/views/dashboard/operations.go b/pkg/tui/views/dashboard/operations.go index 306d009..64fc0e6 100644 --- a/pkg/tui/views/dashboard/operations.go +++ b/pkg/tui/views/dashboard/operations.go @@ -5,12 +5,12 @@ import ( "os" "os/user" + "charm.land/bubbles/v2/list" + "charm.land/bubbletea/v2" "github.com/LazyBachelor/LazyPM/internal/app" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/pkg/tui/components" "github.com/LazyBachelor/LazyPM/pkg/tui/issues" - "github.com/charmbracelet/bubbles/list" - tea "github.com/charmbracelet/bubbletea" ) func defaultCommentAuthor() string { diff --git a/pkg/tui/views/dashboard/view.go b/pkg/tui/views/dashboard/view.go index 7824256..b26b33a 100644 --- a/pkg/tui/views/dashboard/view.go +++ b/pkg/tui/views/dashboard/view.go @@ -1,9 +1,9 @@ package dashboard import ( + "charm.land/lipgloss/v2" "github.com/LazyBachelor/LazyPM/pkg/tui/components" "github.com/LazyBachelor/LazyPM/pkg/tui/styles" - "github.com/charmbracelet/lipgloss" ) func (m *Model) View() string { diff --git a/pkg/tui/views/kanban/keys.go b/pkg/tui/views/kanban/keys.go index df8345b..03ca4e1 100644 --- a/pkg/tui/views/kanban/keys.go +++ b/pkg/tui/views/kanban/keys.go @@ -1,10 +1,10 @@ package kanban import ( + "charm.land/bubbles/v2/key" + "charm.land/bubbletea/v2" "github.com/LazyBachelor/LazyPM/pkg/tui/components" "github.com/LazyBachelor/LazyPM/pkg/tui/msgs" - "github.com/charmbracelet/bubbles/key" - tea "github.com/charmbracelet/bubbletea" ) type KanbanKeyMap struct { diff --git a/pkg/tui/views/kanban/model.go b/pkg/tui/views/kanban/model.go index 5a38984..57e371e 100644 --- a/pkg/tui/views/kanban/model.go +++ b/pkg/tui/views/kanban/model.go @@ -1,14 +1,15 @@ package kanban + import ( "context" + "charm.land/bubbles/v2/textarea" + "charm.land/bubbles/v2/textinput" + "charm.land/bubbletea/v2" "github.com/LazyBachelor/LazyPM/internal/app" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/pkg/tui/components" "github.com/LazyBachelor/LazyPM/pkg/tui/issues" - "github.com/charmbracelet/bubbles/textarea" - "github.com/charmbracelet/bubbles/textinput" - tea "github.com/charmbracelet/bubbletea" ) type ( @@ -48,15 +49,15 @@ type Model struct { deleteConfirmID string deleteConfirmIndex int - choosingStatus bool // true while choosing a status - statusIssueID string - choosingPriority bool // true while choosing a priority - priorityIssueID string - choosingType bool // true while choosing a type - typeIssueID string - editingAssignee bool // true while editing assignee - assigneeInput textinput.Model - assigneeIssueID string + choosingStatus bool // true while choosing a status + statusIssueID string + choosingPriority bool // true while choosing a priority + priorityIssueID string + choosingType bool // true while choosing a type + typeIssueID string + editingAssignee bool // true while editing assignee + assigneeInput textinput.Model + assigneeIssueID string choosingCloseReason bool // true while choosing a close reason closeReasonIssueID string closingOtherReason bool // true while entering a custom close reason @@ -70,11 +71,11 @@ type Model struct { func NewDashboard(app *app.App, feedbackChan chan models.ValidationFeedback, quitChan chan bool, submitChan chan<- struct{}) *Model { m := &Model{ - header: components.NewHeader("Kanban Board"), - keyMap: defaultKanbanKeyMap, - app: app, - width: 80, - height: 24, + header: components.NewHeader("Kanban Board"), + keyMap: defaultKanbanKeyMap, + app: app, + width: 80, + height: 24, focusedColumn: 0, focusOnDetail: false, feedbackChan: feedbackChan, @@ -261,5 +262,5 @@ func (m *Model) moveIssue(delta int) tea.Cmd { } newStatus := statusForColumn(newCol) - return issues.UpdateIssueStatusCmd(m.app, selected.ID, string(newStatus)) + return issues.UpdateIssueStatusCmd(m.app, selected.ID, string(newStatus)) } diff --git a/pkg/tui/views/kanban/operations.go b/pkg/tui/views/kanban/operations.go index db09d9f..30971f3 100644 --- a/pkg/tui/views/kanban/operations.go +++ b/pkg/tui/views/kanban/operations.go @@ -3,11 +3,11 @@ package kanban import ( "context" + "charm.land/bubbles/v2/list" + "charm.land/bubbletea/v2" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/pkg/tui/components" "github.com/LazyBachelor/LazyPM/pkg/tui/issues" - "github.com/charmbracelet/bubbles/list" - tea "github.com/charmbracelet/bubbletea" ) func (m *Model) refreshIssueListsAndSelectIssue(issueID string) tea.Cmd { diff --git a/pkg/tui/views/kanban/view.go b/pkg/tui/views/kanban/view.go index 8e6a279..3f4ec43 100644 --- a/pkg/tui/views/kanban/view.go +++ b/pkg/tui/views/kanban/view.go @@ -1,9 +1,9 @@ package kanban import ( + "charm.land/lipgloss/v2" "github.com/LazyBachelor/LazyPM/pkg/tui/components" "github.com/LazyBachelor/LazyPM/pkg/tui/styles" - "github.com/charmbracelet/lipgloss" ) func (m *Model) View() string { diff --git a/pkg/tui/views/root.go b/pkg/tui/views/root.go index 4920610..75b91d6 100644 --- a/pkg/tui/views/root.go +++ b/pkg/tui/views/root.go @@ -1,12 +1,12 @@ package views import ( + "charm.land/bubbletea/v2" "github.com/LazyBachelor/LazyPM/internal/app" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/pkg/tui/msgs" "github.com/LazyBachelor/LazyPM/pkg/tui/views/dashboard" "github.com/LazyBachelor/LazyPM/pkg/tui/views/kanban" - tea "github.com/charmbracelet/bubbletea" ) type RootModel struct { diff --git a/pkg/web/web.go b/pkg/web/web.go index c1be8d4..f49e819 100644 --- a/pkg/web/web.go +++ b/pkg/web/web.go @@ -12,13 +12,13 @@ import ( "syscall" "time" + "charm.land/bubbletea/v2" "charm.land/lipgloss/v2" "github.com/LazyBachelor/LazyPM/internal/app" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/internal/utils/browser" "github.com/LazyBachelor/LazyPM/pkg/web/handler" "github.com/LazyBachelor/LazyPM/pkg/web/server" - tea "github.com/charmbracelet/bubbletea" ) type Config = models.Config From 3e9a903506756063e38f5307df47cb3f28bda7b0 Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Wed, 18 Mar 2026 11:58:31 +0100 Subject: [PATCH 2/7] works now --- cmd/pm/intro.go | 21 ++++++++------ cmd/pm/intro_questionnare.go | 2 +- cmd/pm/runner.go | 3 +- internal/app/initializer.go | 3 +- internal/commands/issues/close.go | 5 ++-- internal/commands/issues/delete.go | 5 ++-- internal/storage/mongo.go | 11 ++++---- internal/style/themes.go | 40 +++++++++++++++++++++++++-- pkg/task/questionnaire.go | 16 ++++++++--- pkg/task/runner.go | 4 +-- pkg/task/taskui.go | 13 ++++++--- pkg/tui/components/header.go | 1 - pkg/tui/components/issue_detail.go | 19 +++++++------ pkg/tui/components/issue_list.go | 8 ------ pkg/tui/styles/styles.go | 27 ++++++++++-------- pkg/tui/tui.go | 3 +- pkg/tui/views/dashboard/keys.go | 2 +- pkg/tui/views/dashboard/operations.go | 4 +-- pkg/tui/views/dashboard/view.go | 35 +++++++++++------------ pkg/tui/views/kanban/keys.go | 2 +- pkg/tui/views/kanban/operations.go | 4 +-- pkg/tui/views/kanban/view.go | 13 +++++---- pkg/tui/views/root.go | 2 +- pkg/web/web.go | 10 ++++--- 24 files changed, 154 insertions(+), 99 deletions(-) diff --git a/cmd/pm/intro.go b/cmd/pm/intro.go index 9d23844..9353ebb 100644 --- a/cmd/pm/intro.go +++ b/cmd/pm/intro.go @@ -50,7 +50,7 @@ func newIntroModel() introModel { key.WithHelp("enter", "start survey"), ), Continue: key.NewBinding( - key.WithKeys(" ", "j", "l", "down", "right"), + key.WithKeys("space", "j", "l", "down", "right"), key.WithHelp("space", "continue"), ), Back: key.NewBinding( @@ -69,11 +69,11 @@ func newIntroModel() introModel { } func (m introModel) Run() error { - model, err := tea.NewProgram(m, tea.WithAltScreen()).Run() + model, err := tea.NewProgram(m).Run() if err != nil { return err } - if m, ok := model.(introModel); ok && m.userQuit { + if im, ok := model.(introModel); ok && im.userQuit { return models.ErrUserQuit } return nil @@ -87,7 +87,7 @@ func (m introModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.WindowSizeMsg: m.SetSize(msg.Width, msg.Height) - case tea.KeyMsg: + case tea.KeyPressMsg: switch { case key.Matches(msg, m.keys.Start) && m.stage == stages: return m, tea.Quit @@ -109,10 +109,13 @@ func (m introModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m, nil } -func (m introModel) View() string { +func (m introModel) View() tea.View { if m.width < 55 || m.height < 16 { - return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, + content := lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, style.TextStyle.Render("Terminal too small.")) + v := tea.NewView(content) + v.AltScreen = true + return v } var content string @@ -122,7 +125,7 @@ func (m introModel) View() string { case 2: content = Disclaimer default: - return "" + return tea.NewView("") } boxWidth := min(m.width-10, 120) @@ -149,7 +152,9 @@ func (m introModel) View() string { final := lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, b.String()) - return final + v := tea.NewView(final) + v.AltScreen = true + return v } func (m *introModel) SetSize(width, height int) { diff --git a/cmd/pm/intro_questionnare.go b/cmd/pm/intro_questionnare.go index d9486a9..c5bbdd2 100644 --- a/cmd/pm/intro_questionnare.go +++ b/cmd/pm/intro_questionnare.go @@ -14,7 +14,7 @@ func newIntroQuestionnaire() *IntroQuestionnaire { func (iq *IntroQuestionnaire) Run() (map[string]any, error) { model := task.NewQuestionnaireModel(iq.Questions(), iq.Keys()) - app := tea.NewProgram(model, tea.WithAltScreen()) + app := tea.NewProgram(model) m, err := app.Run() if err != nil { diff --git a/cmd/pm/runner.go b/cmd/pm/runner.go index d524ed8..0872e30 100644 --- a/cmd/pm/runner.go +++ b/cmd/pm/runner.go @@ -11,6 +11,7 @@ import ( "github.com/LazyBachelor/LazyPM/cmd/pm/tasks" "github.com/LazyBachelor/LazyPM/internal/commands/survey" "github.com/LazyBachelor/LazyPM/internal/storage" + "github.com/LazyBachelor/LazyPM/internal/style" "github.com/LazyBachelor/LazyPM/pkg/task" "github.com/spf13/cobra" ) @@ -54,7 +55,7 @@ func runStartCmd(cmd *cobra.Command, args []string) error { Title("Do you want to continue without submitting your responses?"). Description("You can fix your database connection and submit your responses later with the submit command."). Value(&continueWithoutSubmitting). - WithTheme(huh.ThemeBase16(true)). + WithTheme(style.Base16Theme{}). RunAccessible(cmd.OutOrStdout(), cmd.InOrStdin()); err != nil { return fmt.Errorf("failed to read user input: %w", err) } diff --git a/internal/app/initializer.go b/internal/app/initializer.go index 79eb8fb..a6966e2 100644 --- a/internal/app/initializer.go +++ b/internal/app/initializer.go @@ -5,6 +5,7 @@ import ( "os" "charm.land/huh/v2" + "github.com/LazyBachelor/LazyPM/internal/style" ) type Initializer interface { @@ -30,7 +31,7 @@ func (i InteractiveInitializer) Init(path string) error { Title("PM is not initialized in this directory!"). Description("Do you want to initialize it here?"). Value(&initialize), - )).WithTheme(huh.ThemeBase16()).WithAccessible(true).Run() + )).WithTheme(style.Base16Theme{}).WithAccessible(true).Run() if err != nil { return err diff --git a/internal/commands/issues/close.go b/internal/commands/issues/close.go index 3dcd1f2..59d3b95 100644 --- a/internal/commands/issues/close.go +++ b/internal/commands/issues/close.go @@ -4,6 +4,7 @@ import ( "fmt" "charm.land/huh/v2" + "github.com/LazyBachelor/LazyPM/internal/style" "github.com/spf13/cobra" ) @@ -47,13 +48,13 @@ func runCloseCmd(cmd *cobra.Command, args []string) error { huh.NewOption("Won't fix", "Won't fix"), huh.NewOption("Obsolete", "Obsolete"), huh.NewOption("Other", "Other"), - ).WithTheme(huh.ThemeBase()).Run(); err != nil { + ).WithTheme(style.BaseTheme{}).Run(); err != nil { return fmt.Errorf("error getting close reason: %w", err) } if closeReason == "Other" { if err = huh.NewInput().Value(&closeReason). - Title("Enter closing reason:").WithTheme(huh.ThemeBase()).Run(); err != nil { + Title("Enter closing reason:").WithTheme(style.BaseTheme{}).Run(); err != nil { return fmt.Errorf("error getting close reason: %w", err) } if closeReason == "" { diff --git a/internal/commands/issues/delete.go b/internal/commands/issues/delete.go index c8ca2b2..e3e9aa7 100644 --- a/internal/commands/issues/delete.go +++ b/internal/commands/issues/delete.go @@ -7,6 +7,7 @@ import ( "charm.land/huh/v2" "github.com/LazyBachelor/LazyPM/internal/models" + "github.com/LazyBachelor/LazyPM/internal/style" "github.com/spf13/cobra" ) @@ -62,7 +63,7 @@ func runDeleteCmd(cmd *cobra.Command, args []string) error { if !cmd.Flags().Changed("yes") { huh.NewConfirm().Value(&confirmDelete). Title("You want to delete this issue?"). - Inline(true).WithTheme(huh.ThemeBase()).Run() + Inline(true).WithTheme(style.BaseTheme{}).Run() } // If user did not confirm, cancel deletion. @@ -102,7 +103,7 @@ func runDeleteInteractive(ctx context.Context) error { huh.NewGroup( huh.NewMultiSelect[string](). Options(options...).Value(&deleteIDs). - Title("Select issues to delete"))).WithTheme(huh.ThemeBase()) + Title("Select issues to delete"))).WithTheme(style.BaseTheme{}) if err := form.Run(); err != nil { return fmt.Errorf("error running interactive form: %w", err) diff --git a/internal/storage/mongo.go b/internal/storage/mongo.go index b00e06a..e408386 100644 --- a/internal/storage/mongo.go +++ b/internal/storage/mongo.go @@ -9,6 +9,7 @@ import ( "charm.land/huh/v2" "github.com/LazyBachelor/LazyPM/internal/models" + "github.com/LazyBachelor/LazyPM/internal/style" "go.mongodb.org/mongo-driver/v2/bson" "go.mongodb.org/mongo-driver/v2/mongo" "go.mongodb.org/mongo-driver/v2/mongo/options" @@ -24,7 +25,7 @@ func NewMongoStorage(ctx context.Context, uri, username, password string) (*Mong Password: password, } - client, err := mongo.Connect(ctx, + client, err := mongo.Connect( options.Client().ApplyURI(uri).SetAuth(credentials)) if err != nil { @@ -44,7 +45,7 @@ func NewMongoStorageInteractive(ctx context.Context, uri string) (*MongoStorage, if err := huh.NewInput(). Title("Enter the Database Username"). Value(&username). - WithTheme(huh.ThemeBase16()).Run(); err != nil { + WithTheme(style.Base16Theme{}).Run(); err != nil { return nil, fmt.Errorf("failed to read username: %w", err) } } else { @@ -60,7 +61,7 @@ func NewMongoStorageInteractive(ctx context.Context, uri string) (*MongoStorage, Title("Enter the Survey Password"). EchoMode(huh.EchoModePassword). Value(&password). - WithTheme(huh.ThemeBase16()).Run(); err != nil { + WithTheme(style.Base16Theme{}).Run(); err != nil { return nil, fmt.Errorf("failed to read password: %w", err) } } else { @@ -110,7 +111,7 @@ func (s *MongoStorage) SubmitSurveyResponsesCmd(ctx context.Context, dir string) _, err = userStatscollection.UpdateOne(ctx, bson.M{"_id": stats.ID}, bson.M{"$set": stats}, - options.Update().SetUpsert(true)) + options.UpdateOne().SetUpsert(true)) if err != nil { return fmt.Errorf("Failed to insert stats into database: %v", err) @@ -140,7 +141,7 @@ func (s *MongoStorage) SubmitSurveyResponsesCmd(ctx context.Context, dir string) } _, err = taskMetricsCollection.UpdateOne(ctx, bson.M{"_id": metrics.ID}, bson.M{"$set": metrics}, - options.Update().SetUpsert(true)) + options.UpdateOne().SetUpsert(true)) if err != nil { fmt.Printf("failed to insert metrics from %s: %v", file, err) diff --git a/internal/style/themes.go b/internal/style/themes.go index d677340..c0e4d5f 100644 --- a/internal/style/themes.go +++ b/internal/style/themes.go @@ -5,10 +5,44 @@ import ( "charm.land/lipgloss/v2" ) -func HuhCenterTheme() *huh.Styles { - theme := huh.ThemeBase16(true) +// BaseTheme wraps huh.ThemeBase for use as a huh.Theme +type BaseTheme struct{} - theme.Focused.Base = lipgloss.NewStyle().Align(lipgloss.Center) +func (t BaseTheme) Theme(isDark bool) *huh.Styles { + return huh.ThemeBase(isDark) +} + +// Base16Theme wraps huh.ThemeBase16 for use as a huh.Theme +type Base16Theme struct{} + +func (t Base16Theme) Theme(isDark bool) *huh.Styles { + return huh.ThemeBase16(isDark) +} + +// CenterTheme is a theme that centers form content while preserving ThemeBase16 styling +type CenterTheme struct{} + +func (t CenterTheme) Theme(isDark bool) *huh.Styles { + theme := huh.ThemeBase16(isDark) + // Center the field content + theme.Focused.Base = theme.Focused.Base.Align(lipgloss.Center) + theme.Focused.Card = lipgloss.NewStyle() // Remove card border + theme.Group.Base = lipgloss.NewStyle() // Remove group padding return theme } + +// HuhCenterTheme returns a center-aligned theme for questionnaires +func HuhCenterTheme() huh.Theme { + return CenterTheme{} +} + +// HuhBaseTheme returns a base theme +func HuhBaseTheme() huh.Theme { + return BaseTheme{} +} + +// HuhBase16Theme returns a base16 theme +func HuhBase16Theme() huh.Theme { + return Base16Theme{} +} diff --git a/pkg/task/questionnaire.go b/pkg/task/questionnaire.go index b94e318..ec0e21b 100644 --- a/pkg/task/questionnaire.go +++ b/pkg/task/questionnaire.go @@ -20,7 +20,9 @@ type QuestionnaireModel struct { func NewQuestionnaireModel(questions Questions, keys []string) *QuestionnaireModel { form := huh.NewForm(questions...). - WithTheme(style.HuhCenterTheme()).WithLayout(huh.LayoutGrid(1, 1)) + WithTheme(style.HuhCenterTheme()). + WithLayout(huh.LayoutGrid(1, 1)). + WithWidth(80) return &QuestionnaireModel{ Questions: questions, @@ -37,7 +39,9 @@ func (q *QuestionnaireModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.WindowSizeMsg: q.SetSize(msg.Width, msg.Height) - case tea.KeyMsg: + // Update form width to match window + q.form.WithWidth(msg.Width) + case tea.KeyPressMsg: switch msg.String() { case "q", "ctrl+c": q.userQuit = true @@ -57,14 +61,18 @@ func (q *QuestionnaireModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return q, cmd } -func (q *QuestionnaireModel) View() string { +func (q *QuestionnaireModel) View() tea.View { form := lipgloss.NewStyle(). Width(q.width).Align(lipgloss.Center). Render(q.form.View()) - return lipgloss.Place( + content := lipgloss.Place( q.width, q.height, lipgloss.Center, lipgloss.Center, form, ) + + v := tea.NewView(content) + v.AltScreen = true + return v } func (q *QuestionnaireModel) SetSize(width, height int) { diff --git a/pkg/task/runner.go b/pkg/task/runner.go index a87ca7b..5aeae15 100644 --- a/pkg/task/runner.go +++ b/pkg/task/runner.go @@ -157,7 +157,7 @@ func (r *RunLifecycle) Finish(ctx context.Context, runErr error) error { } func runIntro(details models.TaskDetails) error { - model, err := tea.NewProgram(NewTaskModel(details), tea.WithAltScreen()).Run() + model, err := tea.NewProgram(NewTaskModel(details)).Run() if err != nil { return err } @@ -179,7 +179,7 @@ func runQuestionnaire(t Tasker, iType InterfaceType, collector *taskRunCollector keys = provider.QuestionnaireKeys(iType) } - model, err := tea.NewProgram(NewQuestionnaireModel(questions, keys), tea.WithAltScreen()).Run() + model, err := tea.NewProgram(NewQuestionnaireModel(questions, keys)).Run() if err != nil { return err } diff --git a/pkg/task/taskui.go b/pkg/task/taskui.go index 0a5fbff..d5fb921 100644 --- a/pkg/task/taskui.go +++ b/pkg/task/taskui.go @@ -57,7 +57,7 @@ func (m TaskModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.WindowSizeMsg: m.SetSize(msg.Width, msg.Height) - case tea.KeyMsg: + case tea.KeyPressMsg: switch { case key.Matches(msg, m.keys.Quit): m.userQuit = true @@ -73,10 +73,13 @@ func (m TaskModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m, nil } -func (m TaskModel) View() string { +func (m TaskModel) View() tea.View { if m.width < 55 || m.height < 16 { - return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, + content := lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, style.TextStyle.Render("Terminal too small.")) + v := tea.NewView(content) + v.AltScreen = true + return v } boxWidth := min(m.width-10, 120) @@ -111,7 +114,9 @@ func (m TaskModel) View() string { final := lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, b.String()) - return final + v := tea.NewView(final) + v.AltScreen = true + return v } func (m *TaskModel) SetSize(width, height int) { diff --git a/pkg/tui/components/header.go b/pkg/tui/components/header.go index 62bde83..c5d625b 100644 --- a/pkg/tui/components/header.go +++ b/pkg/tui/components/header.go @@ -21,7 +21,6 @@ func (h Header) View(width int) string { lipgloss.Left, title, lipgloss.WithWhitespaceChars("─"), - lipgloss.WithWhitespaceForeground(styles.Primary), ) } diff --git a/pkg/tui/components/issue_detail.go b/pkg/tui/components/issue_detail.go index 5a3430d..11def7a 100644 --- a/pkg/tui/components/issue_detail.go +++ b/pkg/tui/components/issue_detail.go @@ -17,7 +17,7 @@ type IssueDetail struct { } func NewIssueDetail() IssueDetail { - vp := viewport.New(0, 0) + vp := viewport.New(viewport.WithWidth(0), viewport.WithHeight(0)) return IssueDetail{ viewport: vp, } @@ -35,8 +35,7 @@ func (i *IssueDetail) SetComments(comments []*models.Comment) { } func (i *IssueDetail) SetSize(width, height int) { - i.viewport.Height = height - i.viewport.Width = width + i.viewport = viewport.New(viewport.WithWidth(width), viewport.WithHeight(height)) i.refreshContent() } @@ -102,19 +101,21 @@ func formatCommentTime(t time.Time) string { func (i IssueDetail) View() string { content := i.viewport.View() + vpWidth := i.viewport.Width() + vpHeight := i.viewport.Height() if i.focused { return styles.DetailsContainerStyle. BorderForeground(styles.PrimaryBorder). - Width(i.viewport.Width). - Height(i.viewport.Height). - MaxHeight(i.viewport.Height). + Width(vpWidth). + Height(vpHeight). + MaxHeight(vpHeight). Render(content) } return styles.DetailsContainerStyle. - Width(i.viewport.Width). - Height(i.viewport.Height). - MaxHeight(i.viewport.Height). + Width(vpWidth). + Height(vpHeight). + MaxHeight(vpHeight). Render(content) } diff --git a/pkg/tui/components/issue_list.go b/pkg/tui/components/issue_list.go index 47d63b7..087a5c3 100644 --- a/pkg/tui/components/issue_list.go +++ b/pkg/tui/components/issue_list.go @@ -177,10 +177,6 @@ func NewIssueList(app *app.App, width, height int) IssueList { l.SetShowHelp(false) l.SetShowStatusBar(false) l.SetFilteringEnabled(true) - l.FilterInput.PromptStyle = styles.FilterPromptStyle - l.FilterInput.Cursor.Style = styles.FilterStyle - l.FilterInput.TextStyle = styles.FilterInputStyle - l.FilterInput.Prompt = "🔍 " return IssueList{ list: l, @@ -208,10 +204,6 @@ func NewIssueListFromIssues(app *app.App, issues []*models.Issue, width, height l.SetShowHelp(false) l.SetShowStatusBar(false) l.SetFilteringEnabled(true) - l.FilterInput.PromptStyle = styles.FilterPromptStyle - l.FilterInput.Cursor.Style = styles.FilterStyle - l.FilterInput.TextStyle = styles.FilterInputStyle - l.FilterInput.Prompt = "🔍 " return IssueList{ list: l, app: app, diff --git a/pkg/tui/styles/styles.go b/pkg/tui/styles/styles.go index 5e6e70f..4f2af0f 100644 --- a/pkg/tui/styles/styles.go +++ b/pkg/tui/styles/styles.go @@ -1,23 +1,26 @@ package styles -import "charm.land/lipgloss/v2" +import ( + "charm.land/lipgloss/v2" + "charm.land/lipgloss/v2/compat" +) var ( - Primary = lipgloss.AdaptiveColor{Light: "#5A56E0", Dark: "#7571F9"} - Secondary = lipgloss.AdaptiveColor{Light: "#02BA84", Dark: "#02BF87"} + Primary = compat.AdaptiveColor{Light: lipgloss.Color("#5A56E0"), Dark: lipgloss.Color("#7571F9")} + Secondary = compat.AdaptiveColor{Light: lipgloss.Color("#02BA84"), Dark: lipgloss.Color("#02BF87")} - Success = lipgloss.AdaptiveColor{Light: "#02BA84", Dark: "#02BF87"} - Warning = lipgloss.AdaptiveColor{Light: "#F59E0B", Dark: "#F59E0B"} - Error = lipgloss.AdaptiveColor{Light: "#FE5F86", Dark: "#FE5F86"} + Success = compat.AdaptiveColor{Light: lipgloss.Color("#02BA84"), Dark: lipgloss.Color("#02BF87")} + Warning = compat.AdaptiveColor{Light: lipgloss.Color("#F59E0B"), Dark: lipgloss.Color("#F59E0B")} + Error = compat.AdaptiveColor{Light: lipgloss.Color("#FE5F86"), Dark: lipgloss.Color("#FE5F86")} - PrimaryText = lipgloss.AdaptiveColor{Light: "#1A1A1A", Dark: "#E0E0E0"} - SecondaryText = lipgloss.AdaptiveColor{Light: "#666666", Dark: "#999999"} - FaintText = lipgloss.AdaptiveColor{Light: "#999999", Dark: "#666666"} + PrimaryText = compat.AdaptiveColor{Light: lipgloss.Color("#1A1A1A"), Dark: lipgloss.Color("#E0E0E0")} + SecondaryText = compat.AdaptiveColor{Light: lipgloss.Color("#666666"), Dark: lipgloss.Color("#999999")} + FaintText = compat.AdaptiveColor{Light: lipgloss.Color("#999999"), Dark: lipgloss.Color("#666666")} - PrimaryBorder = lipgloss.AdaptiveColor{Light: "#5A56E0", Dark: "#7571F9"} - SecondaryBorder = lipgloss.AdaptiveColor{Light: "#CCCCCC", Dark: "#444444"} + PrimaryBorder = compat.AdaptiveColor{Light: lipgloss.Color("#5A56E0"), Dark: lipgloss.Color("#7571F9")} + SecondaryBorder = compat.AdaptiveColor{Light: lipgloss.Color("#CCCCCC"), Dark: lipgloss.Color("#444444")} - SelectedBackground = lipgloss.AdaptiveColor{Light: "#E8E8E8", Dark: "#333333"} + SelectedBackground = compat.AdaptiveColor{Light: lipgloss.Color("#E8E8E8"), Dark: lipgloss.Color("#333333")} ) const ( diff --git a/pkg/tui/tui.go b/pkg/tui/tui.go index 34d4377..faafc0a 100644 --- a/pkg/tui/tui.go +++ b/pkg/tui/tui.go @@ -30,8 +30,7 @@ func (t *Tui) Run(ctx context.Context, config Config) error { defer cleanup() - p := tea.NewProgram(views.NewRootView(app, t.feedbackChan, t.quitChan, t.submitChan), - tea.WithAltScreen(), tea.WithMouseAllMotion()) + p := tea.NewProgram(views.NewRootView(app, t.feedbackChan, t.quitChan, t.submitChan)) if t.quitChan != nil { go func() { diff --git a/pkg/tui/views/dashboard/keys.go b/pkg/tui/views/dashboard/keys.go index 9c7c1b3..0d159e3 100644 --- a/pkg/tui/views/dashboard/keys.go +++ b/pkg/tui/views/dashboard/keys.go @@ -79,7 +79,7 @@ var defaultDashboardKeyMap = DashboardKeyMap{ ), } -func (d *Model) handleKeyMsg(msg tea.KeyMsg) tea.Cmd { +func (d *Model) handleKeyPressMsg(msg tea.KeyPressMsg) tea.Cmd { var cmd tea.Cmd switch { diff --git a/pkg/tui/views/dashboard/operations.go b/pkg/tui/views/dashboard/operations.go index 64fc0e6..2db5467 100644 --- a/pkg/tui/views/dashboard/operations.go +++ b/pkg/tui/views/dashboard/operations.go @@ -322,7 +322,7 @@ func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return issues.SelectIssueMsg{IssueID: selectedIssue.ID} }) - case tea.KeyMsg: + case tea.KeyPressMsg: if m.confirmingDelete { switch msg.String() { case "y", "Y": @@ -619,7 +619,7 @@ func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m, nil } - cmd := m.handleKeyMsg(msg) + cmd := m.handleKeyPressMsg(msg) if cmd != nil { return m, cmd } diff --git a/pkg/tui/views/dashboard/view.go b/pkg/tui/views/dashboard/view.go index b26b33a..569cff7 100644 --- a/pkg/tui/views/dashboard/view.go +++ b/pkg/tui/views/dashboard/view.go @@ -1,15 +1,16 @@ package dashboard import ( + "charm.land/bubbletea/v2" "charm.land/lipgloss/v2" "github.com/LazyBachelor/LazyPM/pkg/tui/components" "github.com/LazyBachelor/LazyPM/pkg/tui/styles" ) -func (m *Model) View() string { +func (m *Model) View() tea.View { if m.width == 0 || m.height == 0 { // if there is no space just print a loading message - return "Loading..." + return tea.NewView("Loading...") } m.helpBar.SetWidth(m.width) @@ -63,7 +64,7 @@ func (m *Model) View() string { if m.editingAssignee { editBoxWidth := min(60, m.width-4) - m.assigneeInput.Width = editBoxWidth - 2 + m.assigneeInput.SetWidth(editBoxWidth - 2) editContent := lipgloss.JoinVertical(lipgloss.Left, styles.LabelStyle.Render("Edit assignee (Enter to save, Esc to cancel):"), m.assigneeInput.View(), @@ -72,12 +73,12 @@ func (m *Model) View() string { Width(editBoxWidth). BorderForeground(styles.PrimaryBorder). Render(editContent) - return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, editBox) + return tea.NewView(lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, editBox)) } if m.editingTitle { editBoxWidth := min(60, m.width-4) - m.titleInput.Width = editBoxWidth - 2 + m.titleInput.SetWidth(editBoxWidth - 2) editContent := lipgloss.JoinVertical(lipgloss.Left, styles.LabelStyle.Render("Edit title (Enter to save, Esc to cancel):"), m.titleInput.View(), @@ -86,7 +87,7 @@ func (m *Model) View() string { Width(editBoxWidth). BorderForeground(styles.PrimaryBorder). Render(editContent) - return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, editBox) + return tea.NewView(lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, editBox)) } if m.addingComment { @@ -101,7 +102,7 @@ func (m *Model) View() string { Width(editBoxWidth). BorderForeground(styles.PrimaryBorder). Render(editContent) - return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, editBox) + return tea.NewView(lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, editBox)) } if m.editingDescription { @@ -116,12 +117,12 @@ func (m *Model) View() string { Width(editBoxWidth). BorderForeground(styles.PrimaryBorder). Render(editContent) - return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, editBox) + return tea.NewView(lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, editBox)) } if m.creatingIssue { createBoxWidth := min(60, m.width-4) - m.createTitleInput.Width = createBoxWidth - 2 + m.createTitleInput.SetWidth(createBoxWidth - 2) createContent := lipgloss.JoinVertical(lipgloss.Left, styles.LabelStyle.Render("New issue (Enter to create, Esc to cancel):"), m.createTitleInput.View(), @@ -130,7 +131,7 @@ func (m *Model) View() string { Width(createBoxWidth). BorderForeground(styles.PrimaryBorder). Render(createContent) - return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, createBox) + return tea.NewView(lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, createBox)) } if m.confirmingDelete { @@ -143,7 +144,7 @@ func (m *Model) View() string { Width(confirmBoxWidth). BorderForeground(styles.PrimaryBorder). Render(confirmContent) - return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, confirmBox) + return tea.NewView(lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, confirmBox)) } if m.choosingStatus { @@ -157,7 +158,7 @@ func (m *Model) View() string { Width(statusBoxWidth). BorderForeground(styles.PrimaryBorder). Render(statusContent) - return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, statusBox) + return tea.NewView(lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, statusBox)) } if m.choosingPriority { @@ -171,7 +172,7 @@ func (m *Model) View() string { Width(priorityBoxWidth). BorderForeground(styles.PrimaryBorder). Render(priorityContent) - return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, priorityBox) + return tea.NewView(lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, priorityBox)) } if m.choosingCloseReason { @@ -185,7 +186,7 @@ func (m *Model) View() string { Width(reasonBoxWidth). BorderForeground(styles.PrimaryBorder). Render(reasonContent) - return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, reasonBox) + return tea.NewView(lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, reasonBox)) } if m.closingOtherReason { @@ -200,7 +201,7 @@ func (m *Model) View() string { Width(editBoxWidth). BorderForeground(styles.PrimaryBorder). Render(editContent) - return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, editBox) + return tea.NewView(lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, editBox)) } if m.choosingType { @@ -214,9 +215,9 @@ func (m *Model) View() string { Width(typeBoxWidth). BorderForeground(styles.PrimaryBorder). Render(typeContent) - return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, typeBox) + return tea.NewView(lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, typeBox)) } - return mainView + return tea.NewView(mainView) } diff --git a/pkg/tui/views/kanban/keys.go b/pkg/tui/views/kanban/keys.go index 03ca4e1..bd78dbe 100644 --- a/pkg/tui/views/kanban/keys.go +++ b/pkg/tui/views/kanban/keys.go @@ -45,7 +45,7 @@ var defaultKanbanKeyMap = KanbanKeyMap{ ), } -func (d *Model) handleKeyMsg(msg tea.KeyMsg) tea.Cmd { +func (d *Model) handleKeyPressMsg(msg tea.KeyPressMsg) tea.Cmd { var cmd tea.Cmd switch { diff --git a/pkg/tui/views/kanban/operations.go b/pkg/tui/views/kanban/operations.go index 30971f3..144e144 100644 --- a/pkg/tui/views/kanban/operations.go +++ b/pkg/tui/views/kanban/operations.go @@ -258,7 +258,7 @@ func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return issues.SelectIssueMsg{IssueID: selectedIssue.ID} }) - case tea.KeyMsg: + case tea.KeyPressMsg: if m.confirmingDelete { switch msg.String() { case "y", "Y": @@ -499,7 +499,7 @@ func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m, nil } - cmd := m.handleKeyMsg(msg) + cmd := m.handleKeyPressMsg(msg) if cmd != nil { return m, cmd } diff --git a/pkg/tui/views/kanban/view.go b/pkg/tui/views/kanban/view.go index 3f4ec43..4b0d38e 100644 --- a/pkg/tui/views/kanban/view.go +++ b/pkg/tui/views/kanban/view.go @@ -1,15 +1,16 @@ package kanban import ( + "charm.land/bubbletea/v2" "charm.land/lipgloss/v2" "github.com/LazyBachelor/LazyPM/pkg/tui/components" "github.com/LazyBachelor/LazyPM/pkg/tui/styles" ) -func (m *Model) View() string { +func (m *Model) View() tea.View { if m.width == 0 || m.height == 0 { // if there is no space just print a loading message - return "Loading..." + return tea.NewView("Loading...") } m.helpBar.SetWidth(m.width) @@ -93,7 +94,7 @@ func (m *Model) View() string { Width(reasonBoxWidth). BorderForeground(styles.PrimaryBorder). Render(reasonContent) - return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, reasonBox) + return tea.NewView(lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, reasonBox)) } if m.closingOtherReason { @@ -108,10 +109,10 @@ func (m *Model) View() string { Width(editBoxWidth). BorderForeground(styles.PrimaryBorder). Render(editContent) - return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, editBox) + return tea.NewView(lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, editBox)) } - return components.RenderModals( + return tea.NewView(components.RenderModals( m.width, m.height, m.editingTitle, @@ -131,7 +132,7 @@ func (m *Model) View() string { m.editingAssignee, m.assigneeInput.View(), mainView, - ) + )) } diff --git a/pkg/tui/views/root.go b/pkg/tui/views/root.go index 75b91d6..ea51efa 100644 --- a/pkg/tui/views/root.go +++ b/pkg/tui/views/root.go @@ -81,6 +81,6 @@ func (r *RootModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return r, cmd } -func (r *RootModel) View() string { +func (r *RootModel) View() tea.View { return r.currentView.View() } diff --git a/pkg/web/web.go b/pkg/web/web.go index f49e819..42fcd3a 100644 --- a/pkg/web/web.go +++ b/pkg/web/web.go @@ -54,7 +54,7 @@ func (m tuiModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { m.width = msg.Width m.height = msg.Height return m, nil - case tea.KeyMsg: + case tea.KeyPressMsg: switch msg.String() { case "q", "esc", "ctrl+c": select { @@ -69,11 +69,14 @@ func (m tuiModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m, nil } -func (m tuiModel) View() string { - return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, fmt.Sprintf( +func (m tuiModel) View() tea.View { + content := lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, fmt.Sprintf( "Web server running at %s\n\nPress q, esc, or Ctrl+C to stop the task and server.\n", m.address, )) + v := tea.NewView(content) + v.AltScreen = true + return v } func (w *Web) Run(ctx context.Context, config Config) error { @@ -106,7 +109,6 @@ func (w *Web) Run(ctx context.Context, config Config) error { address: address, quitChan: uiQuitChan, }, - tea.WithAltScreen(), ) screenDone = make(chan struct{}) From 2ebb8be83bef87923bfa128996e805815c791ddb Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Wed, 18 Mar 2026 14:31:36 +0100 Subject: [PATCH 3/7] make sure to use alt screen --- pkg/tui/views/root.go | 4 +++- pkg/tui/views/views.go | 12 ------------ 2 files changed, 3 insertions(+), 13 deletions(-) delete mode 100644 pkg/tui/views/views.go diff --git a/pkg/tui/views/root.go b/pkg/tui/views/root.go index ea51efa..fc8118d 100644 --- a/pkg/tui/views/root.go +++ b/pkg/tui/views/root.go @@ -82,5 +82,7 @@ func (r *RootModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } func (r *RootModel) View() tea.View { - return r.currentView.View() + v := r.currentView.View() + v.AltScreen = true + return v } diff --git a/pkg/tui/views/views.go b/pkg/tui/views/views.go deleted file mode 100644 index e26dbd7..0000000 --- a/pkg/tui/views/views.go +++ /dev/null @@ -1,12 +0,0 @@ -package views - -import ( - "github.com/LazyBachelor/LazyPM/internal/app" - "github.com/LazyBachelor/LazyPM/internal/models" - "github.com/LazyBachelor/LazyPM/pkg/tui/views/dashboard" -) - -func NewDashboardView(app *app.App, feedbackChan chan models.ValidationFeedback, quitChan chan bool, submitChan chan<- struct{}) *dashboard.Model { - return dashboard.NewDashboard(app, feedbackChan, quitChan, submitChan) -} - From 08d9f741ea5dfc76f4a2f2b03841c92f82d6f414 Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Wed, 18 Mar 2026 14:51:34 +0100 Subject: [PATCH 4/7] update workflows to go 1.26.1 --- .github/workflows/go.yml | 2 +- .github/workflows/goreleaser.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index a5f81ca..09a859d 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.25.6' + go-version: '1.26.1' - name: Build run: go build -v ./... diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index b05894e..3357045 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -21,7 +21,7 @@ jobs: name: Set up Go uses: actions/setup-go@v6 with: - go-version: '1.25.6' + go-version: '1.26.1' - name: Run GoReleaser uses: goreleaser/goreleaser-action@v7 From ed018b53965292a97cd7a833f372e8bd1636de96 Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Wed, 18 Mar 2026 14:55:42 +0100 Subject: [PATCH 5/7] update dockerfile to latest go version --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7a732b4..8fb89a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM golang:1.25.6-alpine AS builder +FROM --platform=$BUILDPLATFORM golang:1.26.1-alpine AS builder WORKDIR /app RUN apk add --no-cache git ca-certificates tzdata From 720be210c35252b4478305b0bc1c88d17d8ca25a Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Wed, 18 Mar 2026 15:00:15 +0100 Subject: [PATCH 6/7] add commands to start tui and web --- cmd/pm/init.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/cmd/pm/init.go b/cmd/pm/init.go index fe69b17..5a6fcfb 100644 --- a/cmd/pm/init.go +++ b/cmd/pm/init.go @@ -104,6 +104,8 @@ func init() { RootCmd.AddGroup(&cobra.Group{ID: "other", Title: "Additional Commands"}) RootCmd.SetHelpCommandGroupID("other") RootCmd.AddCommand(replCmd) + RootCmd.AddCommand(tuiCmd) + RootCmd.AddCommand(webCmd) } @@ -117,6 +119,26 @@ var replCmd = &cobra.Command{ }, } +var tuiCmd = &cobra.Command{ + Use: "tui", + GroupID: "other", + Short: "Start the interactive TUI interface", + Long: `Start the interactive Terminal User Interface (TUI) for managing your projects and issues in an interactive terminal environment.`, + RunE: func(cmd *cobra.Command, args []string) error { + return tui.New().Run(cmd.Context(), App.Config) + }, +} + +var webCmd = &cobra.Command{ + Use: "web", + GroupID: "other", + Short: "Start the interactive web interface", + Long: `Start the interactive web interface for managing your projects and issues in a web browser.`, + RunE: func(cmd *cobra.Command, args []string) error { + return web.New().Run(cmd.Context(), App.Config) + }, +} + func initializeApp(ctx context.Context) (*app.App, func(), error) { return app.New(ctx, tasks.BaseConfig().WithAutoInit(true)) } From 2510429a7f150d73ae8d5024a8a31ee637f7c8ef Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Wed, 18 Mar 2026 15:20:16 +0100 Subject: [PATCH 7/7] upgrade mongodb driver dep --- go.mod | 1 - go.sum | 2 -- internal/app/app.go | 4 ++-- internal/app/statistics.go | 6 +++--- internal/models/app.go | 4 ++-- internal/models/statistics.go | 22 +++++++++++----------- pkg/task/lifecycle.go | 4 ++-- pkg/task/metrics_store.go | 8 ++++---- pkg/web/handler/issues.go | 8 ++++---- 9 files changed, 28 insertions(+), 31 deletions(-) diff --git a/go.mod b/go.mod index ee97108..823223e 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,6 @@ require ( github.com/joho/godotenv v1.5.1 github.com/muesli/reflow v0.3.0 github.com/steveyegge/beads v0.49.6 - go.mongodb.org/mongo-driver v1.17.9 go.mongodb.org/mongo-driver/v2 v2.5.0 ) diff --git a/go.sum b/go.sum index 18ba4da..1dc87ce 100644 --- a/go.sum +++ b/go.sum @@ -241,8 +241,6 @@ github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3i github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 h1:ilQV1hzziu+LLM3zUTJ0trRztfwgjqKnBWNtSRkbmwM= github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.mongodb.org/mongo-driver v1.17.9 h1:IexDdCuuNJ3BHrELgBlyaH9p60JXAvdzWR128q+U5tU= -go.mongodb.org/mongo-driver v1.17.9/go.mod h1:LlOhpH5NUEfhxcAwG0UEkMqwYcc4JU18gtCdGudk/tQ= go.mongodb.org/mongo-driver/v2 v2.5.0 h1:yXUhImUjjAInNcpTcAlPHiT7bIXhshCTL3jVBkF3xaE= go.mongodb.org/mongo-driver/v2 v2.5.0/go.mod h1:yOI9kBsufol30iFsl1slpdq1I0eHPzybRWdyYUs8K/0= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= diff --git a/internal/app/app.go b/internal/app/app.go index 1ee6aa2..ace5983 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -7,7 +7,7 @@ import ( "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/internal/storage" "github.com/steveyegge/beads" - "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/v2/bson" ) type App = models.App @@ -43,7 +43,7 @@ func New(ctx context.Context, config Config, opts ...Option) (*App, func(), erro if b.statsService == nil { statStore := storage.NewJsonStorage(config.StatisticsStoragePath, &models.Statistics{ - ID: primitive.NewObjectID(), + ID: bson.NewObjectID(), StartTime: time.Now(), }) diff --git a/internal/app/statistics.go b/internal/app/statistics.go index abd12a6..bd594c5 100644 --- a/internal/app/statistics.go +++ b/internal/app/statistics.go @@ -9,7 +9,7 @@ import ( "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/internal/storage" - "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/v2/bson" ) type StatisticsService struct { @@ -43,12 +43,12 @@ func (s *StatisticsService) GetStatistics() (models.Statistics, error) { return *s.storage.Data, nil } -func (s *StatisticsService) GetParticipantID() primitive.ObjectID { +func (s *StatisticsService) GetParticipantID() bson.ObjectID { s.mu.Lock() defer s.mu.Unlock() if s.storage.Data == nil { - return primitive.NilObjectID + return bson.NilObjectID } return s.storage.Data.ID } diff --git a/internal/models/app.go b/internal/models/app.go index e1e5603..3736d60 100644 --- a/internal/models/app.go +++ b/internal/models/app.go @@ -4,7 +4,7 @@ import ( "context" "log/slog" - "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/v2/bson" ) type App struct { @@ -59,7 +59,7 @@ type StatsService interface { Load(ctx context.Context) error Save(ctx context.Context) error GetStatistics() (Statistics, error) - GetParticipantID() primitive.ObjectID + GetParticipantID() bson.ObjectID RecordTaskRun(ctx context.Context, run TaskRunMetrics) error RecordIntroQuestionnaireAnswers(answers map[string]any) error } diff --git a/internal/models/statistics.go b/internal/models/statistics.go index fe4c8df..ed81b9d 100644 --- a/internal/models/statistics.go +++ b/internal/models/statistics.go @@ -3,14 +3,14 @@ package models import ( "time" - "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/v2/bson" ) type Statistics struct { - ID primitive.ObjectID `bson:"_id" json:"id"` - StartTime time.Time `bson:"start_time" json:"start_time"` - EndTime time.Time `bson:"end_time" json:"end_time"` - DurationMs int64 `bson:"duration_ms" json:"duration_ms"` + ID bson.ObjectID `bson:"_id" json:"id"` + StartTime time.Time `bson:"start_time" json:"start_time"` + EndTime time.Time `bson:"end_time" json:"end_time"` + DurationMs int64 `bson:"duration_ms" json:"duration_ms"` LastInterfaceType InterfaceType `bson:"last_interface_type" json:"last_interface_type"` TaskRuns int `bson:"task_runs" json:"task_runs"` @@ -38,12 +38,12 @@ type Statistics struct { } type TaskMetricsFile struct { - ID primitive.ObjectID `bson:"_id" json:"id"` - ParticipantID primitive.ObjectID `bson:"participant_id" json:"participant_id"` - TaskName string `bson:"task_name" json:"task_name"` - UpdatedAt time.Time `bson:"updated_at" json:"updated_at"` - Summary TaskStatsSummary `bson:"summary" json:"summary"` - Runs []TaskRunMetrics `bson:"runs" json:"runs"` + ID bson.ObjectID `bson:"_id" json:"id"` + ParticipantID bson.ObjectID `bson:"participant_id" json:"participant_id"` + TaskName string `bson:"task_name" json:"task_name"` + UpdatedAt time.Time `bson:"updated_at" json:"updated_at"` + Summary TaskStatsSummary `bson:"summary" json:"summary"` + Runs []TaskRunMetrics `bson:"runs" json:"runs"` } type TaskStatsSummary struct { diff --git a/pkg/task/lifecycle.go b/pkg/task/lifecycle.go index 75b18d9..56063e2 100644 --- a/pkg/task/lifecycle.go +++ b/pkg/task/lifecycle.go @@ -4,7 +4,7 @@ import ( "log/slog" "github.com/LazyBachelor/LazyPM/internal/models" - "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/v2/bson" ) type RunLifecycle struct { @@ -24,7 +24,7 @@ func NewRunLifecycle(app *App, config Config, details models.TaskDetails, iType collector.recordUserAction(action) }) - var participantID primitive.ObjectID + var participantID bson.ObjectID var store MetricsStore if config.StatisticsStoragePath != "" { participantID = app.Stats.GetParticipantID() diff --git a/pkg/task/metrics_store.go b/pkg/task/metrics_store.go index a499de8..11ca88d 100644 --- a/pkg/task/metrics_store.go +++ b/pkg/task/metrics_store.go @@ -10,7 +10,7 @@ import ( "time" "github.com/LazyBachelor/LazyPM/internal/models" - "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/v2/bson" ) type MetricsStore interface { @@ -19,11 +19,11 @@ type MetricsStore interface { type FileMetricsStore struct { path string - participantID primitive.ObjectID + participantID bson.ObjectID logger *slog.Logger } -func NewFileMetricsStore(path string, participantID primitive.ObjectID, logger *slog.Logger) *FileMetricsStore { +func NewFileMetricsStore(path string, participantID bson.ObjectID, logger *slog.Logger) *FileMetricsStore { return &FileMetricsStore{ path: path, participantID: participantID, @@ -44,7 +44,7 @@ func (s *FileMetricsStore) Append(ctx context.Context, taskName string, run mode } metrics := models.TaskMetricsFile{ - ID: primitive.NewObjectID(), + ID: bson.NewObjectID(), ParticipantID: s.participantID, TaskName: taskName, Runs: []models.TaskRunMetrics{}, diff --git a/pkg/web/handler/issues.go b/pkg/web/handler/issues.go index 3f48bc1..5870316 100644 --- a/pkg/web/handler/issues.go +++ b/pkg/web/handler/issues.go @@ -62,7 +62,7 @@ func CreateIssue(w http.ResponseWriter, r *http.Request) { from := r.URL.Query().Get("from") referer := r.Header.Get("Referer") boardView := from == "board" || strings.Contains(referer, "board=true") - + if boardView { w.Header().Set("HX-Redirect", "/?board=true") } else { @@ -181,7 +181,7 @@ func UpdateIssue(w http.ResponseWriter, r *http.Request) { from := r.URL.Query().Get("from") referer := r.Header.Get("Referer") boardView := from == "board" || strings.Contains(referer, "board=true") - + if boardView { w.Header().Set("HX-Redirect", "/?board=true") } else { @@ -213,7 +213,7 @@ func UpdateAssignee(w http.ResponseWriter, r *http.Request) { // Check if we're in board view referer := r.Header.Get("Referer") boardView := strings.Contains(referer, "board=true") - + if boardView { w.Header().Set("HX-Redirect", "/?board=true&selected-issue="+issue.ID) } else { @@ -239,7 +239,7 @@ func DeleteIssue(w http.ResponseWriter, r *http.Request) { from := r.URL.Query().Get("from") referer := r.Header.Get("Referer") boardView := from == "board" || strings.Contains(referer, "board=true") - + if boardView { w.Header().Set("HX-Redirect", "/?board=true") } else {