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

Keywords are sometimes missing #10663

Closed
pentamassiv opened this issue Feb 23, 2025 · 5 comments · Fixed by #10666
Closed

Keywords are sometimes missing #10663

pentamassiv opened this issue Feb 23, 2025 · 5 comments · Fixed by #10666
Assignees
Labels
A-frontend 🐹 C-bug 🐞 Category: unintended, undesired behavior

Comments

@pentamassiv
Copy link

Current Behavior

When I search for a crate, e.g. enigo and click on its name, the description of the crate and other metadata gets displayed. However the keywords are missing. If I open the crate details in a new tab instead, the keywords get displayed.

Missing keywords:
Image

Correctly displayed keywords:

Image

Expected Behavior

The keywords of a crate should always get displayed, no matter if it gets opened in a new tab or in the current tab

Steps To Reproduce

  • Open crates.io
  • Search for "enigo" (anything will do)
  • Right click on the result and open in a new tab
  • Left click on the result and open it in the current tab
  • Compare the content of the tabs

Environment

  • Browser: Librewolf 135.0.1-1
  • OS: Arch Linux

Anything else?

When the keywords are missing, the "Toggle Reader view" is available. If the keywords are present, the toggle is missing. That's not important to me, but I thought that's curious too

@Turbo87 Turbo87 added C-bug 🐞 Category: unintended, undesired behavior A-frontend 🐹 labels Feb 23, 2025
@Turbo87
Copy link
Member

Turbo87 commented Feb 23, 2025

@eth3lbert could this be related to your latest data loading changes?

@eth3lbert
Copy link
Contributor

eth3lbert commented Feb 23, 2025

@eth3lbert could this be related to your latest data loading changes?

I think this happens because we're using peekRecord() in routes which was introduced in #10369. Search crates don't have keywords, and peekRecord() gets the record from the store instead of asking the server, so the keyword ends up null.

@eth3lbert
Copy link
Contributor

A naive solution is to always use queryRecord(). A slightly better approach would be to check the peeked record. If the keywords is null, then call queryRecord(). This is reasonable since we have the create request with default includes.

@pentamassiv
Copy link
Author

Thank you for your quick response.

Is this already deployed? I am asking, because there is no changed behavior for me. The keywords are still missing if I don't open the crate in a new tab.

@Turbo87
Copy link
Member

Turbo87 commented Feb 25, 2025

nope, only merged, not deployed yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend 🐹 C-bug 🐞 Category: unintended, undesired behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants