UI does not display all repositories #12339

Open
opened 2025-11-02 10:06:05 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @KazzmanK on GitHub (Jan 16, 2024).

Description

Under root of Gitea UI there is a repository counter :
image

And a list of items under it takes a REST as data source, so it is the easiest way to get a json with all repositories.

I personally hate pagination, so , as Gitea is superfast, I configured items per page to higher numbers

[api]
DEFAULT_PAGING_NUM = 100

[ui]
FEED_PAGING_NUM = 100
EXPLORE_PAGING_NUM = 100
ISSUE_PAGING_NUM = 100

[ui.user]
REPO_PAGING_NUM = 100

So, by now all repositories must fit in this request
/repo/search?sort=updated&order=desc&uid=4&team_id=undefined&q=&page=1&limit=100&mode=&archived=false

but they are not, this request returns only 50 repositories, but UI thinks that it is OK, and pagination control at the bottom is grayed.
image
UI works as expected, but service is not.
To get all 65 repositories I must make two calls
/repo/search?sort=updated&order=desc&uid=4&team_id=undefined&q=&page=1&limit=50&mode=&archived=false
/repo/search?sort=updated&order=desc&uid=4&team_id=undefined&q=&page=2&limit=50&mode=&archived=false

Somewhere inside there is no respect to limit counter (=100 in my case)

Screenshots

--

Gitea Version

1.21.3

Can you reproduce the bug on the Gitea demo site?

No

Operating System

win

Browser Version

120

Originally created by @KazzmanK on GitHub (Jan 16, 2024). ### Description Under root of Gitea UI there is a repository counter : ![image](https://github.com/go-gitea/gitea/assets/13328513/838c1a86-82a5-4344-a23d-5747cbf728e6) And a list of items under it takes a REST as data source, so it is the easiest way to get a json with all repositories. I personally hate pagination, so , as Gitea is superfast, I configured items per page to higher numbers ``` [api] DEFAULT_PAGING_NUM = 100 [ui] FEED_PAGING_NUM = 100 EXPLORE_PAGING_NUM = 100 ISSUE_PAGING_NUM = 100 [ui.user] REPO_PAGING_NUM = 100 ``` So, by now all repositories must fit in this request `/repo/search?sort=updated&order=desc&uid=4&team_id=undefined&q=&page=1&limit=100&mode=&archived=false` but they are not, this request returns only 50 repositories, but UI thinks that it is OK, and pagination control at the bottom is grayed. ![image](https://github.com/go-gitea/gitea/assets/13328513/3f3c8ce7-a542-4c01-809d-8b1a8551f78b) UI works as expected, but service is not. To get all 65 repositories I must make two calls `/repo/search?sort=updated&order=desc&uid=4&team_id=undefined&q=&page=1&limit=50&mode=&archived=false` `/repo/search?sort=updated&order=desc&uid=4&team_id=undefined&q=&page=2&limit=50&mode=&archived=false` Somewhere inside there is no respect to limit counter (=100 in my case) ### Screenshots -- ### Gitea Version 1.21.3 ### Can you reproduce the bug on the Gitea demo site? No ### Operating System win ### Browser Version 120
GiteaMirror added the type/question label 2025-11-02 10:06:05 -06:00
Author
Owner

@yp05327 commented on GitHub (Jan 18, 2024):

The config option is REPO_PAGING_NUM

eba9c0ce48/custom/conf/app.example.ini (L1275-L1281)

@yp05327 commented on GitHub (Jan 18, 2024): The config option is `REPO_PAGING_NUM` https://github.com/go-gitea/gitea/blob/eba9c0ce48c7d43910eb77db74c6648157663ceb/custom/conf/app.example.ini#L1275-L1281
Author
Owner

@KazzmanK commented on GitHub (Jan 18, 2024):

I have REPO_PAGING_NUM also set to 100

Updated first comment

@KazzmanK commented on GitHub (Jan 18, 2024): I have REPO_PAGING_NUM also set to 100 Updated first comment
Author
Owner

@KazzmanK commented on GitHub (Jan 18, 2024):

Gitea now is 1.21.4

I have modified config to make more unique results


[api]
DEFAULT_PAGING_NUM = 100

[ui]
FEED_PAGING_NUM = 101
EXPLORE_PAGING_NUM = 102
ISSUE_PAGING_NUM = 103

