pico / fix(tui): force minimum color profile #2

accepted · opened on 2024-07-19T03:34:10Z by erock
Help
# add changes to patch request
git format-patch main --stdout | ssh pr.pico.sh pr add 2
# add review to patch request
git format-patch main --stdout | ssh pr.pico.sh pr add --review 2
# remove patchset
ssh pr.pico.sh ps rm ps-x
# checkout all patches
ssh pr.pico.sh pr print 2 | git am -3
# print a diff between the last two patches in a patch request
ssh pr.pico.sh pr diff 2
# accept PR
ssh pr.pico.sh pr accept 2
# close PR
ssh pr.pico.sh pr close 2

Logs

erock created pr with ps-2 on 2024-07-19T03:34:10Z
erock changed status on 2024-07-19T17:49:07Z {"status":"accepted"}

Patchsets

Diff ↕

fix(tui): force minimum color profile

Eric Bower <me@erock.io>
 go.mod      | 2 +-
 pico/ssh.go | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
 1From c31a9c7fa581c110bc4cccb76cdef8a17df16c5f Mon Sep 17 00:00:00 2001
 2From: Eric Bower <me@erock.io>
 3Date: Thu, 18 Jul 2024 23:33:26 -0400
 4Subject: [PATCH] fix(tui): force minimum color profile
 5
 6---
 7 go.mod      | 2 +-
 8 pico/ssh.go | 3 ++-
 9 2 files changed, 3 insertions(+), 2 deletions(-)
10
11diff --git a/go.mod b/go.mod
12index 54ece0d..b7084ba 100644
13--- a/go.mod
14+++ b/go.mod
15@@ -30,6 +30,7 @@ require (
16 	github.com/minio/minio-go/v7 v7.0.70
17 	github.com/mmcdole/gofeed v1.3.0
18 	github.com/muesli/reflow v0.3.0
19+	github.com/muesli/termenv v0.15.2
20 	github.com/neurosnap/go-exif-remove v0.0.0-20221010134343-50d1e3c35577
21 	github.com/picosh/pobj v0.0.0-20240709135546-27097077b26a
22 	github.com/picosh/send v0.0.0-20240709135413-81b1dd703a11
23@@ -114,7 +115,6 @@ require (
24 	github.com/modern-go/reflect2 v1.0.2 // indirect
25 	github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
26 	github.com/muesli/cancelreader v0.2.2 // indirect
27-	github.com/muesli/termenv v0.15.2 // indirect
28 	github.com/neurosnap/go-jpeg-image-structure v0.0.0-20221010133817-70b1c1ff679e // indirect
29 	github.com/olekukonko/tablewriter v0.0.5 // indirect
30 	github.com/philhofer/fwd v1.1.2 // indirect
31diff --git a/pico/ssh.go b/pico/ssh.go
32index 0f428c8..cef0a3f 100644
33--- a/pico/ssh.go
34+++ b/pico/ssh.go
35@@ -12,6 +12,7 @@ import (
36 	"github.com/charmbracelet/ssh"
37 	"github.com/charmbracelet/wish"
38 	bm "github.com/charmbracelet/wish/bubbletea"
39+	"github.com/muesli/termenv"
40 	"github.com/picosh/pico/db/postgres"
41 	"github.com/picosh/pico/shared"
42 	"github.com/picosh/pico/tui"
43@@ -38,7 +39,7 @@ func createRouter(cfg *shared.ConfigSite, handler *UploadHandler, cliHandler *Cl
44 			scp.Middleware(handler),
45 			wishrsync.Middleware(handler),
46 			auth.Middleware(handler),
47-			wsh.PtyMdw(bm.Middleware(tui.CmsMiddleware(cfg))),
48+			wsh.PtyMdw(bm.MiddlewareWithColorProfile(tui.CmsMiddleware(cfg), termenv.ANSI256)),
49 			WishMiddleware(cliHandler),
50 			wsh.LogMiddleware(handler.GetLogger()),
51 		}
52
53base-commit: 35082a28ea821976c1879c38fb16b382a7e570c9
54-- 
552.45.2
56
ps-2 by erock on 2024-07-19T03:34:10Z

fix(tui): force minimum color profile

Eric Bower <me@erock.io> 2024-07-19T03:33:26Z
 go.mod      | 2 +-
 pico/ssh.go | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
 1From c31a9c7fa581c110bc4cccb76cdef8a17df16c5f Mon Sep 17 00:00:00 2001
 2From: Eric Bower <me@erock.io>
 3Date: Thu, 18 Jul 2024 23:33:26 -0400
 4Subject: [PATCH] fix(tui): force minimum color profile
 5
 6---
 7 go.mod      | 2 +-
 8 pico/ssh.go | 3 ++-
 9 2 files changed, 3 insertions(+), 2 deletions(-)
10
11diff --git a/go.mod b/go.mod
12index 54ece0d..b7084ba 100644
13--- a/go.mod
14+++ b/go.mod
15@@ -30,6 +30,7 @@ require (
16 	github.com/minio/minio-go/v7 v7.0.70
17 	github.com/mmcdole/gofeed v1.3.0
18 	github.com/muesli/reflow v0.3.0
19+	github.com/muesli/termenv v0.15.2
20 	github.com/neurosnap/go-exif-remove v0.0.0-20221010134343-50d1e3c35577
21 	github.com/picosh/pobj v0.0.0-20240709135546-27097077b26a
22 	github.com/picosh/send v0.0.0-20240709135413-81b1dd703a11
23@@ -114,7 +115,6 @@ require (
24 	github.com/modern-go/reflect2 v1.0.2 // indirect
25 	github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
26 	github.com/muesli/cancelreader v0.2.2 // indirect
27-	github.com/muesli/termenv v0.15.2 // indirect
28 	github.com/neurosnap/go-jpeg-image-structure v0.0.0-20221010133817-70b1c1ff679e // indirect
29 	github.com/olekukonko/tablewriter v0.0.5 // indirect
30 	github.com/philhofer/fwd v1.1.2 // indirect
31diff --git a/pico/ssh.go b/pico/ssh.go
32index 0f428c8..cef0a3f 100644
33--- a/pico/ssh.go
34+++ b/pico/ssh.go
35@@ -12,6 +12,7 @@ import (
36 	"github.com/charmbracelet/ssh"
37 	"github.com/charmbracelet/wish"
38 	bm "github.com/charmbracelet/wish/bubbletea"
39+	"github.com/muesli/termenv"
40 	"github.com/picosh/pico/db/postgres"
41 	"github.com/picosh/pico/shared"
42 	"github.com/picosh/pico/tui"
43@@ -38,7 +39,7 @@ func createRouter(cfg *shared.ConfigSite, handler *UploadHandler, cliHandler *Cl
44 			scp.Middleware(handler),
45 			wishrsync.Middleware(handler),
46 			auth.Middleware(handler),
47-			wsh.PtyMdw(bm.Middleware(tui.CmsMiddleware(cfg))),
48+			wsh.PtyMdw(bm.MiddlewareWithColorProfile(tui.CmsMiddleware(cfg), termenv.ANSI256)),
49 			WishMiddleware(cliHandler),
50 			wsh.LogMiddleware(handler.GetLogger()),
51 		}
52
53base-commit: 35082a28ea821976c1879c38fb16b382a7e570c9
54-- 
552.45.2
56