Repository navigation
Description
Problem
When reviewing a website inside bb’s embedded browser, feedback such as “change this heading” or “make this area more compact” can be ambiguous. The agent needs an exact target and relevant page context without exposing a large technical payload in the visible conversation.
Proposal
Add an annotation mode to bb’s desktop browser that lets users:
- Click a page element or drag to mark a region.
- Add a comment describing the requested change.
- Attach multiple annotations to one prompt.
- See compact annotation cards in the composer and sent message.
- Open a card to preview its captured screenshot.
For selected elements, the agent should receive the screenshot, page URL and title, selector, HTML preview, and relevant computed styles. For marked regions, it should receive the screenshot and viewport-relative rectangle.
Page-derived metadata should be identified as untrusted context. The visible user message should show only the comment and a concise target summary, not selectors, internal markers, or serialized metadata.
Working prototype
A working PoC is available on AndreDalwin/bb’s feature/browser-annotation branch. The branch comparison shows the complete prototype diff.
Prototype evidence
Select an element
Clicking an element gives it a neutral outline and identifies the selected target.
Mark a region
Dragging marks a rectangular area and opens a compact comment panel.
Sent message
The sent message presents the annotation as a compact card such as “1 selected element” or “1 marked region,” while preserving the structured context for the agent.
Inspiration
The interaction is inspired by browser annotation workflows in the Codex app and T3 Code, adapted to bb’s embedded browser, prompt drafts, and thread timeline.
Initial scope
- Desktop embedded browser.
- Element and rectangular-region selection.
- Multiple annotations per draft.
- Screenshot capture and structured agent context.
- Compact composer and sent-message presentation.
- Safe cancellation when annotation mode stops, the page navigates, or the tab closes.
Non-goals for the first version
- Editing the webpage DOM directly.
- Applying generated changes back to the page automatically.
- Supporting browser clients without the desktop browser bridge.
Activity
[-]Add browser annotations for element and region feedback[/-][+]Feature: Add in-browser annotations for element and region feedback[/+]SawyerHood commentedon Sep 9, 2026
Consolidated into #1844. The parent now explicitly includes element/region selection, comments, multiple captures, inspectable previews, and cancellation requirements from this report, with a link to this prototype and screenshots. The later Browser Context contract governs: screenshots remain preview-only; agents receive bounded structured page context. This supersedes the earlier screenshot-to-agent proposal. Closing this report consolidates tracking and does not mark implementation complete.