[Userscript] Review Summary on the dashboard

IMPORTANT NOTICE
as of 2023-04-26T10:00:00Z WaniKani has announced it has disabled the Get All Reviews endpoint due to issues with undue load on the servers interfering with normal WaniKani operations (lessons/reviews). This means that the Review Summary script, which displays an overview of recently done reviews, cannot retrieve anything new past this timepoint and will display only the most recent review session before 2023-04-26T10:00:00Z until further notice (effectively making this script obsolete).
Version 0.4 should be working again thanks to the relentless efforts of the amazing KumireiTM on her Review Cache script.
END IMPORTANT NOTICE

latest version: 0.9.4

Adds a Review Summary Tile to the dashboard.

The script relies on the WaniKani Open Framework.
Find the script on GreasyFork.

Disclaimer:
written as a stopgap until WaniKani reimplements a native review summary.
Is it pretty? no
Is the code pretty? Heeeelll no
I copiously copied from the heatmap popper (thanks Kumirei!) and from other parts of WaniKani and from StackExchange, etc, so it’s a real carnival inside - and it probably won’t display that well on all platforms/browsers. This was a function over form kinda thing. Hopefully I can make some improvements over time, but really hopefully WK will return the summaries natively and this can go in the trash.

Basic info
Upon first load, the script will not be aware of recent reviews and will simply retrieve everything from the last 24 hours. After that, every visit to the dashboard will check for new reviews and display those if available. If not available, will display the prior result.
The chevron (^) can be used to show/hide the result percentage for those that don’t want their most recent result staring them in the face on the dashboard. Click the result percentage to open the summary.

Summary window
Click the percentage result to open the summary window

Item details
Click any item to open item details
item_details

Clicking the item in the popup will open the WaniKani item page in a new window.

Settings
Available via the menu
settings_menu_70

settings

Pending items
Things that have been requested, are in the works or simply still need cleaning up
– pitch info in the item popup boxes

History

version date description
0.1 2023-03-29 initial version
0.2 2023-03-30 debugged display of svgs
0.3 2023-04-05 fix item wrap, add totals per stage
0.4 2023-04-26 updated to review tracking version of review cache
0.5 2023-04-28 updated to newest version of review cache (fix locked item issue)
0.6 2023-04-28 updated review cache to skip lessons/extra study
0.7 2023-04-29 updated review cache ref for fix
0.8 2023-05-11 added support for kana only vocabulary
0.9 2023-05-18 proper colour kana_vocabulary
0.9.1 2023-09-14 fix for updated review forecast
0.9.2 2023-09-26 nullpointer fix!
0.9.3 2023-10-24 fix for panel renaming
0.9.4 2024-03-18 font awesome update for invisible icons
43 Likes

Installed and working as expected! Well done!

2 Likes

Fantastic! Thank you so much!

2 Likes

Thanks for lighting a candle rather than cursing the darkness!

I’ve never done more than glance at a summary page, so I’ve no need for this, but I know others feel differently. Nice job paying it forward.

12 Likes

thanks for this :slight_smile:

upon installing and reloading the WK homepage, it displays the accuracy, but when i click on the accuracy to see details, it doesn’t show me any items:

running firefox on macos, if that helps

is there anything i should do/try on my side?

1 Like

same problem here (Firefox 111.0.1).
Thank you so much :slightly_smiling_face:

1 Like

If you hit F12, are there any error messages in the console?
I installed Firefox, but I’m on Windows and it looks like the items display for me - but the behaviour in the screenshot would be what I expect if the script encountered an error during the populating of the window with the items.

edit: :imp: there may or may not be a slight issue with displaying the radicals that are images - I didn’t have any of these in the reviews I tested with (silly me). Fixing now - hang on

edit2: verison 0.2 is out. Let me know if you still have issues

2 Likes

Thank you so so so so so so so so much.

3 Likes

It’s working well, thank you!!!

2 Likes

Love this, thank you so much! :raised_hands: It’s even better than the summary page being able to click on the incorrect items and seeing the full details!

4 Likes

just updated, it now displays the items.

the rendering is a little wonky, but it works

wonky rendering

thank you for your time and work!

2 Likes

lol I was wondering if the window would fit 10 side by side if there was a lot of vocab - obviously not.
If I have some time this weekend I might work on the display side of things a little. It is quite horrendous.

2 Likes

it’s only ever so slightly garish, agreed :sweat:

if you do, a count per srs level might be nice

something like this

3 Likes

Thank you so much!

1 Like

sorry for this late response, this update seems to work perfectly, thank you so much :blush:

1 Like

Definitely a good idea, and not hard to implement. Right now it’s 10 items per row, so semi-countable. If I go for a clean up round, it probably won’t be exactly 10 per row, so these numbers would come in handy.

3 Likes

I spotted another bug. I just finished my morning review session (112 reviewed items) but only 44 items are being shown in my review summary. (I use Firefox v. 111.0.1 + script v. 0.2)

Reviewed items (heatmap userscript):
s1

Review summary :

I did my review session in one go so 112 items should be displayed in my review summary.

EDIT : on Firefox 107.0.1 (+script v. 0.2), I got something different, with more (in fact too many) items displayed (131 items instead of 112).

2 Likes

I really cannot fathom why they got rid of the end of review summary recently. What a completely bone headed decision.

Imagine taking an exam then never being given your results. It’s utterly maddening.

4 Likes

You don’t happen to have multiple tabs open with WaniKani? I can explain the Firefox 107 behaviour - you likely installed the script fresh, in which case it loads reviews from the last 24 hours. Otherwise it loads reviews since your last visit to the dashboard, which can give surprising results if there are multiple windows open.

The update got rid of the concept of a session. This means there are no more session timeouts (something people complained about frequently) as well as issues with open sessions and burden on the server to cope with expiring sessions.
Without sessions there is no more natural grouping of reviews. The summary page used to display all reviews in a session, but now it’s tough to determine what should be displayed on any summary page.

The heatmap displays everything based on time (with a day end that can be configured in the settings, by default 12 midnight), but can’t break up the reviews done on separate times of day.
The Review Summary script displays everything since the last visit to the dashboard, which can theoretically break up single reviewing efforts if the dashboard is refreshed in a separate window.

Unfortunately “in one go” is a concept that can no longer be retrieved from the server. Because a freshly loaded script does display all the items, it’s not likely there is a problem with the item display itself. You can probably get more items to display in Firefox 111 as well by having it load the last 24 hours (which you can trigger by opening the script and putting a different number in the cache version constant).

What I can do is make the cache clearable in the settings - that way you can reset to a ‘last 24 hour view’ if the script doesn’t display everything you want, although it’s at the risk of displaying too much. I’m curious to see what direction WK is going with any native summary page. It should likely be a scrollable history of some sort - which is giving me some ideas for this script (like a cache with a longer memory). I’ll see what I can do, as the layout is also still jarring me.

Thank you for your feedback. Yes I probably had several wanikani tabs opened at the same time. I just completed a review session with only one opened tab and the review summary was working fine :slightly_smiling_face: Thank you for the tip :blush:

Thanks but doing my reviews using a single tab to avoid problem is not an issue, this script is well enough to me :grinning: Thank you again!

2 Likes