<holycow23[m]> "Either we can show it like an..." <- Our end goal what we had in mind was to have a proper dashboard (LB-681). So, we might have to refactor the homepage to show this information
<aerozol[m]> "Hey monkey, re. homepage design:..." <- I think that's a great idea for a bit of cross-polination if people don't object to it, that is.
2025-08-19 23120, 2025
monkey[m]
I am personally in favor, i think it will work nicely as a carousel
2025-08-19 23120, 2025
ansh[m]
reosarevok: Is there any way to run musicbrainz server on any port except 5000? I'm running directly on my machine and not on docker
2025-08-19 23146, 2025
lusciouslover has quit
2025-08-19 23106, 2025
lusciouslover joined the channel
2025-08-19 23158, 2025
holycow23[m]
<ansh[m]> "Our end goal what we had in mind..." <- So, what would you suggest for this stat cause I just feel that showing it in the world map visualization might be presenting a type of information which doesn't make much sense for user specific, but at the same time sitewide does make a lot of sense
2025-08-19 23114, 2025
bitmap[m]
<ansh[m]> "reosarevok: Is there any way..." <- you can pass `-p` to plackup to change the port
2025-08-19 23134, 2025
bitmap[m]
e.g. I use plackup -Ilib -r -o localhost -p 5001
2025-08-19 23128, 2025
ansh[m]
bitmap[m]: I tried that, but it does not work. I'm not able to access the webserver on this port
2025-08-19 23141, 2025
ansh[m]
Even tho I see this in the terminal... (full message at <https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/EqaCGShtdHTDBcVoxBAxCmLd>)
2025-08-19 23144, 2025
bitmap[m]
ansh: do you get connection refused or 500 Internal Server Error?
2025-08-19 23145, 2025
ansh[m]
The web page at http://localhost:6000/ might be temporarily down or it may have moved permanently to a new web address.
2025-08-19 23122, 2025
ansh[m]
I've also updated the WEB_SERVER env in DBDefs to localhost:6000
2025-08-19 23155, 2025
ansh[m]
bitmap[m]: ERR_UNSAFE_PORT
2025-08-19 23133, 2025
ansh[m]
I'm able to fetch the HTML if I curl using terminal on the new port, but it does not load on chrome
2025-08-19 23156, 2025
bitmap[m]
ah ok, I've had problems accessing via localhost in chrome before
2025-08-19 23120, 2025
bitmap[m]
you can try having plackup listen on your machine's local IP instead
2025-08-19 23144, 2025
bitmap[m]
or on macos I listen on 'macbook' and have 127.0.0.1 macbook in my /etc/hosts which it seems fine with
2025-08-19 23120, 2025
ansh[m]
lemme try this
2025-08-19 23124, 2025
ansh[m]
* try this. I'm on a mac
2025-08-19 23138, 2025
ansh[m]
Yes, it worked. Thanks!
2025-08-19 23116, 2025
bitmap[m]
nice!
2025-08-19 23120, 2025
ansh[m]
Do we have bootstrap in the frontend?
2025-08-19 23116, 2025
bitmap[m]
ansh[m]: no bootstrap atm, I assume you'll have to add it with `yarn` and setup a webpack loader for sass in webpack/moduleConfig.mjs (unless the package has prebuilt css we can import, I'm not very familiar with it)
ansh: there are likely some commits you can cherry-pick or copy code from (for newly-added files), but I think rebasing it will have too many merge conflicts at this point (the design has changed quite a bit too)
2025-08-19 23106, 2025
ansh[m]
Understood. I'll cherrypick the relevant commits
2025-08-19 23154, 2025
bitmap[m]
looks like we were importing bootstrap css via design-system in that branch, does LB do the same or is it installing bootstrap directly?
2025-08-19 23159, 2025
ansh[m]
In LB, we install bootstrap directly
2025-08-19 23158, 2025
bitmap[m]
okay, better follow how LB does it :)
2025-08-19 23100, 2025
ansh[m]
What is flow-typed? And why do we need it here?
2025-08-19 23107, 2025
ansh[m]
s/why//
2025-08-19 23102, 2025
bitmap[m]
it's like TypeScript's DefinitelyTyped, but for Flow, just a tool to install Flow type definitions
2025-08-19 23144, 2025
bitmap[m]
I guess to have types for the components imported from @fortawesome/react-fontawesome
right, LB is using TypeScript so you probably don't have to do anything like that since the package publishes TS types in a index.d.ts file contained in the package
2025-08-19 23152, 2025
bitmap[m]
they don't publish Flow types so we have to add our own under the flow-typed/ dir
2025-08-19 23106, 2025
ansh[m]
Got it
2025-08-19 23140, 2025
ansh[m]
So, I'll just cherrypick this commit
2025-08-19 23155, 2025
bitmap[m]
if the types don't work anymore (Flow tends to break things) I can fix them
2025-08-19 23149, 2025
ansh[m]
I'll test it and let you know
2025-08-19 23132, 2025
mthax joined the channel
2025-08-19 23100, 2025
lucifer[m]
holycow23: wolf setup should be able to generate stats again now
2025-08-19 23112, 2025
Jigen
hey guys.isn't there a listenbrainz app?
2025-08-19 23103, 2025
relaxo[m]
<jasje[m]> "It can run on iOS as well" <- Sounds good. Lets see, thank you.
2025-08-19 23140, 2025
relaxo[m]
relaxo[m]: The only real problem i have is, that i don't have apple hardware to build and test on.
2025-08-19 23155, 2025
Jigen
ah nvm
2025-08-19 23138, 2025
proxik87 joined the channel
2025-08-19 23152, 2025
proxik87 has quit
2025-08-19 23138, 2025
mukti has quit
2025-08-19 23157, 2025
mukti joined the channel
2025-08-20 23225, 2025
Maxr1998_ has quit
2025-08-20 23236, 2025
Maxr1998 joined the channel
2025-08-20 23202, 2025
bttf has quit
2025-08-20 23217, 2025
bttf joined the channel
2025-08-20 23253, 2025
holycow23[m]
<lucifer[m]> "holycow23: wolf setup should..." <- Hey, thanks for the help. I think there was one more LB-DB PORT issue, have fixed that and its running well now
2025-08-20 23238, 2025
Jigen has quit
2025-08-20 23202, 2025
Jigen joined the channel
2025-08-20 23202, 2025
dseomn has quit
2025-08-20 23222, 2025
dseomn joined the channel
2025-08-20 23229, 2025
Arsen has quit
2025-08-20 23241, 2025
Arsen joined the channel
2025-08-20 23237, 2025
SigHunter has quit
2025-08-20 23221, 2025
SigHunter joined the channel
2025-08-20 23242, 2025
SigHunter has quit
2025-08-20 23235, 2025
SigHunter joined the channel
2025-08-20 23249, 2025
holycow23[m]
lucifer: the [PR](https://github.com/metabrainz/listenbrainz-se… for Artist-Evolution is failing due to a previous initialization of stat by the name `Artist-Evolution` instead of `Artist-Evolution-Activity`. Is there any way in which the same can be deleted from CouchDB?
Totally fine to start with one test until you have everything sorted, usually setting up everything correctly is the hard part.
2025-08-20 23258, 2025
suvid[m]
monkey[m]: yes
2025-08-20 23259, 2025
monkey[m]
Well, regarding the "found multiple", I can see that both your imports in mockImports have the same file name, so you could start by changing one of them and ensure both are present on the page
2025-08-20 23234, 2025
suvid[m]
okay lemme change that
2025-08-20 23252, 2025
suvid[m]
but then when i used getallbytext
2025-08-20 23252, 2025
suvid[m]
it said it couldnt find it
2025-08-20 23219, 2025
suvid[m]
Still the same
2025-08-20 23219, 2025
suvid[m]
`TestingLibraryElementError: Unable to find an element with the text: listenbrainz.zip. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.`
2025-08-20 23229, 2025
monkey[m]
Here on lines 89-90, you can see that you await one of the getAllByText calls but not the other.
suvid[m]: this error on changing the name of the uploaded file to listenbrainz.zip
2025-08-20 23256, 2025
suvid[m]
though i am awaiting getbytext as well
2025-08-20 23206, 2025
suvid[m] sent a js code block: https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/eadatDXwqqTYpzKAfUGsilIj
2025-08-20 23203, 2025
suvid[m]
I removed the await
2025-08-20 23204, 2025
suvid[m]
but still the same
2025-08-20 23207, 2025
monkey[m]
suvid: To print out the component to the console, you can use `screen.debug(undefined, Infinity);`. When I do that, I can see that the elements in question are indeed not in the page markup, so that should be your first lead. The test is not passing because the component does not seem to currently render the imports.
2025-08-20 23242, 2025
suvid[m]
okay...
2025-08-20 23242, 2025
suvid[m]
Does my mockimports not get passed to the post req?
2025-08-20 23221, 2025
suvid[m]
cuz if it does then it should get rendered no?
2025-08-20 23232, 2025
monkey[m]
I think at the moment you do the test assertion, the loading indicator is rendered, so probably need to wait for everything to be rendered
2025-08-20 23244, 2025
suvid[m]
sorry not to the post req
2025-08-20 23244, 2025
suvid[m]
but the data received from post req that we want to display
2025-08-20 23259, 2025
suvid[m]
monkey[m]: so should i add a sleep somewhere?
2025-08-20 23220, 2025
monkey[m]
No, it would be an await mechanism, but let me try
OK, so some progress: Indeed you need to wait for the component to call the API endpoint and render everything, which you can do like so: `await waitFor(() => { expect(screen.getByText("listeninghistory.zip")).toBeInTheDocument(); });`
2025-08-20 23202, 2025
monkey[m]
This assertion now passes for me, provided I change the filename so that only one element with that text is to be found.
2025-08-20 23202, 2025
monkey[m]
Now the next assertion is failing, but that means the assertion above passes.
2025-08-20 23208, 2025
suvid[m]
here:... (full message at <https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/XxGsgXedhvZaBJYXwaouNNDc>)
2025-08-20 23218, 2025
suvid[m]
so i tried searching for spotify.zip
2025-08-20 23218, 2025
suvid[m]
but it couldnt find that as well
2025-08-20 23210, 2025
monkey[m]
suvid[m]: I don't understand this. I don't see spotify.zip defined anywhere as a file name
2025-08-20 23228, 2025
suvid[m]
i changed the name for spotify import in progress to spotify.zip
2025-08-20 23236, 2025
suvid[m]
and the completed listenbrainz one to listenbrainz.zip
2025-08-20 23241, 2025
suvid[m]
apologies for the confusion
2025-08-20 23252, 2025
monkey[m]
Ah OK.
2025-08-20 23251, 2025
suvid[m]
okay so now it matches spotify.zip 🥳
2025-08-20 23257, 2025
suvid[m]
its not matching the date now lol
2025-08-20 23258, 2025
monkey[m]
I think you are confusing your endpoints though. For initial render, the /list endpoint is called, not the one to get a specific import details
2025-08-20 23253, 2025
monkey[m]
suvid[m]: Yes, the assertion seems incorrect, but that is all part of what testing is about: write incorrect expectation, check that it does fail (that way you know there will be no false positives), then fix the test assertion and ensure it passes.
2025-08-20 23224, 2025
monkey[m]
In this case, you have the screen.debug line to allow you to print out the component, and check what is actually rendered.
2025-08-20 23241, 2025
monkey[m]
And on and on we go with each assertion and each test.
2025-08-20 23248, 2025
monkey[m]
If you want to run tests in isolation (which I recommend while you are writing the tests), you can change it("some test description", ... to it.only("some test description", ... with the extra .only
2025-08-20 23200, 2025
monkey[m]
Be sure to remove it after you are done with that test, though.
2025-08-20 23238, 2025
suvid[m]
monkey[m]: yes that is helping a lot
2025-08-20 23201, 2025
suvid[m]
monkey[m]: okay so the .only runs only that test in the file? 😮
2025-08-20 23208, 2025
monkey[m]
Yes indeed.
2025-08-20 23243, 2025
monkey[m]
I mean, if you have multiple .only I suppose it will run multiple tests, but it's meant so you can isolate tests