on main help sign in
small fixes
commit635324d386d52e117efea6fcbe9dbf306ec75653 authorKujtim Hoxha <kujtimii.h@gmail.com> dateWed 9 Apr 2025, 19:18 (2 years ago) parentd39d52d
4 files changed+5−4
internal/logging/writer.go+2−1 internal/tui/components/core/status.go+1−1 internal/tui/components/repl/sessions.go+1 internal/tui/tui.go+1−2
internal/logging/writer.go+2−1
@@ -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+1−1
@@ -97,6 +97,6 @@ func (m statusCmp) model() string {
9797
9898func NewStatusCmp() tea.Model {
9999 return &statusCmp{
100− messageTTL: 15 * time.Second,
100+ messageTTL: 10 * time.Second,
101101 }
102102}
internal/tui/components/repl/sessions.go+1
@@ -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+1−2
@@ -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)