fix(ui): add Load More button to desktop session panel#324
Conversation
The desktop SessionPanel was not wiring up the pagination props (hasMore, loadMore, loadingMore) from useSessionList, so users could only see the first page of sessions. The mobile SessionList already had this — just needed the same treatment on desktop. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dimakis
left a comment
There was a problem hiding this comment.
Centaur Review
Found 1 issue(s).
frontend/src/components/SessionPanel.tsx
Clean, minimal change that mirrors the existing mobile Load More pattern exactly — hook contract, CSS class, and conditional rendering all verified. Only gap is missing test coverage for the new button.
- 🔵 missing_tests (L102): The existing SessionPanel test file (components/tests/SessionPanel.test.tsx) mocks
hasMore: falsebut has no test cases exercising the Load More button — rendering whenhasMoreis true, the disabled state whenloadingMoreis true, or thatloadMoreis called on click. The mobile SessionList page uses the identical pattern and also lacks dedicated tests for it, so this is a pre-existing gap, but worth noting.[fixable]
| </button> | ||
| </div> | ||
| ))} | ||
| {hasMore && ( |
There was a problem hiding this comment.
🔵 missing_tests: The existing SessionPanel test file (components/tests/SessionPanel.test.tsx) mocks hasMore: false but has no test cases exercising the Load More button — rendering when hasMore is true, the disabled state when loadingMore is true, or that loadMore is called on click. The mobile SessionList page uses the identical pattern and also lacks dedicated tests for it, so this is a pre-existing gap, but worth noting. [fixable]
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dimakis
left a comment
There was a problem hiding this comment.
Centaur Review
Found 1 issue(s).
frontend/src/components/__tests__/SessionPanel.test.tsx
Clean, well-tested PR that brings desktop parity with the mobile Load More button. Implementation is correct, mocks match real interfaces, CSS exists, and the only gap is a minor missing negative test case.
- 🔵 missing_tests: No test verifies that the Load More button is hidden when hasMore is false (the default). A negative case like
it('does not render Load More when hasMore is false')with aqueryByText('Load More')returning null would make the conditional rendering contract explicit.[fixable]
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
SessionPanelwas missing pagination — only the first 20 sessions were visible with no way to load moreuseSessionListhook already exposeshasMore/loadMore/loadingMore; the mobileSessionListuses them but desktop never wired them up.session-load-moreCSS class) to the desktop "All" session listTest plan
🤖 Generated with Claude Code