Skip to content

release: v0.4.2 — React-compatible click + type/fill#166

Merged
justrach merged 7 commits into
mainfrom
release/0.4.2
May 24, 2026
Merged

release: v0.4.2 — React-compatible click + type/fill#166
justrach merged 7 commits into
mainfrom
release/0.4.2

Conversation

@justrach

Copy link
Copy Markdown
Owner

Summary

Release v0.4.2 — fixes kuri-agent click and type/fill for React/Vue apps.

Version bumps

  • build.zig.zon0.4.2
  • npm/package.json0.4.2
  • CHANGELOG.md — new section

Signing

Binaries signed locally with Developer ID Application: Rachit Pradhan (WWP9DLJ27P). CI release workflow will re-sign + notarize on tag push.

Test plan

  • zig build compiles clean
  • E2E: fill React controlled inputs → state updates
  • E2E: click React button → onClick fires, result renders
  • E2E: reset button → state clears
  • codesign -vvv passes on all binaries

🤖 Generated with Claude Code

justrach and others added 7 commits May 24, 2026 12:56
Windows users were hitting a generic "Unsupported OS" error with no
context. Add a Platform-support table to readme.md (macOS + Linux only,
WSL2 as fallback), and route win32 / MINGW / MSYS / CYGWIN through
explicit messages in both install.sh and npm/bin/install.js that link
issue #153. The npm self-test still passes — the existing
`/unsupported platform: win32/` assertion still matches the new message.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`std.c.clock_gettime` and `std.c.isatty` are POSIX-only — they're the
easiest sites blocking a `-Dtarget=x86_64-windows` build. Route the
three time wrappers in src/compat.zig through a single `realtimeNanos()`
that picks `GetSystemTimeAsFileTime` on Windows and `clock_gettime` on
POSIX. Add `compat.isTtyStderr()` using `GetConsoleMode` on Windows and
`isatty(2)` on POSIX, and switch the three call sites in browse_main,
fetch_main, and server/api_token to it. macOS build + tests unchanged
(the Windows branch is comptime-unreachable on non-Windows targets).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…s-gnu` is green (#153)

Adds enough cross-platform and stub code to make all five binaries
(`kuri`, `kuri-agent`, `kuri-browse`, `kuri-fetch`, `merjs-e2e`) build
clean for `x86_64-windows-gnu`. macOS + Linux builds are unchanged.

What works on Windows:
- Realtime clock, monotonic sleep, TTY detection (compat.zig).
- Mutex / RwLock via Win32 SRWLOCK instead of pthread.
- Stdout/stderr writes via `WriteFile(GetStdHandle(...))`.
- `--version` / `--help` paths through `main` for each binary.

What is stubbed with `error.UnsupportedOnWindows` on Windows (returns
the error at runtime; does not silently no-op):
- `compat.cwd*` file ops, `compat.runCommand`, `compat.tcp*` /
  `TcpStream` / `TcpServer` (raw BSD-socket code).
- `chrome/launcher.zig` Chrome spawn + reaper (uses `fork`+`SIG.KILL`).
- `cdp/websocket.zig` connect + raw socket read; `cdp/client.zig`
  `drainWsEvents`.
- `server/router.zig` `discoverTabs` (uses `std.posix.setsockopt` and
  `std.posix.read` on the raw CDP socket); gets an explicit
  `DiscoverTabsError` so the handler's switch stays exhaustive on both
  platforms.
- `storage/auth_profiles.zig` `deleteProfile` / `listProfiles` (uses
  POSIX `opendir`/`readdir`).
- `server/api_token.zig` `writeMode0600` (uses POSIX `open` + `fchmod`).
- `agent_main.zig` `cmdOpen` (fork+exec Chrome) and `fetchChromeTabs`
  (raw socket).
- `browse_main.zig` `repl` (POSIX stdin fd) and `readLine`
  (`std.posix.read`).
- `lifecycle.zig` `install` (POSIX `sigaction`).

Real Chrome automation, signal-based shutdown, daemonization, the
agent's HAR recorder, and the file-backed auth store are all
follow-up work — none of them are wired up on Windows yet, but the
build succeeds and a Windows binary will load and respond to
`--version`/`--help` / static commands.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a `windows-cross-compile` CI job that runs `zig build
-Dtarget=x86_64-windows-gnu -Doptimize=ReleaseSafe` and asserts that
all four user-facing binaries land as PE32+ executables. This pins the
compile-level Windows baseline introduced in the previous commit so a
future patch can't quietly re-introduce an ungated POSIX call (`fork`,
`std.c.open`, raw `setsockopt`/`read` on a socket) without breaking
CI.

Also widen the readme Platform-support table: Windows is no longer
"Not supported yet" but "Experimental — cross-compile only", with the
runtime caveats (Chrome / daemonize / sockets stubbed) spelled out.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…andlers (#164)

React 18/19 uses event delegation on the root container and ignores
untrusted DOM `.click()` calls. Replace with CDP Input.dispatchMouseEvent
mousePressed/mouseReleased triplet at the element's bounding-rect center,
which produces trusted isTrusted:true events that React's synthetic event
system recognizes. Applies to click, check, and uncheck actions in both
the CLI (agent_main) and HTTP server (router) paths.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ng (#164)

- type/fill now uses per-character CDP Input.dispatchKeyEvent instead of
  setting target.value directly, so React controlled inputs fire onChange
- Server router defaults realistic=true for type/fill (was opt-in)
- Fix JS operator precedence bug in click coordinate calculation:
  r.y+r.height/2 was string-concatenated instead of added
- Add React 18 test fixture (test/react-form.html) for e2e validation

E2E verified: fill name → fill email → click submit → React state
updates correctly, submit handler fires, result div renders.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Version bump and changelog for v0.4.2. Key changes:
- CDP mouse events for click/check/uncheck (React onClick compatibility)
- CDP key events for type/fill (React onChange compatibility)
- Fix click coordinate JS operator precedence bug
- Server realistic mode default for type/fill
- React 18 e2e test fixture

Signed binaries: codesign Developer ID Application: Rachit Pradhan (WWP9DLJ27P)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@justrach justrach merged commit cf866b4 into main May 24, 2026
2 of 3 checks passed
@justrach justrach deleted the release/0.4.2 branch May 24, 2026 04:58
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