[ui.user]
REPO_PAGING_NUM = 104

So UI asks for data with this query
/repo/search?sort=updated&order=desc&uid=4&team_id=undefined&q=&page=1&limit=104&mode=&archived=false

but reply still has exactly 50 items

@KazzmanK commented on GitHub (Jan 18, 2024): Gitea now is **1.21.4** I have modified config to make more unique results ``` [api] DEFAULT_PAGING_NUM = 100 [ui] FEED_PAGING_NUM = 101 EXPLORE_PAGING_NUM = 102 ISSUE_PAGING_NUM = 103 [ui.user] REPO_PAGING_NUM = 104 ``` So UI asks for data with this query /repo/search?sort=updated&order=desc&uid=4&team_id=undefined&q=&page=1&**limit=104**&mode=&archived=false but reply still has exactly 50 items
Author
Owner

@nicolascalev commented on GitHub (Jan 19, 2024):

I hope this helps. 50 is the value that's being hardcoded for that variable REPO_PAGING_NUM

image

And then we are not reading the limit search param from the URL, and just using the config value

image

I am not a Go dev, but it would be nice to get limit or pageSize from the URL and just use it in that function. That should do it right?

@nicolascalev commented on GitHub (Jan 19, 2024): I hope this helps. 50 is the value that's being hardcoded for that variable `REPO_PAGING_NUM` ![image](https://github.com/go-gitea/gitea/assets/33049057/392d6ba1-1c17-431f-8588-31e0789d16b3) And then we are not reading the limit search param from the URL, and just using the config value ![image](https://github.com/go-gitea/gitea/assets/33049057/57b0a4cf-18ba-4ee0-a6a2-4afe90803c1b) I am not a Go dev, but it would be nice to get `limit` or `pageSize` from the URL and just use it in that function. That should do it right?
Author
Owner

@KazzmanK commented on GitHub (Jan 19, 2024):

I override both REPO_PAGING_NUM in ui.user and ui.admin but it does not help.
These default hardcoded values are about to be overrided with app.ini values.

@KazzmanK commented on GitHub (Jan 19, 2024): I override both REPO_PAGING_NUM in ui.user and ui.admin but it does not help. These default _hardcoded_ values are about to be overrided with app.ini values.
Author
Owner

@yardenshoham commented on GitHub (Jan 19, 2024):

Set MAX_RESPONSE_ITEMS in api
https://docs.gitea.com/administration/config-cheat-sheet#api-api

@yardenshoham commented on GitHub (Jan 19, 2024): Set `MAX_RESPONSE_ITEMS` in `api` https://docs.gitea.com/administration/config-cheat-sheet#api-api
Author
Owner

@KazzmanK commented on GitHub (Jan 19, 2024):

It worked, and now it is a clear discrepancy between list of repos and pagination control attached to this list.
Also, it is not clear that one setting may be capped by other setting.
Or pagination control should be capped by the same MAX_RESPONSE_ITEMS setting as list.

  • Repo List is controlled by ui.user.REPO_PAGING_NUM and capped by api.MAX_RESPONSE_ITEMS
  • Pagination control of Repo List controlled by ui.user.REPO_PAGING_NUM alone
  • Nothing said about that in docs
@KazzmanK commented on GitHub (Jan 19, 2024): It worked, and now it is a clear discrepancy between list of repos and pagination control attached to this list. Also, it is not clear that one setting may be capped by other setting. Or pagination control should be capped by the same MAX_RESPONSE_ITEMS setting as list. - Repo List is controlled by ui.user.REPO_PAGING_NUM and capped by api.MAX_RESPONSE_ITEMS - Pagination control of Repo List controlled by ui.user.REPO_PAGING_NUM alone - Nothing said about that in docs
Author
Owner

@zmweske commented on GitHub (Apr 25, 2024):

I found that ISSUE_PAGING_NUM also limits the response of an API call, though it should probably only affect the UI itself. When calling against /repos/issues/search, the API is limited by a setting configured under the [ui] section of app.ini.

@zmweske commented on GitHub (Apr 25, 2024): I found that `ISSUE_PAGING_NUM` also limits the response of an API call, though it should probably only affect the UI itself. When calling against `/repos/issues/search`, the API is limited by a setting configured under the `[ui]` section of `app.ini`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12339