Skip to content

Add "Load more" pagination to pipeline list#6200

Open
savv wants to merge 2 commits intowoodpecker-ci:mainfrom
greentriangle:pagination
Open

Add "Load more" pagination to pipeline list#6200
savv wants to merge 2 commits intowoodpecker-ci:mainfrom
greentriangle:pagination

Conversation

@savv
Copy link

@savv savv commented Mar 5, 2026

Closes #2976

Demo of what it looks like:

image

@qwerty287
Copy link
Contributor

Thanks!

We are using infinite scroll for pagination though:

export function usePagination<T, S = unknown>(

Would be nice to use this instead of a load more button.

@savv
Copy link
Author

savv commented Mar 6, 2026

@qwerty287 I gave this a try, but understand this logic a bit less well (which is why I had opted for something simpler). What do you think?

@qwerty287
Copy link
Contributor

Thanks, yes. The issue is that we load the pipelines centrally in web/src/views/repo/RepoWrapper.vue and just pass it using provide/require to the pipelines list. I don't have a good solution how we can easily implement that with pagination. If you have an idea - just tell, otherwise I'll try to check this out more detailed again later

@savv
Copy link
Author

savv commented Mar 6, 2026

Thanks, yes. The issue is that we load the pipelines centrally in web/src/views/repo/RepoWrapper.vue and just pass it using provide/require to the pipelines list. I don't have a good solution how we can easily implement that with pagination. If you have an idea - just tell, otherwise I'll try to check this out more detailed again later

@qwerty287 Sorry, I can't find a cleaner way either and I'm not even 100% sure I understand everything. If you have a proposal how data should flow I could give it a crack.

I should also say that Woodpecker has been amazing for us so far (so amazing, that I was initially shocked that this feature is missing). With the aggressive caching that we were able to do on our own CI instance, we got builds down from 5+ min to ~20 seconds. Thanks for maintaining!

@qwerty287
Copy link
Contributor

Ok I looked at the code again, and I actually don't think it's easy to make this working right now in a clean way.

What should be done better is esp. how the filtering works. Because if you right now view pipelines for a single branch/PR, it will take the ones the frontend has loaded already and filters it in the frontend. This is really bad style. It should use server-side filtering. For branches, this would be available. For PRs not, and it isn't possibly to implement that cleanly because right now we compare the PRs based on the ref, but every forge uses a different ref for PRs. After #4626 it should be easier to implement the server-side filtering for pull requests.

When we have server-side filtering, we can move the pipeline loading from the repo wrapper to the individual list views, and implement the pagination there.

This would be the clean solution I'd prefer, but it likely won't be doable in the next time.

@woodpecker-ci/maintainers What do you think about this?

@xoxys
Copy link
Member

xoxys commented Mar 6, 2026

I also tried to implement the infinite scroll without success. Having at leadt one working solution for pagination is better than nothing. Would vote to add it if someone as a better approach this can be replaced later.

@6543
Copy link
Member

6543 commented Mar 7, 2026

agree, refactoring and imprufing can be done later on too :)

@qwerty287
Copy link
Contributor

Then please add a TODO comment so we don't forget about it

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add pagination on repo pipelines view

4 participants