Skip to content

Add Browser Context runtime consumer - #72

Open
brsbl wants to merge 9 commits into
mainfrom
bb/browser-context-runtime-consumer-thr_p9qmfkggwm
Open

Add Browser Context runtime consumer#72
brsbl wants to merge 9 commits into
mainfrom
bb/browser-context-runtime-consumer-thr_p9qmfkggwm

Conversation

@brsbl

@brsbl brsbl commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Summary

Adds Browser Context as the first consumer of bb's general Browser page-script runtime. Users can select page elements or regions, attach editable comments, stage inspectable composer mentions, and explicitly enable exact-target agent control from the Browser toolbar.

Agent control and persisted state are keyed by the complete Browser identity: clientId + windowId + tabId + navigationEpoch. Realtime reconnects reconcile missed state without letting stale hydration overwrite newer updates. Screenshots remain preview-only; resolved mention context contains the immutable bounded DOM, React, accessibility, and geometry snapshot.

Depends on get-bb/bb#1869 at dd66e0893 and get-bb/bb#1870 at c3fe8ee68. Only this plugin opts into the exact @get-bb/plugin-sdk@0.4.9 and matching builder artifacts; the repository default remains unchanged for other plugins.

Visual evidence

All captures use the exact core top c3fe8ee68, the same Browser Core Test Lab fixture, and a 1280×900 desktop dev-app window. The before state has Browser Context disabled; every after state comes from the exact PR head e5628940b.

Before — Browser Context disabled; no contributed Browser controls

Before: Browser toolbar without Browser Context

After — plugin enabled with agent-control and selection actions in the native toolbar

After: Browser Context toolbar actions

After — exact-target agent control active with the scoped notification in-thread

After: exact-target Browser agent control

After — inspectable captured selection with its screenshot and two comments

After: inspectable Browser selection

Validation

  • Browser Context check: typecheck, build, 41/41 tests
  • Selection activation regression: 4/4 focused tests
  • Repository hygiene: 8 plugins
  • Focused packed-artifact validation: 10 files
  • Full install-ref generation and rebuild validation: passed for all plugins
  • Scaffold clean-install smoke: passed after npm ci
  • Real Electron QA: user and agent entry, exact-target notification, exit, navigation epoch invalidation, reconnect/hydration behavior, click selection without page activation, two sequential comments, mention staging, tooltip, and inspector reopening

Frozen provenance

  • Core top source: c3fe8ee68c5ddfe80b58e4b60bcf4da49bc1e43b
  • @get-bb/plugin-sdk@0.4.9: 69a691ae3055be3a416c36eb4588f6e286b265d7687dcd259fc2d1c13b3a91e3
  • bb plugin build@0.39.0: 4228738add52171fb1adb7ffa8768a694066cfe2a761c134d2a919640e5383f6

BB-Thread-ID: thr_p9qmfkggwm

@brsbl
brsbl marked this pull request as ready for review August 19, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant