Skip to content
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

Expanding search results stops early #33427

Open
ClearlyClaire opened this issue Jan 2, 2025 · 0 comments
Open

Expanding search results stops early #33427

ClearlyClaire opened this issue Jan 2, 2025 · 0 comments
Labels
area/web interface Related to the Mastodon web interface status/identified This bug has been identified

Comments

@ClearlyClaire
Copy link
Contributor

ClearlyClaire commented Jan 2, 2025

Steps to reproduce the problem

  1. Search for some term in the Mastodon Web interface
  2. Load past the initial results
  3. Continue scrolling/loading more

Expected behaviour

All results should be returned eventually

Actual behaviour

The interface stops offering to load more results before they have all been returned

Detailed description

This is caused by the hasMore logic in app/javascript/mastodon/features/search/index.tsx relying on the number of results being equal to 1 modulo 10.

This logic is really brittle, and in particular will always break after a few pages because we expand new results by 11 new items, not 10.

Mastodon instance

mastodon.social

Mastodon version

v4.4.0-nightly.2024-12-18

Browser name and version

Firefox 133

Operating system

Linux

Technical details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/web interface Related to the Mastodon web interface status/identified This bug has been identified
Projects
None yet
Development

No branches or pull requests

1 participant