Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/tui/coverage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func TestTransientNoticeExpires(t *testing.T) {
if got := strings.Join(m.notices, "\n"); got != "sticky" {
t.Errorf("notices after expiry = %q", got)
}
// A stale timer (superseded by a newer notice) must not clear anything.
// A stale timer must not clear notices that have not expired yet.
m.addTransientNote("skill · saved")
m.Update(noticeExpireMsg{seq: m.noticeSeq - 1})
if len(m.notices) != 2 {
Expand Down
10 changes: 4 additions & 6 deletions internal/tui/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ func (a autocomplete) height() int {

// noticeTTL is how long transient info traces (skill / memory / signal /
// subagent) stay on screen before fading out.
const noticeTTL = 5 * time.Second
const noticeTTL = 3 * time.Second

// noticeExpireMsg fires noticeTTL after the last transient notice was added.
// noticeExpireMsg fires noticeTTL after a transient notice was added.
type noticeExpireMsg struct {
seq int
}
Expand Down Expand Up @@ -287,10 +287,8 @@ func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return m.handleEvent(client.Event(msg))

case noticeExpireMsg:
if msg.seq == m.noticeSeq {
m.pruneNotices(time.Now())
m.refresh()
}
m.pruneNotices(time.Now())
m.refresh()
return m, nil

case tea.MouseMsg:
Expand Down