Skip to content

Commit 8d17958

Browse files
jom-sqampcode-com
andcommitted
fix(client): load all available threads instead of first 50
The client was requesting only 50 threads from the server, but the server fetches up to 500 from the Amp API. This meant users with many threads only saw ~42 entries (50 minus stacked children), and deleting a thread appeared to have no effect on the count because a previously- hidden thread would backfill into the 50-thread window. Now requests limit=500 to match the server's Amp API cap, showing all available threads. The Amp API hard-caps at 500 — no pagination support — so this is the maximum we can display. Co-authored-by: Amp <amp@ampcode.com>
1 parent ec42fcf commit 8d17958

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hooks/useThreads.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function useThreads() {
4242
try {
4343
const cursor = append ? cursorRef.current : null;
4444
const data = await apiGet<ThreadsResult>(
45-
`/api/threads?limit=50${cursor ? `&cursor=${cursor}` : ''}`,
45+
`/api/threads?limit=500${cursor ? `&cursor=${cursor}` : ''}`,
4646
);
4747

4848
const filtered = filterDeleted(data.threads);

0 commit comments

Comments
 (0)