lichess-org / lila

♞ lichess.org: the forever free, adless and open source chess server ♞
https://lichess.org
GNU Affero General Public License v3.0
15.52k stars 2.26k forks source link

ceval drop suggestion UI glitch #2473

Closed isaacl closed 7 years ago

isaacl commented 7 years ago

On black's turn, a computer suggested drop is shown as a circled semitransparent black piece. When black moves, the drop suggestion momentarily switches colors to a white piece before disappearing.

isaacl commented 7 years ago

@niklasf

niklasf commented 7 years ago

So far I am not able to reproduce this. Maybe I should try a specific position?

isaacl commented 7 years ago

I can reproduce 100% of time, and it doesn't actually matter which side is moving. If the engine suggests a drop and a move is made, the drop suggestion briefly flashes the other color before disappearing. Doesn't matter whether the move is the suggestion or some other move.

isaacl commented 7 years ago

hmm, maybe was recently fixed? I last checked on my home computer a couple days ago, will follow up shortly when I get home.

isaacl commented 7 years ago

please reopen, problem still exists.

Video of issue, OS X chrome 56.

isaacl commented 7 years ago

Niklas helped me investigate this today. The issue is in autoshape.js::compute, which:

This issue affects promotion suggestions and drops. Regular moves do not include a color in the suggestion, so do not flip. Nevertheless, the UI might become more responsive, even for regular move suggestions, if autoshape hid the suggestion as soon as a move was made (and ply didn't match ceval), instead of waiting for a ceval callback. Here's a relevant log snippet, from analyse/ctrl.js::setAutoshape, showing the color flip

computeAutoShapes [{"orig":"b5","brush":"paleBlue"},{"orig":"b5","piece":{"color":"white","role":"queen","scale":0.8}}]
computeAutoShapes [{"orig":"b5","brush":"paleBlue"},{"orig":"b5","piece":{"color":"black","role":"queen","scale":0.8}}]

Related: #2307, #2531

ornicar commented 7 years ago

Niklas fixed it.

niklasf commented 7 years ago

These were two different issues. I am on it though

niklasf commented 7 years ago

Tough luck. There ~is~ might be one more case to be fixed (which is when the PV is not hovered).

Edit: Maybe ... I didn't manage to cause the glitch without hovering the PV. @isaacl: Can you please give it another try on latest master or once the fix is deployed?

niklasf commented 7 years ago

Even with logging the auto shapes (let alone visually) I couldn't see anything wrong. @isaacl If it's different for you, please let me know.

isaacl commented 7 years ago

I saw this yesterday, and was able to reproduce about 30% of the time when I clicked on the ceval drop suggestion. I guess it's not fully fixed?

isaacl commented 7 years ago

https://www.twitch.tv/videos/135833545?t=01h36m27s bishop color on b5

niklasf commented 7 years ago

It's worth checking if this is still an issue after the ui/analyse rewrite.

isaacl commented 7 years ago

OK I'll reopen if I see it again