Lichess with https://siderite.dev/LiChessTools/
Emergent behavior in LiChess Tools - search position in chapter
... it's alive, alive, alive, alive!Intro
Often when one adds features to their product they do it in isolation. You need something specific and you add the tool that allows you to do it. But reach a critical mass and you start finding out scenarios are possible already that you have never considered. This is one of those cases where multiple tools in LiChess Tools lead to a very common and useful result.
Board image and FEN
It all started from Screenshot, the Lichess feature that gives you an image of the board in the current position. It works perfectly, but it's very basic: it doesn't care about your actual board and piece setup and doesn't care about the different things on the board other than the pieces, like arrows or glyphs or other stuff. So, in LiChess Tools, I've built a tool that would improve on that and that was Better exported board image. Now, when clicking on Screenshot/Board buttons, you get a dialog with a board having all of the elements that you can copy as an image.
But there was an issue of comfort here. You had the image popping up, but you had to know to right click, select Save image and so on. And since Lichess has no keyboard handler on Ctrl+C, I've just added that so you can just press Ctrl+C and copy the image with an intuitive keyboard shortcut.
Also, during a bug fix about Ctrl+C having some unexpected effects when the board dialog was not displayed, I thought... wait, can't I just use Ctrl+C to copy the FEN position of the Analysis Board if that's up? And I did that.
The search command
Since I often work with very large studies or PGNs, I implemented a search command. Well, it all started when I've decided to add more commands to the already existing Lichess command system in the header bar, but since that had already been implemented, I've added a short command that you can use like /s <something> which will search things in the current move list: a line, a move, a piece of comment text, partial FEN or even partial pawn structure.
And again, being really lazy, I thought: why not have a visual interface to this that I can open with a keyboard shortcut. And look, Lichess doesn't use Ctrl+F. You know where I am going with this. The search command turned into a fully fledged UI functionality in the analysis move list that can be activated with Ctrl+F.
Confluence
So here I was, in the Analysis Board, testing an opening idea with Explorer Practice when I reached a position I felt I researched in a study, but couldn't remember the continuation for. And I did the following:
- Ctrl+C copied the Analysis Board FEN position to the clipboard
- I opened the study chapter of my analysis for the opening
- I pressed Ctrl+F to find the position
- Ctrl-V to paste the FEN
- Enter to find the position in the move list
What could have been more natural than copy, find, paste? I do it every day in all kinds of situations. But in this case, it was just a lucky combination of preexisting features.
Conclusion
I've wanted to write about something like this for a while, because it's not the first time it happened. The best cases for me are when a user of my extension comes suggesting an idea and I can immediately give him a User Manual link to the combination of existing features that can achieve their goal. It's like learning and playing chess becomes a language with words and concepts that you can just combine into sentences and new concepts.
As always, I am open to even more feedback, new ideas, bug reports and any kind of collaboration or dialogue. Enjoy LiChess Tools and the confluence of wonderful minds we've gathered here on Lichess!
