Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Commit 635324d

Browse files
committed
small fixes
1 parent d39d52d commit 635324d

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

internal/logging/writer.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ func (w *writer) Write(p []byte) (int, error) {
1818
d := logfmt.NewDecoder(bytes.NewReader(p))
1919
for d.ScanRecord() {
2020
msg := LogMessage{
21-
ID: fmt.Sprintf("%d", time.Now().UnixNano()),
21+
ID: fmt.Sprintf("%d", time.Now().UnixNano()),
22+
Time: time.Now(),
2223
}
2324
for d.ScanKeyval() {
2425
switch string(d.Key()) {

internal/tui/components/core/status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@ func (m statusCmp) model() string {
9797

9898
func NewStatusCmp() tea.Model {
9999
return &statusCmp{
100-
messageTTL: 15 * time.Second,
100+
messageTTL: 10 * time.Second,
101101
}
102102
}

internal/tui/components/repl/sessions.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ func (i *sessionsCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
123123
case tea.KeyMsg:
124124
switch {
125125
case key.Matches(msg, sessionKeyMapValue.Select):
126+
i.app.Logger.PersistInfo("Session selected")
126127
selected := i.list.SelectedItem()
127128
if selected == nil {
128129
return i, nil

internal/tui/tui.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ func (a appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
131131
TTL: msg.Payload.PersistTime,
132132
})
133133
}
134+
cmds = append(cmds, cmd)
134135
}
135136
case util.ClearStatusMsg:
136137
a.status, _ = a.status.Update(msg)
@@ -205,8 +206,6 @@ func (a appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
205206
}
206207
}
207208

208-
a.status, cmd = a.status.Update(msg)
209-
cmds = append(cmds, cmd)
210209
if a.dialogVisible {
211210
d, cmd := a.dialog.Update(msg)
212211
a.dialog = d.(core.DialogCmp)

0 commit comments

Comments
 (0)