Commit Graph

6 Commits

Author SHA1 Message Date
mcfn.feng 0f4715bb39 [packages/cli-v2]chore: bump version to 1.0.0-alpha.1 2026-03-31 14:28:20 +08:00
4bmis 67fc353765 [packages/cli-v2]chore: add dev/dev:check/dev:test scripts with cargo-watch
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 17:30:23 +08:00
mcfn.feng 89b40c9e0f [packages/cli-v2]test: add wait_page_ready poll and limit parallel threads
Two fixes for remaining flaky E2E failures (5-10 random tests per run):

1. Limit parallel threads to 8 (package.json test:e2e) to reduce Chrome
   process contention and CPU pressure during parallel test runs.

2. Add wait_page_ready() helper that polls document.readyState every 200ms
   (up to 2s) after session start/goto. Called in all 14 local start_session()
   functions and both harness helpers. Prevents tests from interacting with
   pages before DOM is ready under high parallel load.

Result: 441 passed, 0 failed (was 5-10 random failures per run).
2026-03-30 16:53:10 +08:00
mcfn.feng 15a529ccbe [packages/cli-v2]fix: address review — flock EINTR, idle timeout config, faster E2E
Fixes from dual code review (code-reviewer + codex challenge):
- P0: Invalid ACTIONBOOK_DAEMON_IDLE_TIMEOUT_SECS now falls back to default
  instead of silently disabling timeout
- P1: Replace std::thread::sleep with tokio::time::sleep in async fn
- P1: Extract parse_idle_timeout() pure function for race-free unit testing
- P2: Add ACTIONBOOK_DAEMON_HOUSEKEEPING_INTERVAL_SECS for fast E2E tests
  (idle timeout tests now run in 12s instead of 72s)
- P2: Remove manual stale file cleanup from crash_recovery test
- Minor: Handle EINTR in flock with retry loop
2026-03-30 15:20:32 +08:00
Adcent 24c05c128c [codex] Implement browser interaction commands (#351)
* Add browser click interaction tests

* Expand browser click interaction coverage

* [packages/cli-v2]feat: implement browser click command with shared element resolution

Add full browser click implementation with CDP mouse event dispatch,
selector/coordinate parsing, --button/--count/--new-tab flags, navigation
detection, and XPath support. Extract element resolution into a shared
browser::element utility for reuse by future interaction commands.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [packages/cli-v2]fix: use shared resolver for --new-tab href check and add click to help

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add browser type interaction tests

* [packages/cli-v2]feat: implement browser type command

Keystroke-by-keystroke text input via CDP Input.dispatchKeyEvent.
Resolves element through shared element utility, focuses and positions
cursor at end before typing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [packages/cli-v2]fix: populate context URL/title and use char count in browser type

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add browser fill interaction tests

* [packages/cli-v2]feat: implement browser fill command

Direct value setting via native input setter with synthetic input event
dispatch. No keystroke simulation — replaces existing value entirely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [packages/cli-v2]fix: pick native value setter based on element type in browser fill

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add textarea fill regression test

* Add browser select interaction tests

* [packages/cli-v2]feat: implement browser select command

Select dropdown options by value or visible text (--by-text flag).
Dispatches input and change events after selection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [packages/cli-v2]fix: use resolved node for select instead of re-querying with querySelector

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Format interaction files for lint

* [packages/cli-v2]fix: scroll into view before click and replace fixed navigation delay

Scroll elements into the viewport via DOM.scrollIntoViewIfNeeded before
computing bounding-box coordinates, so clicks on off-screen elements
land correctly. Replace the hardcoded 500ms post-click sleep with a
polling loop that detects URL changes at 50ms intervals (2s timeout),
avoiding unnecessary delays for non-navigating clicks and catching
slow SPA transitions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 08:36:54 +08:00
mcfn.feng 68bd1370b8 [packages/cli-v2]chore: add package.json for pnpm monorepo integration
Wraps Cargo commands (build, test, lint, fmt, clean) as pnpm scripts
so cli-v2 integrates with the Turborepo pipeline.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 10:18:48 +08:00