Skip to content

feat(plugins): support browser annotation context - #3623

Merged
SawyerHood merged 3 commits into
get-bb:mainfrom
timurkhakhalev:feat/browser-annotation-context
Sep 14, 2026
Merged

SawyerHood merged 3 commits into
get-bb:mainfrom
timurkhakhalev:feat/browser-annotation-context

Conversation

@timurkhakhalev

@timurkhakhalev timurkhakhalev commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Human comments

What was wrong

Plugin mention providers could resolve text context only, so a plugin could not attach per-item screenshots as agent-only inputs. Plugin apps also had no supported slot beside the built-in Browser address bar, which forced Browser-scoped actions into unrelated host UI.

The motivating consumer is Browser Annotate: users select page elements, add comments in trusted BB UI, and send the comments with structured element context and screenshots to the current thread.

Demo:

default.browser-annotate-demo-upload.mp4

What changed

Added experimental_images to mention-provider resolution with bounded validation and conversion into labeled agent image inputs.

Added app.slots.experimental_browserToolbarAction, including tab/thread/URL context, host rendering, responsive layout hints, capability reporting, SDK testing support, API maps, authoring documentation, and audit entries. Bumped @get-bb/plugin-sdk to 0.4.93.

Keyboard shortcut registration is intentionally outside this PR while Browser plugin shortcuts are considered alongside command palette actions and #3184.

No host-daemon protocol change is required.

Related to #1844 and #3184.

How you verified

After rebasing onto 3262aadccd:

  • Turbo typechecks passed for the SDK, app, server, and Plugin API Map (9 tasks).
  • Focused Turbo tests passed for mention resolution, authoring docs, app registrations, public types, BrowserTabContent, and API Map surfaces/wireframes (12 tasks).
  • SDK version guard passed for 0.4.93.

Earlier verification:

  • pnpm exec vitest run apps/server/test/services/plugins/plugin-authoring-docs.test.ts apps/app/src/lib/plugin-app-definition.test.ts packages/plugin-sdk/src/__tests__/public-types.test.ts — 75 passed
  • pnpm exec vitest run apps/server/test/services/plugins/plugin-mention-providers.test.ts — 14 passed
  • pnpm exec turbo run typecheck --filter=@get-bb/plugin-sdk --filter=@bb/app --filter=@bb/server --filter=@bb/plugin-api-map --output-logs=errors-only --summarize=false — 9 tasks passed
  • pnpm exec turbo run test typecheck --filter=@bb/plugin-api-map --output-logs=errors-only — 73 tests and 3 tasks passed
  • node packages/plugin-sdk/scripts/check-npm-version-guard.mjs — 0.4.93 is unpublished and eligible for release
  • Packaged macOS arm64 build: Browser Annotate rendered beside the address bar and completed the element-selection, trusted-comment, send, and sent-message inspection workflow shown in the demo

AGENT GENERATED

@github-actions

Copy link
Copy Markdown
Contributor

Thanks @timurkhakhalev for the PR. This repo needs approval before a PR. Join the #contributors channel in Discord (https://discord.gg/kvBU6tJhcJ) and explain what you want to open a PR for and why. A maintainer then adds you to the allow list. This PR now closes on its own. Reopen it or open a new one after approval.

@timurkhakhalev

Copy link
Copy Markdown
Contributor Author

@SawyerHood I updated the PR after your feedback:

  • kept keyboard shortcut registration out of this PR;
  • added the Browser Annotate plugin and demo as the motivating consumer;
  • incorporated your compact-viewport fix;
  • completed the Browser toolbar entry in the plugin API map and its focused tests.

The focused API-map test/typecheck passes (73 tests, 3 Turbo tasks). When you have a chance, could you review the current scope and API shape?

AGENT GENERATED

@SawyerHood

Copy link
Copy Markdown
Collaborator

This looks good to me! I can fix the merge conflicts and land!

@SawyerHood
SawyerHood force-pushed the feat/browser-annotation-context branch from 863b72d to ac0fc73 Compare September 14, 2026 21:38
@SawyerHood
SawyerHood merged commit 2cfd5b8 into get-bb:main Sep 14, 2026
14 checks passed
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.

2 participants