Skip to content

fix(ui): paginate the prompt versions list so versions past the first 50 load - #17174

Open
mikeldking wants to merge 5 commits into
mainfrom
factory/issue-17171
Open

mikeldking wants to merge 5 commits into
mainfrom
factory/issue-17171

Conversation

@mikeldking

@mikeldking mikeldking commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

resolves #17171

What

The prompt Versions tab now pages through every version of a prompt as you scroll, instead of stopping at the newest 50. There is no screenshot: the sandbox can't attach images to the PR, so the new Playwright test covers the rendered list instead.

  • PromptVersionsList uses a Relay pagination fragment over promptVersions and loads 50 more rows when scrolled near the bottom.
  • The Versions tab counter shows versionCount. It used to count the loaded rows, so it also stopped at 50.
  • Tag Version moves the tag in the Relay store (movePromptVersionTag). It used to refetch the list's first page, which would now collapse a list with more pages loaded back to 50 rows.
  • Not in this PR: the server resolver still loads a prompt's full version history for every page, and the playground's version picker still shows only 50.

Try it

  1. Open a prompt with more than 50 versions and select the Versions tab. The counter shows the full count.
  2. Scroll the list to the bottom. Older versions load until version 1 appears.

How this PR was made

Agent User turns Steering turns Questions asked Sessions
Claude Code (claude-opus-5-5) 7 approx. 5 approx. 0 approx. 1 approx.

Starting point: fix issue #17171 through the factory bug lane; with spec
Steering: correctness, scope
Abandoned: page-level vitest test faking Relay network and scroll; test rules forbid it
Verified: Playwright fails on main, passes here; vitest; make {format,lint,typecheck}-frontend. Not verified: Firefox, WebKit
Look hardest at: movePromptVersionTag.ts and the scroll handler in PromptVersionsList.tsx

Stats as of cf1d194, counted from recall.

… 50 load

The Versions tab fetched promptVersions with the server default of 50 and never
paged, and its counter showed the number of loaded rows. The list now uses a
Relay pagination fragment that loads the next page on scroll, the counter uses
versionCount, and tagging a version moves the tag in the store instead of
refetching (and resetting) the paginated list.

resolves #17171
@mintlify

mintlify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
arize-phoenix 🟢 Ready View Preview Oct 23, 2026, 3:36 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

@github-project-automation github-project-automation Bot moved this to 📘 Todo in phoenix Oct 23, 2026
@mikeldking

Copy link
Copy Markdown
Collaborator Author

Factory assessment

Fit: Implements the user-visible fix fully; the server-side SQL pagination the issue suggests is left out and noted in the PR body.
Evidence: js/app/src/pages/prompt/__tests__/PromptVersionsPage.test.tsx failed on main (rendered 50 of 120 versions), and after the change relay-compiler, make format-frontend, make lint-frontend, make typecheck-frontend and npx vitest run src/pages/prompt src/components/prompt (20 tests) all pass.
Risk: side effects low, performance low, backwards compatibility low, from the frontend reviewer (round 2, no remaining findings).
Review depth: focused, because the change is frontend-only with no schema, API or migration change and every reviewer risk is low.

…test

The fake server only answered the new pagedVersions alias, so on main the test
crashed on a missing field instead of showing the 50-version cap.
@mikeldking

Copy link
Copy Markdown
Collaborator Author

Factory assessment

This replaces the earlier assessment. That one said the test failed on main by rendering 50 of 120 versions, but as committed in dec8d23 the test only answered the new pagedVersions alias, so on main it crashed on a missing field instead. 295222d fixes the test's fake server.

Fit: Implements the user-visible fix fully; the server-side SQL pagination the issue suggests is left out and noted in the PR body.
Evidence: both tests in js/app/src/pages/prompt/__tests__/PromptVersionsPage.test.tsx (as of 295222d) fail on main with expected … to have a length of 120 but got 50, and on the branch relay-compiler, make format-frontend, make lint-frontend, make typecheck-frontend and npx vitest run src/pages/prompt src/components/prompt (20 tests) all pass.
Risk: side effects low, performance low, backwards compatibility low, from the frontend reviewer (round 2, no remaining findings).
Review depth: focused, because the change is frontend-only with no schema, API or migration change and every reviewer risk is low.

… move with a store test

Replace the page-level vitest test, which hand-wrote a fake Relay network,
faked scroll metrics and silenced warnings, with a Playwright test against a
real server that creates 60 versions and scrolls the Versions list, and a
store-level test of the tag move, extracted into movePromptVersionTag.
@mikeldking

Copy link
Copy Markdown
Collaborator Author

Factory assessment

Fit: Implements the user-visible fix fully; the server-side SQL pagination the issue suggests is left out and noted in the PR body.
Evidence: With js/app/src reset to main, the new Playwright test "versions tab lists every version of a prompt with more than one page of versions" fails with Received string: "Versions 50" and, past that line, with Expected: 60, Received: 50; on cf1d194 it and the rest of tests/prompt-management.spec.ts pass in Chromium, as do npx vitest run src/pages/prompt src/components/prompt (20 tests, including the new movePromptVersionTag store test), make format-frontend, make lint-frontend and make typecheck-frontend.
Risk: side effects none, performance low, backwards compatibility none, from the frontend reviewer's final risk line.
Review depth: focused, because the change is frontend-only with no schema, API or migration change and every reviewer risk is low or none.

@claude

claude Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

This branch was successfully deployed

1 active (outdated) deployment
staging — b5731b1c Deployed Oct 23, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📘 Todo

Development

Successfully merging this pull request may close these issues.

[BUG]: Prompt Versions tab only shows the latest 50 versions

1 participant