Repository navigation
fix(ui): paginate the prompt versions list so versions past the first 50 load - #17174
mikeldking wants to merge 5 commits into
Conversation
… 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
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Factory assessmentFit: Implements the user-visible fix fully; the server-side SQL pagination the issue suggests is left out and noted in the PR body. |
…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.
Factory assessmentThis 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 Fit: Implements the user-visible fix fully; the server-side SQL pagination the issue suggests is left out and noted in the PR body. |
… 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.
Factory assessmentFit: Implements the user-visible fix fully; the server-side SQL pagination the issue suggests is left out and noted in the PR body. |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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.
PromptVersionsListuses a Relay pagination fragment overpromptVersionsand loads 50 more rows when scrolled near the bottom.versionCount. It used to count the loaded rows, so it also stopped at 50.movePromptVersionTag). It used to refetch the list's first page, which would now collapse a list with more pages loaded back to 50 rows.Try it
How this PR was made
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, WebKitLook hardest at:
movePromptVersionTag.tsand the scroll handler inPromptVersionsList.tsxStats as of cf1d194, counted from recall.