Skip to content

Ctrl+S: pause/start for streaming#21

Merged
ynqa merged 2 commits intov0.3.0/devfrom
ctrls
Feb 28, 2026
Merged

Ctrl+S: pause/start for streaming#21
ynqa merged 2 commits intov0.3.0/devfrom
ctrls

Conversation

@ynqa
Copy link
Copy Markdown
Owner

@ynqa ynqa commented Feb 28, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 28, 2026 04:56
@ynqa ynqa changed the base branch from main to v0.3.0/dev February 28, 2026 04:56
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a streaming pause/resume toggle to sig so users can temporarily stop (and restart) ingesting new lines during streaming mode.

Changes:

  • Introduces a new Ctrl+S keybinding to toggle paused state during streaming.
  • Implements pause signaling between the UI loop and the stream-ingestion/render task via a tokio::sync::watch channel.
  • Documents the new keybinding in the README.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/sig.rs Adds Ctrl+S handling and a watch-channel-driven pause mechanism in the streaming ingestion/render loop.
README.md Documents Ctrl+S as Pause/Resume for stream ingestion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/sig.rs Outdated
Comment thread src/sig.rs
Comment thread src/sig.rs
Comment thread src/sig.rs
Comment on lines +193 to +196
if queue.len() > queue_capacity {
queue.pop_front().unwrap();
}
queue.push_back(line.clone());
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The queue-size limiting condition allows the queue to temporarily grow to queue_capacity + 1 because it only pops when len() > queue_capacity and then immediately pushes. If queue_capacity is intended as a strict max retained lines, this should pop when len() >= queue_capacity (and handle queue_capacity == 0 explicitly).

Suggested change
if queue.len() > queue_capacity {
queue.pop_front().unwrap();
}
queue.push_back(line.clone());
if queue_capacity > 0 {
if queue.len() >= queue_capacity {
queue.pop_front().unwrap();
}
queue.push_back(line.clone());
}

Copilot uses AI. Check for mistakes.
@ynqa ynqa merged commit bc573ac into v0.3.0/dev Feb 28, 2026
7 checks passed
@ynqa ynqa deleted the ctrls branch February 28, 2026 16:47
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.

2 participants