Skip to content

Build continuous browser annotations from Synara research #2001

Closed

Description

@currentbits

Implement the first recommended feature from docs/research/2026-11-12-synara.md. Keep Inspect active across picks, collect numbered element annotations with editable comments, preserve draft evidence per thread, and add through existing element chips. Reuse the isolated guest picker and frozen capture serialization; never resolve old selectors against a new page or accept synthetic page input. Invalidate live markers on navigation and fence thread/request races.

Plan:

  1. Inspect current picker, context-chip persistence, IPC contracts and tests; define the smallest complete annotation session.
  2. Implement repeated picking, numbered page markers, review/remove comments and persisted per-thread drafts using current capture/chip paths.
  3. Verify three-pick workflow, keyboard accessibility, navigation/thread/reload isolation, trusted-event guards and regression suites; write review itinerary and commit.

Activity

  1. added
    plan:todo
    plan:doing
    and removed
    plan:todo
    on Nov 12, 2026
  2. currentbits commented on Nov 12, 2026

    @currentbits
    OwnerAuthor

    Implemented repeated Inspect picks into the existing per-thread element-chip draft store, editable numbered annotation list, and document-owned page markers. Added session-scoped cancellation, no-selector marker updates, same-URL capture invalidation, and trusted-input enforcement. Tests pass: 29 renderer/context-draft tests, 37 preview/guest tests, 13 scope/IPC guard tests. Real Electron verification passes zoom 1/1.5 crop checks, three trusted picks, rejection of synthetic page activation, marker removal and stale cancellation; inspected the captured marker screenshot. Finishing pane layout review and final regressions.

  3. added
    plan:done
    and removed
    plan:doing
    on Nov 12, 2026
  4. currentbits commented on Nov 12, 2026

    @currentbits
    OwnerAuthor

    Completed in local branch commit cb41c9a8 (not merged/released). Browser annotation picking now stays active across captures, adds numbered document-owned markers, and edits/removes comments directly in the existing per-thread element-chip draft store. Captures remain frozen and survive draft hydration/thread switches; nothing sends without an explicit Composer send. Crops remain separate existing image attachments, stated in the UI.

    Trusted guest events only; marker updates accept bounded capture IDs, never selectors/scripts, and require the isolated world. Session identity guards rapid stop/restart and late cancellation. Navigation (including same-URL replacements), unbind and destruction settle outstanding picks. Review caught and fixed destroyed-webContents reads, subframe false invalidation, and Escape-during-save restarting a session; focused regressions cover all three.

    Validation: 53 preview/guest/scope/IPC tests + 157 renderer/context/contract/thread tests (210 total), TypeScript/preload consistency check, and git diff --check. Real Electron verification passes three trusted picks, synthetic-event rejection, visible numbered markers/removal, stale cancellation, Escape, and exact crop alignment at zoom 1 and 1.5. Full BrowserPane + real guest was also exercised and its screenshot inspected. Local review itinerary written; QA Vite process stopped. No signed package/install upgrade or main integration performed. External CLI usage and WebMCP remain separate research proposals.

  5. currentbits commented on Nov 13, 2026

    @currentbits
    OwnerAuthor

    Follow-up audit on origin/main b7e7a1b found two gaps, fixed on branch coder/continuous-inspect (b566cbc):

    • A page-dispatched synthetic focusin moved the picker highlight, so a trusted Enter picked an element the page chose. onFocus now requires isTrusted.
    • Under a viewport preset, crops ignored the emulation display scale and captured the wrong region. This fix was ported from local commit 2cdca9ab, which never reached main.

    Each fix has a test that fails first in electron/test/preview-inspect.test.js. Results: preview suites 59/59, browserInspect renderer 6/6, verify:browser-inspect in real Electron OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions