All notable behavior changes of the SearchBox patch. Versions below are the
internal iteration numbers used while developing against OpenCode Desktop
build 11831 (app-11831-vNN.asar); the public project starts at 1.0.0.
Sync with OpenCode Desktop 2.0.11:
- The native navigation chain (
pendingMessage → loadMore → scrollToMessage) moved from the main bundle into a lazily-loadedroute-*.jschunk with minified names.patch-asar.mjsnow parses the identifiers out of the matchedCk({...})call and injects thewindow.__ocNavbridge there, so pen-drop navigation keeps riding the app's own loader/reveal pipeline. - Build 11831 (
main-*.jsanchor) is still patched the old way. - When neither anchor is recognized the bridge is skipped with a warning and the search UI still installs standalone (REST index + DOM scan + legacy scroll) instead of aborting.
- Verified on 2.0.11:
[data-message-id]/UserMessagerows,[data-session-title], and the/session/:id/message,/api/session/:id/history,/api/session/:id/messageendpoints are all still present.
1.0.0 – 2026-09-18
Public release. Everything is bundled as a zero-dependency, cross-platform patch kit:
- Standalone
patch-asar.mjs(nonpm install; inline asar header read/re-encode). - Installers for Linux, macOS and Windows with auto discovery of the archive, pristine backup and a self-elevated final copy.
restorescripts for every platform.- English + Persian documentation and screenshot.
- Search is restricted to user prompts only (
role === "user"). - Search box is hidden until a chat is loaded and has messages; it no longer floats over empty chats or the tab bar.
- ✕ clear button wipes the whole query + highlights in one click.
- Search state is reset on chat switch (query, results, highlights).
- Navigation switched to the app's native pending-message chain:
setPendingMessage → input2.loadMore (until found) → autoScroll.pause → scrollToMessage → seek → scrollToElement, then flash-highlight. - No scrollTop writes at all → no fighting with Virtua /
shouldAnchorBottom. - Reasoning-gated targets show a gated chip instead of a dead jump; exhausted-history targets show a chip too (no walking through pages).
- Legacy scroll path kept only as a fallback when the bridge is unavailable.
- First bridge (
window.__ocNav) into the compiled renderer bundle withrevealMessage+scrollToEnd; fallback snippet-first path added.
- Rollback of scrollTop-based marching for large distances; prove the app
scrolls only via
scrollToMessage/seekafter a render.
- Match navigation moved to the app's
messageRowIndex/messageAtvirtual stepping to survive virtualization.
- Initial in-page script: Ctrl+F-style box, match list + count, previous/next buttons, arrow-key stepping, highlight flashes.
- RTL fixes for the injected UI and the app's own list direction.
- Direct
scrollTopattempts → still stuttery at distance (root cause: lazy history loading +shouldAnchorBottom), motivating the bridge work.