philipmulcahy / azad

amazon order history reporter chrome extension
Apache License 2.0
210 stars 72 forks source link

Make "I'm doing stuff for you" more obvious during scrapes. #256

Closed philipmulcahy closed 7 months ago

philipmulcahy commented 10 months ago
image
Marco-PF2 commented 9 months ago

I am not sure if this is a bug, or perhaps an enhancement request, but it is related to this issue. In the ReadMe, under Out-of-date Cached Data it says

What's the workaround?

If the extension is working, stop it by pressing the stop button. Then click the "Clear Cache" button and resume normal use.

I see no stop button. Although I did not run into a cached data problem, I did want to halt execution and wondered if there should be a cancel button or something else to stop the process. According to the ReadMe, it appears that there should be.

Marco-PF2 commented 9 months ago

This is my view of the extension while it is in progress:

Screenshot 2024-01-22 042234

When it is finished executing, it does not indicate that. Along with the "I'm doing stuff for you" enhancement, I suggest including an "I'm finished doing stuff for you" message.

Here is what I was shown, and only happened to notice after a minute or two that it stopped changing.

Screenshot 2024-01-22 043133

philipmulcahy commented 8 months ago

I've started work, and have some ideas: 1) that the progress bar should appear earlier in the scrape cycle, replacing the amazon content, along with... 2) a message explaining that we're doing stuff 3) either a button to open the control popup (some users never work out how to pin it, and so are unlikely to see the task counts), OR a repeater for the task counts display - I am now regretting not adopting vue.js a couple of years ago, thinking it was overkill. 4) a charity link. 5) maybe (if space permits) an ad spot - I'm pretty sure that I don't want the advertiser to be able to include any scripts (this is inside the user's logged-in amazon page for goodness sake!), so that might exclude me from adsense or other similar markets - maybe I can start with "put your message here..." and see if anyone gets in touch - low tech, but might generate some charity revenue without being annoying - it's not as if we're not fetching the order data as fast as we can.

philipmulcahy commented 8 months ago

@Marco-PF2 I think your bug is not related, so I made https://github.com/philipmulcahy/azad/issues/266 and plan to get to the bottom of it when I get some time, and for the avoidance of doubt, I believe it's a bug.

philipmulcahy commented 8 months ago

@Marco-PF2 the control popup screenshots you show appear to be working as intended EXCEPT for the absence of of a stop button on the first one. The "status row" appears to be correct - in the first one it says "starting scrape" and has consistent task state counts. The second status row is consistent with a completed scrape, and shows the dates range it covers, with zero queued and running tasks. The status is sent to the popup at periodic intervals (every few seconds), rather than at every event, because that'd be a lot of flickering and extra load on the browser. If the scrape takes long enough (and with 500+ tasks this would be so), I'd have expected to see an intermediate state in the orange box - something like "scraping $DATE_RANGE" or "scraping 2013", but this doesn't seem to happen any more - it jumps straight to the date range. I wonder if this is related to the change I introduced to enable 1,2,3m mini-scrapes for the commercial folks.

In any case, along with the proffered workaround for #266, can I suggest that until this gets tidied up that you take a look at the counts on the right hand side of the status row. Fetch tasks go through several states, but in this view, they are simplified down to queued, running, cache_hit, completed and error. A scrape is only complete when both queued and running are zero. If you want to go deeper... https://github.com/philipmulcahy/azad/blob/946b23026ff41149d8e8a46c3932d502b3482645/src/js/request_base.ts

Marco-PF2 commented 8 months ago

@Marco-PF2 I think your bug is not related, so I made https://github.com/philipmulcahy/azad/issues/266 and plan to get to the bottom of it when I get some time, and for the avoidance of doubt, I believe it's a bug.

Ahhh okay. Tyty!

Marco-PF2 commented 8 months ago

@Marco-PF2 the control popup screenshots you show appear to be working as intended EXCEPT for the absence of of a stop button on the first one. The "status row" appears to be correct - in the first one it says "starting scrape" and has consistent task state counts. The second status row is consistent with a completed scrape, and shows the dates range it covers, with zero queued and running tasks.

Just to be clear, my screenshots were only intended to show that I did not have a stop button in the first one, and for the second one to suggest as an add-on to the "I'm doing stuff for you" enhancement, upon completion show "I'm finished doing stuff for you" or, simply, "All tasks completed," when the screen looks like that.

It wasn't clear to me that "queued_count" referred to tasks, plus unless I'm mistaken, it was still running when that showed zero. I didn't see "running tasks" but I wasn't really looking for it at the time. I will check, but regardless, if you are working on the other visual enhancement I think it would be a good add. It's definitely not a bug in that case lol

philipmulcahy commented 7 months ago

released in 1.12.0