The tool the host should hold when current is no longer allowed: select when the roster
offers it, else the roster's first KNOWN entry, else current unchanged.
Why select first rather than roster[0]: roster order is documented as meaningless for
rendering (VisibleToolbarEntries always uses list order), so it must not quietly
become load-bearing here. select is the neutral tool; falling back to roster order instead
would let a host land the user on the eraser by writing the roster in an innocuous order.
An empty or all-typo roster returns current, so the board never has "no tool" — narrowing
the palette to nothing is not the same as making the board read-only.
The tool the host should hold when
currentis no longer allowed:selectwhen the roster offers it, else the roster's first KNOWN entry, elsecurrentunchanged.Why
selectfirst rather thanroster[0]: roster order is documented as meaningless for rendering (VisibleToolbarEntries always uses list order), so it must not quietly become load-bearing here.selectis the neutral tool; falling back to roster order instead would let a host land the user on the eraser by writing the roster in an innocuous order.An empty or all-typo roster returns
current, so the board never has "no tool" — narrowing the palette to nothing is not the same as making the board read-only.