fix(ci): restore cross-platform checks
CI / go (push) Has been cancelled
CI / build (darwin, macos-14) (push) Has been cancelled
CI / build (windows, windows-2025) (push) Has been cancelled
Release / build (amd64, darwin, macos-latest) (push) Has been cancelled
Release / build (amd64, linux, ubuntu-latest) (push) Has been cancelled
Release / build (amd64, windows, windows-latest) (push) Has been cancelled
Release / build (arm64, darwin, macos-latest) (push) Has been cancelled
Release / build (arm64, linux, ubuntu-latest) (push) Has been cancelled
Release / release (push) Has been cancelled
Release / update-homebrew (push) Has been cancelled
CI / go (push) Has been cancelled
CI / build (darwin, macos-14) (push) Has been cancelled
CI / build (windows, windows-2025) (push) Has been cancelled
Release / build (amd64, darwin, macos-latest) (push) Has been cancelled
Release / build (amd64, linux, ubuntu-latest) (push) Has been cancelled
Release / build (amd64, windows, windows-latest) (push) Has been cancelled
Release / build (arm64, darwin, macos-latest) (push) Has been cancelled
Release / build (arm64, linux, ubuntu-latest) (push) Has been cancelled
Release / release (push) Has been cancelled
Release / update-homebrew (push) Has been cancelled
This commit is contained in:
@@ -15,7 +15,7 @@ require (
|
||||
github.com/urfave/cli/v3 v3.8.0
|
||||
github.com/yuin/gopher-lua v1.1.2
|
||||
golang.org/x/oauth2 v0.36.0
|
||||
golang.org/x/text v0.37.0
|
||||
golang.org/x/text v0.39.0
|
||||
google.golang.org/api v0.274.0
|
||||
)
|
||||
|
||||
@@ -74,7 +74,7 @@ require (
|
||||
golang.org/x/crypto v0.51.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20251209150349-8475f28825e9 // indirect
|
||||
golang.org/x/net v0.55.0 // indirect
|
||||
golang.org/x/sync v0.20.0 // indirect
|
||||
golang.org/x/sync v0.21.0 // indirect
|
||||
golang.org/x/sys v0.45.0 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260319201613-d00831a3d3e7 // indirect
|
||||
google.golang.org/grpc v1.79.3 // indirect
|
||||
|
||||
@@ -177,8 +177,8 @@ golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs=
|
||||
golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/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.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
|
||||
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||
golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM=
|
||||
golang.org/x/sync v0.21.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-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
@@ -196,8 +196,8 @@ 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.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=
|
||||
golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=
|
||||
golang.org/x/text v0.39.0 h1:UbZz4pLOvn600D6Oh6GGEI6VAmndrEBLv8/6BEXzyus=
|
||||
golang.org/x/text v0.39.0/go.mod h1:3UwRclnC2g0TU9x8PZiyfOajCd1zaUNHF9cvqcQZ+ZM=
|
||||
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=
|
||||
|
||||
+10
-3
@@ -9,8 +9,7 @@ import (
|
||||
)
|
||||
|
||||
func TestSaveCopiesTemporaryDownload(t *testing.T) {
|
||||
home := t.TempDir()
|
||||
t.Setenv("HOME", home)
|
||||
home := setTestHome(t)
|
||||
source, err := os.CreateTemp("", "cliamp-save-*.flac")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -38,8 +37,16 @@ func TestSaveCopiesTemporaryDownload(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSaveRejectsUserLibraryFile(t *testing.T) {
|
||||
t.Setenv("HOME", t.TempDir())
|
||||
setTestHome(t)
|
||||
if _, err := Save(playlist.Track{Path: "/var/lib/music/song.flac"}); err == nil {
|
||||
t.Fatal("Save accepted a non-temporary library file")
|
||||
}
|
||||
}
|
||||
|
||||
func setTestHome(t *testing.T) string {
|
||||
t.Helper()
|
||||
home := t.TempDir()
|
||||
t.Setenv("HOME", home)
|
||||
t.Setenv("USERPROFILE", home)
|
||||
return home
|
||||
}
|
||||
|
||||
@@ -88,16 +88,6 @@ func (m Model) effectivePlaylistVisible() int {
|
||||
return min(m.plVisible, m.layout.bodyRows)
|
||||
}
|
||||
|
||||
// recomputeChrome preserves the existing layout-refresh seam for callers that
|
||||
// change an overlay or visualizer mode.
|
||||
func (m *Model) recomputeChrome() {
|
||||
m.recomputeLayout()
|
||||
}
|
||||
|
||||
func (m *Model) invalidateChrome() {
|
||||
m.recomputeLayout()
|
||||
}
|
||||
|
||||
func (m *Model) refreshChrome() {
|
||||
m.recomputeLayout()
|
||||
}
|
||||
|
||||
@@ -1216,8 +1216,3 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// restorePanelWidth resets PanelWidth to the correct value based on compact mode.
|
||||
func (m *Model) restorePanelWidth() {
|
||||
m.recomputeLayout()
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package model
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"slices"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -911,50 +910,6 @@ func (m Model) renderHelp() string {
|
||||
}
|
||||
}
|
||||
|
||||
// helpHint is a rendered help key with an associated display priority.
|
||||
type helpHint struct {
|
||||
text string
|
||||
priority int
|
||||
}
|
||||
|
||||
// fitHints drops lowest-priority hints until they fit within maxWidth.
|
||||
// Widths are pre-computed once to avoid repeated lipgloss.Width calls.
|
||||
func fitHints(hints []helpHint, maxWidth int) string {
|
||||
active := make([]bool, len(hints))
|
||||
widths := make([]int, len(hints))
|
||||
var total int
|
||||
for i, h := range hints {
|
||||
active[i] = true
|
||||
widths[i] = lipgloss.Width(h.text)
|
||||
total += widths[i]
|
||||
}
|
||||
|
||||
for total > maxWidth {
|
||||
// Find lowest-priority active hint and drop it.
|
||||
minPri := math.MaxInt
|
||||
minIdx := -1
|
||||
for i, h := range hints {
|
||||
if active[i] && h.priority < minPri {
|
||||
minPri = h.priority
|
||||
minIdx = i
|
||||
}
|
||||
}
|
||||
if minIdx < 0 {
|
||||
break
|
||||
}
|
||||
active[minIdx] = false
|
||||
total -= widths[minIdx]
|
||||
}
|
||||
|
||||
var sb strings.Builder
|
||||
for i, h := range hints {
|
||||
if active[i] {
|
||||
sb.WriteString(h.text)
|
||||
}
|
||||
}
|
||||
return sb.String()
|
||||
}
|
||||
|
||||
// renderBottomStatus renders the bottom status line: speed (left) and
|
||||
// network stats (right) on the same row.
|
||||
func (m Model) renderBottomStatus() string {
|
||||
|
||||
Reference in New Issue
Block a user