Skip to content

fix(log): the stream keeps rows that arrive while paused and shows them on resume - #166

Merged
mottihoresh merged 2 commits into
fix/parkedfrom
fix/p161-stream-pause
Oct 18, 2026
Merged

mottihoresh merged 2 commits into
fix/parkedfrom
fix/p161-stream-pause

Conversation

@mottihoresh

Copy link
Copy Markdown
Contributor

What

Log › Pause held the Events view (rows recorded, shown on Resume), but the Stream view dropped every log:batch that arrived while paused, so that data was lost.

Now the stream holds those rows while paused and shows them on Resume, within its existing 1000-row cap (the oldest fall off, as they do live). The paused list stays frozen in the meantime.

Changes

  • src/renderer/src/dcs/store.ts
    • logBatch no longer returns early while paused. It numbers the rows as before and puts them in a new private_held list (newest first, capped at MAX_LOG) instead of log.
    • A subscription on the events store's pause adds private_held on top of log when the pause turns off (Resume), capped at MAX_LOG.
    • clearLog empties private_held too.
  • The pause stays owned by src/renderer/src/events/store.ts (logPaused / togglePause, unchanged). Only its header comment was updated to say the stream also reads it on Resume.
  • Log.tsx is unchanged: no layout or styling change.

Tests

src/renderer/test/t23-log-stream.test.tsx:

  • Updated (it pinned the old behaviour): "Pause freezes the list: rows that arrive while paused are dropped, not held (today)" became "Pause freezes the list and holds what arrives; Resume shows it".
  • New: "rows held while paused keep the list's cap: the oldest fall off as they do live".
  • New: "Clear while paused also drops what was held".

All three fail on the old code.

Closes #161

…em on resume

Log › Pause held the Events view but the Stream view dropped every row that arrived while
paused. The stream now holds them out of the frozen list and adds them on Resume, within the
list's existing row cap (the oldest fall off as they do live). Clear while paused also drops
what was held.

Closes #161
@mottihoresh
mottihoresh merged commit b5714c9 into fix/parked Oct 18, 2026
3 checks passed
@mottihoresh
mottihoresh deleted the fix/p161-stream-pause branch October 18, 2026 02:26
mottihoresh added a commit that referenced this pull request Oct 18, 2026
…s, paused log keeps rows, can state reads ok (#167)

The four parked items kept from the fix track (#135), prioritized
2026-10-18. Item PRs squash-merged into `fix/parked`:
- #163 — a healthy CAN state reads "OK" instead of "error-active".
- #164 — Connection › Connected nodes says "N new board(s) on the bus —
add it/them from the Cockpit." when boards are on the bus but none is in
your cockpit, instead of "No nodes reported".
- #165 — Start with no Gateway (Bridge, or Replay driving the board)
starts and waits for the board with the waiting reason shown, instead of
being silently refused; delivery begins when the Gateway connects.
- #166 — Log › Stream holds rows that arrive while paused and shows them
on Resume (within the row cap), like Events.

Closes #159
Closes #160
Closes #161
Closes #162

BEGIN_COMMIT_OVERRIDE
fix(nodes): healthy CAN state reads "OK" instead of error-active
fix(nodes): connected nodes points to new boards on the bus instead of
saying none are reported
fix(dcs): start with no gateway starts and waits for the board instead
of being refused
fix(log): the stream keeps rows that arrive while paused and shows them
on resume
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant