Skip to content

Conversation

@hamza221
Copy link
Contributor

Fix #1909
I couldn't reproduce in a deterministic manner useInfiniteScroll doesn't always trigger for pages with 1,2 activities disabling it makes reproduction easier.

Repro:

  1. Have a tab with one activity
  2. If the api request doesn't get triggered a second time with a 304response loading Icons doesn't disappear

@hamza221 hamza221 requested a review from susnux March 20, 2025 12:46
@hamza221 hamza221 self-assigned this Mar 20, 2025
@codecov
Copy link

codecov bot commented Mar 20, 2025

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 30.85%. Comparing base (1d69d66) to head (9ec95b2).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
src/views/ActivityAppFeed.vue 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1931      +/-   ##
==========================================
- Coverage   30.89%   30.85%   -0.04%     
==========================================
  Files          43       43              
  Lines        1615     1617       +2     
  Branches      110      110              
==========================================
  Hits          499      499              
- Misses       1090     1092       +2     
  Partials       26       26              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hamza221 hamza221 requested a review from artonge March 20, 2025 12:48
@hamza221
Copy link
Contributor Author

/backport to stable31

@hamza221
Copy link
Contributor Author

/backport to stable30

@hamza221
Copy link
Contributor Author

/backport to stable29

@cypress
Copy link

cypress bot commented Mar 20, 2025

Activity  Image  Run #2342

Run Properties:  status check passed Passed #2342  •  git commit 42d51a8cf4: fix: disable loading when there are no more activities to load
Project Activity
Branch Review fix/endless-spinner
Run status status check passed Passed #2342
Run duration 02m 42s
Commit git commit 42d51a8cf4: fix: disable loading when there are no more activities to load
Committer Hamza
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 3
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 10
View all changes introduced in this branch ↗︎

hasMoreActivites.value = true
// If less than the hardcoded limit, there are no more activities
if (response.data.ocs.data.length < 50) {
hasMoreActivites.value = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible improvement in the future: Check again after a timeout if there is something new.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This completely breaks the activity stream and needs reverting!

Basically if you upload more than 50 files, it will be the end of your activity stream. In fact 3 uploads will be enough already. You ask the backend for 50 entries, but only get 48, as 3 of them are combined into 1 entry

I see it's also broken before with the loading spinner you tried to fix, but that is another problem. Checking the result size is not the solution. Whether or not you reached the end of the activity stream is indicated by the HTTP status code 304:
https://github.com/nextcloud/activity/blob/master/docs/endpoint-v2.md#http-status

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calendar activities "endless spinner"

5 participants