prime8dev

prime8dev
git clone https://git.prime8.dev/prime8dev.git
Log | Files | Refs | README | LICENSE

commit 72858da4c626be33890ba0fe762e79bacea221a0
parent ed4083f754cfe02078a499a9aa35e984ad7fa7da
Author: Damian Myrda <damian@prime8.dev>
Date:   Tue,  7 Apr 2026 23:28:37 -0500

fix: stabilize about ASCII rendering over SSH

Diffstat:
Minternal/tui/about_ascii.go | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/internal/tui/about_ascii.go b/internal/tui/about_ascii.go @@ -1,6 +1,8 @@ package tui import ( + "log/slog" + "os" "path/filepath" "strings" @@ -30,13 +32,20 @@ func normalizeAboutASCIIWidth(width int) int { func loadAboutASCII(width int) string { flags := aic.DefaultFlags() flags.Width = width - flags.Colored = true + flags.Colored = false flags.Braille = false flags.Dither = true flags.Threshold = 160 ascii, err := aic.Convert(filepath.Join("static", "me.jpg"), flags) if err != nil { + cwd, _ := os.Getwd() + imagePath := filepath.Join("static", "me.jpg") + if _, statErr := os.Stat(imagePath); statErr != nil { + slog.Warn("about ascii image missing", "path", imagePath, "cwd", cwd, "error", statErr) + } else { + slog.Warn("about ascii conversion failed", "path", imagePath, "cwd", cwd, "error", err) + } return "" }