From 6192340ec07f4d7891187a4b7399ce6d4676c1cc Mon Sep 17 00:00:00 2001 From: Virgil Date: Thu, 2 Apr 2026 11:19:48 +0000 Subject: [PATCH] fix(cli): route frame UI to stderr Co-Authored-By: Virgil --- pkg/cli/frame.go | 2 +- pkg/cli/frame_test.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/cli/frame.go b/pkg/cli/frame.go index bb6ea3a..ff9be95 100644 --- a/pkg/cli/frame.go +++ b/pkg/cli/frame.go @@ -61,7 +61,7 @@ func NewFrame(variant string) *Frame { variant: variant, layout: Layout(variant), models: make(map[Region]Model), - out: os.Stdout, + out: os.Stderr, done: make(chan struct{}), focused: RegionContent, keyMap: DefaultKeyMap(), diff --git a/pkg/cli/frame_test.go b/pkg/cli/frame_test.go index d9986c4..b97a558 100644 --- a/pkg/cli/frame_test.go +++ b/pkg/cli/frame_test.go @@ -2,6 +2,7 @@ package cli import ( "bytes" + "os" "strings" "testing" "time" @@ -136,6 +137,11 @@ func TestFrame_Good(t *testing.T) { assert.Less(t, elapsed, 200*time.Millisecond) assert.Contains(t, buf.String(), "timed") }) + + t.Run("default output goes to stderr", func(t *testing.T) { + f := NewFrame("C") + assert.Same(t, os.Stderr, f.out) + }) } func TestFrame_Bad(t *testing.T) {