-
-
Notifications
You must be signed in to change notification settings - Fork 5
Implement infinite scrolling for activity view #2094
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughThis PR introduces pagination support for project activity history. Backend services now accept optional skip and take parameters (defaulting to skip=0, take=100) for retrieving activity data. Frontend implements incremental loading with infinite scroll that progressively fetches activity batches as users scroll through the list. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
frontend/viewer/src/lib/activity/ActivityView.svelte (1)
46-52: Consider adding a loading indicator for progressive loads.Users may not realize more data is being fetched when they scroll near the end. A subtle loading indicator would improve the UX.
You could add a loading state check in the scroll handler:
{#if activity.loading} <div class="text-center py-2"> <span class="text-muted-foreground">Loading more...</span> </div> {/if}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
backend/FwLite/FwLiteShared/Services/HistoryServiceJsInvokable.cs(1 hunks)backend/FwLite/FwLiteWeb/Routes/ActivityRoutes.cs(1 hunks)backend/FwLite/LcmCrdt/HistoryService.cs(2 hunks)frontend/viewer/src/lib/activity/ActivityView.svelte(2 hunks)frontend/viewer/src/lib/dotnet-types/generated-types/FwLiteShared/Services/IHistoryServiceJsInvokable.ts(1 hunks)frontend/viewer/src/lib/services/history-service.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: imnasnainaec
Repo: sillsdev/languageforge-lexbox PR: 1867
File: platform.bible-extension/src/main.ts:239-246
Timestamp: 2025-07-31T19:10:41.178Z
Learning: In the sillsdev/languageforge-lexbox repository, user imnasnainaec prefers to defer code improvements when there are related TODO comments indicating planned refactoring work, choosing to bundle related changes together rather than making incremental improvements that would need to be modified again during the larger refactoring.
📚 Learning: 2025-07-30T04:53:41.702Z
Learnt from: rmunn
Repo: sillsdev/languageforge-lexbox PR: 1844
File: frontend/viewer/src/lib/entry-editor/ItemListItem.svelte:26-37
Timestamp: 2025-07-30T04:53:41.702Z
Learning: In frontend/viewer/src/lib/entry-editor/ItemListItem.svelte, the TODO comments for unused props `index` and `actions` are intentional reminders for future work to be completed in a separate PR, not issues to be resolved immediately. These represent planned functionality that will be implemented later.
Applied to files:
frontend/viewer/src/lib/activity/ActivityView.svelte
🧬 Code graph analysis (4)
frontend/viewer/src/lib/services/history-service.ts (1)
frontend/viewer/src/lib/dotnet-types/generated-types/LcmCrdt/IProjectActivity.ts (1)
IProjectActivity(9-16)
frontend/viewer/src/lib/dotnet-types/generated-types/FwLiteShared/Services/IHistoryServiceJsInvokable.ts (1)
frontend/viewer/src/lib/dotnet-types/generated-types/LcmCrdt/IProjectActivity.ts (1)
IProjectActivity(9-16)
backend/FwLite/FwLiteWeb/Routes/ActivityRoutes.cs (3)
backend/FwLite/LcmCrdt/HistoryService.cs (1)
HistoryService(67-224)frontend/viewer/src/lib/services/history-service.ts (1)
HistoryService(20-80)frontend/viewer/src/lib/project-context.svelte.ts (1)
historyService(93-95)
backend/FwLite/LcmCrdt/HistoryService.cs (2)
backend/FwLite/LcmCrdt/Data/MiniLcmRepository.cs (1)
IAsyncEnumerable(127-155)backend/FwLite/LcmCrdt/CrdtMiniLcmApi.cs (8)
IAsyncEnumerable(121-128)IAsyncEnumerable(162-169)IAsyncEnumerable(215-222)IAsyncEnumerable(259-266)IAsyncEnumerable(352-355)IAsyncEnumerable(388-391)IAsyncEnumerable(393-400)IAsyncEnumerable(613-628)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Build UI / publish-ui
- GitHub Check: Build API / publish-api
- GitHub Check: Build FwHeadless / publish-fw-headless
- GitHub Check: check-and-lint
- GitHub Check: Analyze (csharp)
- GitHub Check: frontend-component-unit-tests
- GitHub Check: frontend
- GitHub Check: Build FW Lite and run tests
🔇 Additional comments (7)
backend/FwLite/LcmCrdt/HistoryService.cs (2)
69-69: LGTM: Pagination parameters with sensible defaults.The addition of optional
skipandtakeparameters with defaults maintains backward compatibility while enabling pagination.
83-83: LGTM: Pagination applied correctly.The query now properly applies skip and take operations for pagination.
frontend/viewer/src/lib/services/history-service.ts (1)
65-67: LGTM: Pagination parameters properly forwarded.The method signature and implementation correctly handle pagination for both the JS-invokable API and HTTP fallback paths.
frontend/viewer/src/lib/dotnet-types/generated-types/FwLiteShared/Services/IHistoryServiceJsInvokable.ts (1)
15-15: LGTM: Generated type definition updated correctly.The signature now includes pagination parameters, aligning with the backend JSInvokable method.
backend/FwLite/FwLiteShared/Services/HistoryServiceJsInvokable.cs (1)
17-19: LGTM: Parameters properly forwarded to the underlying service.The method correctly accepts pagination parameters and forwards them to the history service.
frontend/viewer/src/lib/activity/ActivityView.svelte (2)
16-18: LGTM: Sensible pagination constants.The threshold and batch size values provide a good balance between network efficiency and user experience.
55-91: LGTM: Infinite scroll implementation is well-structured.The VList integration with scroll detection and conditional rendering works correctly. The selectedRow initialization ensures the first item is selected when data arrives.
No description provided.