Tags: wirewright/wirewright
Tags
d7, soma: implement better cursor subsume under `Rhodium` - Smart subsumption is now completely under `Rhodium`, split into two steps: one is cursorstep which collects info about cursors in the doc, and another when the edit event is handled. The info is stored under `#cursors` shadow attribute in the doc. - Document now supports only one active `@user` cursor. It is chosen with care, so that we do not trigger copies of it in e.g. log nodes, cells, or fragments. `@user` cursor has a "reputation" now, incremented when it is interacted with by the user successfully. - `cursordepth` that we use all over the place now has an overload that supports `#cursors`. Use it in nodestep etc. Use it soma and in other places for consistent cursor tracking. With this change much more reflection becomes controlled. We now don't necessarily need to be afraid of e.g. cursors arriving via sensors and doing something nasty at receipt; since now the original cursor in the document will have a higher reputation and the one that arrived will not receive anything (due to one-`@user` cursor rule). Cursors that are not `@user` can still be created in any amounts; we do not apply the "smart" stuff to them. They just work, anywhere and everywhere, like all cursors behaved before this commit.