fix(app-server): advance zero-limit thread pages

Clamp a requested zero page size to one while preserving existing cursor compatibility. An isolated Mac stdio observation exercised zero, legacy and invalid cursors against three fixture threads.
This commit is contained in:
CodeWhale Bot committed 2026-11-06 21:08:53 -08:00
1 parent 86f83716bb
commit e7f2844049
1 file changed
+1 -1
+1 -1
View File
@@ -1064,7 +1064,7 @@ pub(crate) async fn dispatch_stdio_request_with_writer<W: AsyncWrite + Unpin>(
.partition_point(|thread| thread.id.as_str() <= cursor)
});
let remaining = &loaded.threads[start..];
let count = limit.unwrap_or(remaining.len()).min(remaining.len());
let count = limit.unwrap_or(remaining.len()).max(1).min(remaining.len());
let data = remaining[..count]
.iter()
.map(|thread| thread.id.clone())