Skip to content

Workspace list shows nothing if page number is too big #11795

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

Closed
mafredri opened this issue Jan 24, 2024 · 8 comments · Fixed by #12611
Closed

Workspace list shows nothing if page number is too big #11795

mafredri opened this issue Jan 24, 2024 · 8 comments · Fixed by #12611
Assignees
Labels
api Area: HTTP API s3 Bugs that confuse, annoy, or are purely cosmetic site Area: frontend dashboard

Comments

@mafredri
Copy link
Member

Page 85 existed while I was batch deleting workspaces. Then after all operations were complete, the page no longer existed and the workspace list "broke", as in, shows that there is nothing and no pagination.

https://big.cdr.dev/workspaces?filter=&page=85:

image
@mafredri mafredri added site Area: frontend dashboard bug labels Jan 24, 2024
@BrunoQuaresma BrunoQuaresma self-assigned this Jan 29, 2024
@BrunoQuaresma
Copy link
Collaborator

BrunoQuaresma commented Jan 29, 2024

I'm wondering if a user accesses a page that does not exist anymore, it should get redirected to the first page or just display a not found message.

@mafredri
Copy link
Member Author

That's a very good question. I'm kind of partial to letting the user choose, i.e. no 404 and no redirect.

In my fantasy, we'd show a tooltip/banner that this page doesn't exist, but we'd still show the page 85 button as selected, with the ability to select a previous page (that exists).

Does that make sense?

@BrunoQuaresma
Copy link
Collaborator

I think I got an idea for a good fix. Thanks for the reply!

@BrunoQuaresma
Copy link
Collaborator

When requesting to the BE a page that does not exist, like 9999999 it returns the following response:

{"workspaces":[],"count":0}

I think this could return a 404 error since this page does not exist, a 400 saying the page has an invalid value, or even the right count for the number of workspaces so we can check if a pagination is wrong by doing some extra calculations.

@BrunoQuaresma
Copy link
Collaborator

Going to unassign this for now since we would need some BE fix first.

@BrunoQuaresma BrunoQuaresma added the api Area: HTTP API label Jan 30, 2024
@BrunoQuaresma BrunoQuaresma removed their assignment Jan 30, 2024
@BrunoQuaresma
Copy link
Collaborator

cc @mtojek

@mtojek mtojek added the need-backend Issues that need backend work label Feb 4, 2024
@BrunoQuaresma BrunoQuaresma added the s3 Bugs that confuse, annoy, or are purely cosmetic label Feb 28, 2024
@mtojek mtojek self-assigned this Feb 29, 2024
@mtojek
Copy link
Member

mtojek commented Feb 29, 2024

Looking into this

@mtojek
Copy link
Member

mtojek commented Mar 5, 2024

@BrunoQuaresma Backend changes are merged. Workspace count should be populated with the real value.

Passing the ball to you to finish frontend changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Area: HTTP API s3 Bugs that confuse, annoy, or are purely cosmetic site Area: frontend dashboard
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants