Skip to content

Stop the file watch of a hidden log pane - #58

Merged
fedonman merged 1 commit into
mainfrom
fixed/stop-hidden-log-watches
Sep 29, 2026
Merged

fedonman merged 1 commit into
mainfrom
fixed/stop-hidden-log-watches

Conversation

@fedonman

Copy link
Copy Markdown
Owner

on_timer only drains visible panes, but a hidden log pane kept its watch, and its reader sent the whole log into an unbounded channel every second that nothing read. sync_widgets_to_focused_job now clears hidden stdout, stderr and custom panes instead of keeping them on the focused job, which stops the watch, and showing a pane again reads the log from the start. set_detail now does nothing on a cleared pane. Without that, the resolver pushing detail to every pane each tick would start the watch again. A test hides a pane, appends to its log and checks that nothing arrives.

Closes #23

on_timer only drains visible panes, but a hidden pane kept its watch,
and its reader sent the whole log into an unbounded channel every
second, so memory grew by the log's size every second for as long as
the pane stayed hidden. sync_widgets_to_focused_job now clears hidden
log panes instead of keeping them on the focused job, and set_detail
does nothing on a cleared pane, since the resolver pushes detail to
every pane on each tick and that would start the watch again.
@fedonman
fedonman force-pushed the fixed/stop-hidden-log-watches branch from 51757cd to 5cfd020 Compare September 29, 2026 09:47
@fedonman
fedonman merged commit 0083464 into main Sep 29, 2026
6 checks passed
@fedonman
fedonman deleted the fixed/stop-hidden-log-watches branch September 29, 2026 09:48
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.

[Bug]: Hidden log panes keep buffering the whole file into a channel nobody drains

1 participant