mirror of
https://github.com/codewhale-hq/Codewhale.git
synced 2026-11-07 10:36:05 -10:00
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:
1 parent
86f83716bb
commit
e7f2844049
1 file changed
+1
-1
@@ -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())
|
||||
|
||||
Reference in new issue
Block a user