[Userscript] The GanbarOmeter

I just published v4.0.3.

NOTE the filename has changed to bundle.user.js. This should make it easier to install with TamperMonkey.

Changes since v4.0.2

  • make it clearer color inputs are overrides (including changing the cursor to a pointer)
  • all tests work (AKA “skip borked tests!”)
  • added scripts to publish (avoids manual errors)
  • published version is now named “bundle.user.js” to let TamperMonkey install directly
  • uses questions-per-minute for speed (display and in settings) also shows s/q
  • added and check for proper version of localstorage variables (resets to defaults on incompatible changes)
  • removed disabled tzoffset setting (make your case if you need this)
  • fixed (almost?) all the validation logic errors. Binds state bidirectionally across all settings components.

There is still one minor corner-case with the validation messages, but it’s just a minor annoyance and unlikely anyone will care (involves navigating away after creating an invalid setting). I’m probably going to go to a single range slider for min/max values in a future version anyway (or triple for min/target/max).

As always, let me know if you discover anything else I’ve missed.

1 Like

I’d just like to ask if it is this patch or a future patch that addresses when reviews are done via apps? Right now I have one session missing from the data (patch 4.0.2). It’s funny because it sees my total number of apprentice items correctly, and also correctly knows how many are early apprentice, but refuses to put the 13 radicals I just did into the radical ‘bucket’ so to speak and cannot find the session I did with those radicals. What’s weird is that this didn’t use to be a problem and reviews I did via app would be accounted for.

fun pic from before my data finished loading
image

1 Like

The fix for out-of-order reviews went into 4.0.2 (the version before the current one). I thought it was fixed, but you may be experiencing something different.

Can you share an API token with me? My email address is rw [at] pobox.com.

Items in the various queues (apprentice/guru/master/enlightened) for future reviews are called assignments. WKOF caches assignments locally on each person’s browser, and I retrieve the assignments via WKOF. It’s possible that your cache has somehow gotten in a weird state (but a bug in my code is still more likely :slight_smile: ). Let me look to see if I have missed something obvious.

Either way it should have nothing to do with retrieving reviews. The Ganbarometer gauge ONLY looks at assignments, it doesn’t use review data at all (only the speed and reviews widgets use them).

That it counts the total apprentice items correctly is interesting. I suspect I have a typo somewhere that isn’t finding the radicals.

Also: can you please send a screenshot of the data view? Thanks!

This is actually intended behavior. Until I have data to display the first time I have to show something. You should never see this again (unless you move to another browser or otherwise clear your browser storage) as it always displays what’s in cache before pulling new data and updating.

1 Like

Screenshot as requested, with some annotations:

Do you need a r/w token or a read only token?

Oh god, don’t give me write access! :laugh:

1 Like

Thought as much x3

Ah, hell. It’s a stupid one byte bug.

This is the offending line:

  const newRadicals = newItems.filter((s) => s.object == "radicals");

The problem:

(“radical” with no “s”). It’s not a separate session, Those radicals are part of the same session that precedes it.

Yet another missing unit test.

I’ll have a patch out shorly.

1 Like

Ah, I see. I forgot that sessions are separated by the MAD setting.

Those are often my most common bugs :3

1 Like

Okay, v4.0.4 is now published with the fix.

I also fixed some exact equality goofs while I was at it. Javascript differentiates between “==” and “===” which is insane, you pretty much always want the latter but old habits die hard.

Anyway, I’m confident enough in the fix that I pushed it to production with minimal testing.

Let me know if you find anything else!

[And please provide a positive acknowledgment that it did indeed fix the problem. :slight_smile: ]

I seem to be at the mercy of tampermonkey here as it says there’s no update whether I check for updates or try the install from url method.

Github is returning the new version, so Tampermonkey should see it. It also seems to have a habit of silently updating while still saying 'narf, nothing found, so check if the version number on the dashboard is 4.0.4 or not.

You can always force the issue by deleting the script, then reinstalling.

Tried deleting but the version it attempts to install is 4.0.3 (says that in the code itself too).

What do you see when you browse to this address?

https://github.com/wrex/ganbarometer-svelte/raw/main/published/v4/bundle.user.js

(I see version 4.0.4)

The correct version. The URL I was using before was the one in your above post about 4.0.3 and the one in the original post, which both use /dev/ instead of /v4/.

Ah! Yes, those were when I published a dev version while debugging with @Kumirei . The top post should always have the production link (unless I screw something up).

Yeah, I went to the top post thinking “oh, I should grab that one since it’s the most likely to be correct” but the top post also had (and still has) /dev/ so I was a little confused.

I can confirm now that the radicals show up properly in the Ganbarometer.

1 Like

This is why you are the chief quality officer…

The links should be corrected everywhere now. Apologies!

I’ve automated publishing to github, but updating these pages are still a manual process (hence all my mistakes!)