feat: eval output, scroll --until, session cleanup, snapshot compact#27
Merged
Conversation
…compact 1. eval now JSON-serializes dict/list results to stdout (#23) 2. scroll --until <selector> loops scroll+check until element visible (#24) 3. session cleanup command releases all sessions after crashes (#25) 4. snapshot auto-compacts large pages (>500 lines) showing only interactive elements with a hint to use --search (#26) Closes #23, closes #24, closes #25, closes #26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four agent-friendliness improvements based on real-world usage bottlenecks:
evalreturns output (feat: make eval return output to stdout #23) — dict/list results are JSON-serialized to stdout. Agents no longer need to fall back to MCP playwright for data extraction.scroll --until <selector>(feat: add scroll --until for infinite scroll patterns #24) — scrolls in increments until an element becomes visible. Fixes the infinite-scroll pattern that fails the benchmark. Usage:brow scroll -s 1 --until "text=Article 35"session cleanup(fix: auto-cleanup stale sessions on daemon restart #25) — releases all sessions. After agent crashes, a simplebrow session cleanupunblocks profile locks without needing to identify individual stale sessions.Snapshot auto-compact (feat: snapshot --compact mode to reduce token usage on large pages #26) — pages >500 lines auto-truncate to interactive elements + structural landmarks, with a hint to use
--search. Prevents accidental 300K+ token dumps. Explicit--compactflag also available.Closes #23, #24, #25, #26
Test plan
brow eval -s 1 "result = {'hello': 'world'}"prints JSONbrow scroll -s 1 --until "text=Article 35"on infinite scroll pagebrow session cleanupreleases all sessions