Skip to content

fix(browser): bound ARIA snapshots by character budget#25

Open
Bartok9 wants to merge 1 commit into
AtomicBot-ai:mainfrom
Bartok9:sera/aria-char-budget
Open

fix(browser): bound ARIA snapshots by character budget#25
Bartok9 wants to merge 1 commit into
AtomicBot-ai:mainfrom
Bartok9:sera/aria-char-budget

Conversation

@Bartok9

@Bartok9 Bartok9 commented Jul 23, 2026

Copy link
Copy Markdown

Summary

summariseAriaSnapshot only capped lines. Dense short-line SPA trees still push tens of kB into small local-model contexts (8k–16k), which is the failure mode described in #21.

Fix

  • Order-preserving maxChars pack (default 24_000) applied after noise drop, before the line cap
  • Size-truncation footer so the agent knows to scroll/navigate
  • maxChars: 0 / non-finite disables the budget
  • Unit coverage for the pack footer path

Test plan

  • vitest run src/tools/browser/browser-tools.test.ts
  • Optional: browser.read_aria on a heavy SPA and confirm footer + smaller prompt payload

Addresses #21

Agent-Owner: sera

Line-only caps still let dense short-line SPA trees flood small
local-model contexts. Add an order-preserving maxChars pack (default
24k) before the line cap, with a size-truncation footer so the agent
knows to scroll or navigate.

Addresses AtomicBot-ai#21

Agent-Owner: sera
Signed-off-by: Bartok9 <danielrpike9@gmail.com>
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