commit 3e9a87531c409f5c8206a94519ccb0f290ab35bd
parent 194c7251653be0ebad9a2f1ef2eaeda6225e1a35
Author: Damian Myrda <damian@prime8.dev>
Date: Tue, 7 Apr 2026 23:38:41 -0500
fix: serialize about ASCII conversion for SSH sessions
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/internal/tui/about_ascii.go b/internal/tui/about_ascii.go
@@ -3,10 +3,13 @@ package tui
import (
"path/filepath"
"strings"
+ "sync"
aic "github.com/TheZoraiz/ascii-image-converter/aic_package"
)
+var aboutASCIIConvertMu sync.Mutex
+
func (m portfolioModel) aboutASCIIFor(width int) string {
width = normalizeAboutASCIIWidth(width)
@@ -35,6 +38,9 @@ func loadAboutASCII(width int) string {
flags.Dither = true
flags.Threshold = 160
+ aboutASCIIConvertMu.Lock()
+ defer aboutASCIIConvertMu.Unlock()
+
ascii, err := aic.Convert(filepath.Join("static", "me.jpg"), flags)
if err != nil {
return ""