Skip to content

feat(browser): add bounded agent scrolling and waits #12

Closed

Description

@trmosala

Problem

Page tools lack dedicated scrolling and element/navigation waiting.

Implementation order

Browser backlog item 08 of 29. Phase: Agent browsing. This is ordered planning, not a claim that Codex implements every item. Items 24–29 are optional additions.

Acceptance criteria

  • Expose bounded scrolling and cancellable waits with explicit tab targets and timeouts.
  • Preserve task ownership, allowlist and access checks before and after awaits.
  • Test nested scrollers, navigation, expiry and revoked access.

Dependencies

Engineering and validation

Reuse existing Chromium/Electron/OS facilities where available. Preserve main-process ownership and permission enforcement, add no placeholder controls, use existing i18n patterns, and test behavior with synthetic fixtures. Document platform limitations. Baseline: browser-tabs at 47fef3e; see packages/cm-browser/README.md and password-security.md.

Activity

  1. trmosala commented on Sep 16, 2026

    @trmosala
    OwnerAuthor

    Published and remote-confirmed on browser-tabs: 2fefd54. One commit and normal push, 24 reviewed files; pre-push typechecks passed 31/31 (28 cached). Only the two excluded unrelated files remain dirty.

    Adds bounded native scrolling, explicit element/navigation waits and end-to-end cancellation. Main retains task/access/host checks around awaits, source-bound write approval, settlement-held busy ownership and lifetime quarantine after uncertain input-down. Element selectors deliberately support only one ASCII tag/ID/class compound; navigation waits observe exact URL and finished main loading without initiating or stopping navigation.

    Review fixed duplicate-ID cancellation loss, unsafe input recovery, a password-attribute selector oracle, incorrect fixed-element clipping and asynchronous selector-membership changes. Final correctness and standards source reviews report no actionable findings. Initial 39 cm-browser, 89 browser and 15 provider tests plus serial focused/full native checks passed; correction runs passed driver/router 68, tools 26, native i18n 8 and three package typechecks. Final membership correction passed driver 29 and native --scroll-wait. Completed unrelated suites were not repeated. Native evidence uses isolated Electron 42.3.3 / Chromium 148 with controlled timing, not physical-input assurance.

    Remaining gates: seven untranslated English-fallback keys, four known unrelated i18n failures, packaged/native accessibility and macOS/Linux validation, and separate #34 assurance. Lint has documented warnings; this is not warning-free or release approval. Issue remains open. Installed app/bridge and model unchanged. Timeout/auth-misclassification recovery evidence is recorded under #20: #20 (comment).

  2. trmosala commented on Sep 19, 2026

    @trmosala
    OwnerAuthor

    Published and remote-verified on browser-tabs: f617913. Four scoped files; worktree clean. Builds on the existing scrolling/wait implementation 2fefd54; dependency #11 is closed.

    Acceptance:

    • Explicit task-owned tabs, bounded native wheel deltas and cancellable waits with positive timeouts capped at 15000 ms.
    • Ownership, allowlist, source/access epochs and deadlines checked around awaits. Fixed a reproduced gap: scroll and both waits could deliver snapshot text after revoke/regrant between capture and posting. Existing main-owned authority now guards route return and final sidecar post; missing guards fail closed.
    • Nested/chained/viewport scrolling, navigation/loading, expiry, cancellation and revocation covered by unit and native fixtures.

    The corrected regression failed for all three operations before the fix, delivering page text after revocation. Afterward, 3 tests / 33 assertions passed across success, route revocation, post revocation and missing-guard cases. These are deterministic real-router/bridge seams with synthetic contents, not naturally timed native races.

    Verification: desktop typecheck and full suite 536 pass / 1 skip / 0 fail, 3724 assertions; unchanged cm-browser typecheck and 91 tests / 3653 assertions. Focused --scroll-wait and full native smoke passed serially on Windows, Electron 44.3.0 / Chromium 152.0.7977.78. Formatting/whitespace checks passed. Scoped lint: 12 warnings / 0 errors. Normal push hooks: 31/31 typecheck tasks passed, 29 cached. Parent standards/correctness review found no further actionable finding; the worker failed to start, so no independent review is claimed.

    Limits remain documented in password-security.md: restricted ASCII selectors, no iframe/shadow search in element waits, no guaranteed wheel distance or empty-container targeting, navigation observation is level-triggered and never initiates/stops a load. Cancellation cannot recall already-dispatched effects; native ownership remains held through settlement. Full native smoke emitted Mojo Widget, fixture ERR_EMPTY_RESPONSE and ObserverList reentrancy diagnostics.

    Closing scoped implementation acceptance, superseding historical OPEN checkpoints without waiving their limits. Packaged/platform, physical-input/accessibility and verified-localization validation remains under #19; #34 security assurance stays separate. No installed app/server/bridge restart, release or deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions