Updates to Lessons, Reviews, and Extra Study

Can you double check? Because it certainly looks like Omega is doing something that breaks Lesson Filter right now. This is on the latest version of Omega which also uses the latest version of Queue Manipulator as far as I can tell. Here are my steps to reproduce:

  1. Enable Reorder Omega and Lesson Filter
  2. Set Omega to use “None” during lessons. (In my case it was already set to “None”.)
  3. In the console, do lessonFilter.filter(0, 0, 2, 1) to filter down to two vocab lessons and a batch size of 1.
  4. Do the quiz for the one vocab lesson in the first batch.
  5. Click the button to continue lessons.

At this point, the expected behavior (which is what happens when Omega is disabled) is for the lesson page to load with the second vocab lesson that had been kept from the filter, with a batch size of 1.

What actually happens is that the one vocab lesson loads momentarily, and then the page is reset back to the original lesson queue and batch size.

I haven’t double checked (yet), but I think that’s Queue Manipulator applying registered manipulations to the new queue?

@Sinyaven made it sound like the manipulations would only be reapplied to the new queue if a change was made by adding or removing a manipulation or explicitly calling refresh. And since Omega was set to “None” there shouldn’t be any manipulations in there anyway. It’s entirely possible I misunderstood or am otherwise missing some important detail though.

Just double checked Omega and it indeed only calls refresh() on user interaction. I also confirmed that the Queue Manipulator is applying registered manipulations upon the turbo:before-visit event fired when you choose to do more lessons

1 Like

Alright, thanks for confirming. I’ll take this over to [For Userscript Authors] WK Queue Manipulator now that that exists.

@tofugu-scott and others. Can you please help me.

I maintain the userscript auto-commit, which checks the current user input and automatically commits it if it’s right. Since the update, it cannot detect user-defined synonyms anymore. It seems like the normal meanings are passed in the willShowNextQuestion event, but the synonyms are not.

You mentioned in a previous post, that since the update you use a separate dictionary to keep the synonyms. What would be a good way to access that dictionary? Or is there another way to access the synonyms?

The dictionary can currently be found by using document.querySelector('script[data-quiz-user-synonyms-target]') which will return an element with text content that you can parse as JSON. The dictionary has subject ids as keys and an array of strings representing the synonyms as values. You will also need to handle the didUpdateUserSynonyms event in the case where the user updates the synonym.


Disclaimer: The information provided above is correct at the time I posted this response. The information is subject to change and doesn’t provide any guarantees that future changes to the implementation of data structures will comply with the above information, nor is it an endorsement of user scripts which are the responsibility of each individual that uses them

3 Likes

That’s what you would expect, right? It’s a kanji learning app. The rest is just scaffolding.

For me, this is a sign that wk I well-designed, not that it needs fixing with a user script.

— Dave

I’ve been out of the game too long and I’m getting a headache.
I’m trying not to get overwhelmed.

But it’s good to see so much progress being made.

1 Like

@tofugu-scott / anyone familiar with the Stimulus API:

Is there an equivalent of the quiz-input controller and willShowNextQuestion event for lessons?

The only controllers I’m aware of are:

['hotkeys', 'accordion', 'body', 'front-chat', 'subject-count-statistics', 'audio-player', 'audio-player', 'quiz-header', 'subject-queue', 'subject-slides', 'tabbed-content', 'user-synonyms']

and none of which expose API’s for observing the current subject and listening for changes.

Thanks and appreciate the support with these breaking-changes WK team.

Which URL are you talking about? The lesson page or the lesson quiz?

After the update, the site feels less responsive. The lesson page seems to lag (~1 sec) when I move between items.

2 Likes

@tofugu-scott I think there’s a bug, where if you pass an item, you get the item level up toast, and while it’s still up, you pass another item, then I think the old toast’s callback for disappearing instead gets rid of the new one.

So let’s say a toast message has to stay on for 1 second. First one appears, stays on for 0.6 seconds, then the next one appears, and this one only stays there for 0.4 seconds.
I’ll try to get a video of this the next time I’m doing reviews, but only just noticed it at the last couple.

1 Like

It shouldn’t still be up. I send a didChangeSRS event which the header component receives and displays srs level badge. when you move to the next item the system sends a willShowNextQuestion which the header component uses to dismiss the srs level badge. I have tried answering really fast and cant reproduce what you are suggesting.

Just to reiterate what I said above, the srs badge does auto dismiss after a timeout. It is dismissed when you move to the next item.

1 Like

I might very well be wrong about this, like I said, I only noticed this at the very end of my session, I’ll try to get a video of it with my next session in about 3 hours or so

I’ve returned and made a video.

So pretty much in the video, you see I enter 袖, afterwards 対応 comes up, and I answer it before the previous toast disappeared (just barely). As a result, the new toast comes up, then quickly disappears right after.

So quick reproduction steps:

  1. have 2 items that are both half-complete right after each other in the review queue
  2. answer the first one, completing it, this should bring up the level up toast
  3. answer the second one before this previous toast disappears

Result: the second toast only appears for a short time (I assume it appears for the time the previous one should have still been visible for) then disappears before it should. How long the new toast appears for does depend on how quickly the new item was completed.

some more info while I have the screen still

The console seemingly doesn’t have anything in it, but here’s a picture:


Browser is firefox version 112.0.2 (64-bit)
OS: Arch Linux

Should I make this an email?

1 Like

I had a look at your video, why is the input not turning green after you answer the question? Which user scripts are you currently running?

It has lightning mode on from double check, so it automatically skips to the next question. Makes it a bit easier to show the issue.

That would explain why I can’t reproduce the issue. I can’t look into this any further as it would appear to be an issue caused by a user script. We don’t support user scripts I am afraid as it is code outside my control and as such I can’t be responsible for the bugs they may introduce.

Your issue may very well not be caused by a user script, but reproduction needs to happen when tampermonkey and friends are not installed. I hope you understand.

5 Likes

I just had a quick question if you don’t mind (this seemed like the best place to ask as it’s related to your reply): do you have any recommendations on how I could approach running some code at the end of a review session rather than immediately returning to the dashboard? I know I can, for example, empty out value of data-quiz-queue-done-url-value to make it stay on the reviews page, but I can’t work out how to actually run a function at that point. I assume there isn’t a different event broadcast at that point or something which I could use right?
I know you can’t provide any guarantee of future changes etc. but do you have any recommendations of how I could achieve this at the moment?

1 Like