Skip to content

fix(acp-registry): session lists keep Load more for an empty next-page cursor - #48476

Open
StiensWout wants to merge 3 commits into
pingdotgg:mainfrom
StiensWout:wf/find-0614c26556fa86308c7fae64
Open

StiensWout wants to merge 3 commits into
pingdotgg:mainfrom
StiensWout:wf/find-0614c26556fa86308c7fae64

Conversation

@StiensWout

Copy link
Copy Markdown
Contributor

ACP agents mark another page of sessions by including nextCursor, but when that cursor was an empty string the session list treated it as the last page. Session Management then hid Load more, and older native conversations could not be reached for import. The server now keeps an empty cursor, so Load more appears and fetches the next page.

Related: #36358, #48340, #48338

Reproduction on main

Commit efbd62a7a7 (main). The list ends without Load more, leaving the older conversation inaccessible from Session Management. Expected: Load more appears and opens the page with the older conversation.

  1. Add the sample local ACP agent that signals its next page with an empty continuation token.
  2. Open the agent’s Session Management section in Settings.
  3. Choose the demo project.
  4. Click List sessions.
  5. Look below the listed conversations.

The cause is at packages/provider-acp-registry/src/server/probe.ts:907. Ran pnpm scenarios:prove scripts/scenarios/acp-session-list-keeps-empty-cursor.e2e.ts --target web with the repro scenario added: it failed in 2 of 2 runs on a clean boat.dev VM, with expected false to be true in the output.

Evidence

Environment: The web app in Chromium on Linux x64, a fresh checkout on a boat.dev VM reset before each run.

Proven: the repro fails at the test commit cd3426f7fa and passes on the head e227785da8, both on main efbd62a7a7.

Before After
Commit cd3426f7fa e227785da8
Result ASSERTION_FAILED: expected false to be true passed
first native session page Before: first native session page Before: first native session page (changed region)
The list ends without Load more, leaving the older conversation inaccessible from Session Management.
After: first native session page After: first native session page (changed region)
Load more appears and opens the page with the older conversation.
failure Before: failure
Recording Before: recording After: recording

Tests

  • cd3426f7fa adds the failing test, alone, before the fix.
  • pnpm exec vp run check:changed efbd62a7a700a29ad545f8334b2139407875dab3 passed on head.

Not in this change

  • An agent that keeps returning the same cursor keeps Load more visible; the client does not detect repeated pages.
  • Mobile has no ACP session paging, so it needs no change.

Who did the work

  • Repro written by GPT 6.2 Sol, in Codex
  • Duplicate check judged by Claude Opus 5.5, in Claude Code
  • Written by Claude Opus 5.5, in Claude Code
  • Reviewed by Claude Opus 5.5, in Claude Code, and by GPT 6.2 Sol, in Codex
  • Reproduction, checks and proof run by a program on base and head, not by an agent

Made in T3 Code by Claude Opus 5.5 and GPT 6.2 Sol

StiensWout and others added 3 commits December 3, 2026 22:58
…rsor

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…e cursor

ACP signals another page by the presence of nextCursor, but an empty
string was treated as the end of the list.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Dec 3, 2026
@macroscopeapp

macroscopeapp Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at e227785

Macroscope's review found this PR approvable — Preserving empty next-page cursors keeps Load more available for ACP session lists. The change is limited to pagination signaling and retains existing request and cursor safeguards.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The provider probe now preserves empty session cursors. Unit and browser end-to-end tests check that an empty cursor enables loading the next session page.

Changes: Session pagination

Layer / File(s) Summary
Preserve empty cursors
packages/provider-acp-registry/src/server/probe.ts, apps/server/src/provider/AcpRegistryProbe.test.ts
The probe maps only null and undefined cursors to null. The unit test checks that an empty cursor remains present.
Verify pagination in the browser
scripts/scenarios/acp-session-list-keeps-empty-cursor.e2e.ts
The end-to-end scenario checks that “Load more” appears and loads an older session when the cursor is empty.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: Minimal · up to e2277

This fix lets Session Management show Load more when an agent returns an empty next-page cursor. The change is small and tested, and I found no merge-blocking risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the fix (empty next-page cursor keeps Load more in session lists) and the acp-registry area. The raw summary confirms the probe change that preserves an empty nextCursor and the added …
Description check Passed The description follows the template's main sections: Problem, Change, Scope, Verification, and an agent attribution line. The Problem and Change sections are clear. Scope links related issues but doe…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the fix (empty next-page cursor keeps Load more in session lists) and the acp-registry area. The raw summary confirms the probe change that preserves an empty nextCursor and the added test and e2e scenario, so the title matches the main change.

Full details: Description check

Explanation

The description follows the template's main sections: Problem, Change, Scope, Verification, and an agent attribution line. The Problem and Change sections are clear. Scope links related issues but does not explicitly say why this bug fix needs no issue or whether a maintainer requested it. Verification gives concrete before/after results, commit references, and recordings, and it names the checks run. Those gaps are minor, so the description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between efbd62a and e227785.

Files selected for processing: 3

  • apps/server/src/provider/AcpRegistryProbe.test.ts
  • packages/provider-acp-registry/src/server/probe.ts
  • scripts/scenarios/acp-session-list-keeps-empty-cursor.e2e.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant