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

Last visited repos block is not per-user #4426

Open
3 tasks done
zc-devs opened this issue Nov 21, 2024 · 4 comments
Open
3 tasks done

Last visited repos block is not per-user #4426

zc-devs opened this issue Nov 21, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@zc-devs
Copy link
Contributor

zc-devs commented Nov 21, 2024

Component

web-ui

Describe the bug

The repositories from another user are shown in the last visited repos block.

Steps to reproduce

  1. Woodpecker + Gitea
  2. Create an organization in Gitea
  3. Create two users and put them in the org
  4. Under User 1 create some repos in Gitea
  5. Under User 1 enable the repos in Woodpecker
  6. Relogin under User 2 in Woodpecker
  7. Open repositories and see last visited repos from User 1.

Expected behavior

Under User 2 the last visited repos shows repositories in the order how they were accessed by User 2.
(Under User 2 the last visited repos block is empty in case of newly created repos).

System Info

WP next-350082cd19, Gitea 1.22.3, Postgres 16, Kubernetes v1.30.6+k3s1

Additional context

#4386

If the "last access" list is not user based, we should look into that

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
@zc-devs zc-devs added the bug Something isn't working label Nov 21, 2024
@qwerty287
Copy link
Contributor

So this is actually not per-user, but per-browser. So it stores the last visited repos in the browser and if you login with a different user on the same browser, it'll obviously show the pipeline from the first user.

Not sure if we should change this. We could just clear the storage on logout but then the last visited repos are not available anymore if you login again.

@zc-devs
Copy link
Contributor Author

zc-devs commented Dec 21, 2024

I thought it was

If you never visited a repo it shows the first 4 repos from the "general" list (probably sorted by last pipeline time)

but it is even worse.


Subjective ⬇️

As you can suppose, previous state of repos list was useful. Now it is not.
It should block the release. What should be done to proceed?

  1. Make it per user as it was planned (Last visited repos block is not per-user #4426)
  2. Let users understand what is going on on this flashing christmas tree lists (Add headers and tooltips for new repo list #4428).
  3. Make the number of last visited repos = 2 (Adjustable number of last visited repos #4424).
  4. Bring back sorting by name in the all repos list (Add sorting method to the repos list #4423).
  5. Fix doubled requests and make commitment to fix N+1 (New repos list triggers rate limiting #4427).

At least this needs to be done to bring repos list to useful state again.

P.S. All of this doesn't bother me much, as I have no plans to use 3.0. And if it isn't fixed by version I would like to use, I can fix it (probably by reverting). So, think about other users.

@qwerty287
Copy link
Contributor

Well, I don't have any issues with the new list. Of course it's not perfect, all the issues you list are valid and should be added at some point, but that's nothing required. The only real problem that should be fixed before the release imo is #4427.

And to be honestly, your issue here seems very special. Who usually logs in with more than one account?

@zc-devs
Copy link
Contributor Author

zc-devs commented Dec 21, 2024

So this is actually not per-user, but per-browser.

I've moved this issue into one discovered by you. I've updated the original post.

And to be honestly, your issue here seems very special. Who usually logs in with more than one account?

¯_(ツ)_/¯
At least it doesn't match to the initial intention.

(Initially I described another issue, where I used two tabs in different Firefox containers, I just wanted to cut the long steps to reproduce. That issue is #4607 now).


Of course it's not perfect, all the issues you list are valid and should be added [addressed] at some point, but that's nothing required

Yes, I didn't ask for perfect now. The perfect is in proposals (suggested solutions from linked issues). I didn't list (almost all of) them (the perfect ones) as required.
The point 1 just doesn't meet the "requirements".
The point 2 is just how Woodpecker meets its users. Besides, not difficult to fix, I think.
The points 3, 4, are alternatives (from linked issues), quick fixes, that could bring repo list in usable state with low costs. And then one could implement ideal solution as long as he wants.
The point 5 is just a bug and I asked to fix doubled requests (like alternatives) at first stage.

@zc-devs zc-devs changed the title Last visited repos header shows repos which never have been visited Last visited repos block is not per-user Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants