webtest

command
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 36 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command webtest serves the desktop app's window in a browser, for tests and screenshots: the real assets and the real service (internal/ui/gui) on a demo home made from the agents' test fixtures, with a stand-in for the Wails runtime. It is not shipped.

The demo home has Claude Code, Codex and OpenCode sessions; this program, run as opencode, is the stand-in OpenCode (internal/testkit/fakeopencode), whose background service is stopped unless POST /reset?opencode=running starts it (opencode=restart: of another version than the program, so opening a session would restart it; opencode= outdated: every protection hook installed, hopsesh's plugin with one of its files an older hopsesh's; opencode=removed: installed, the service running, and OpenCode's own config removing hopsesh's plugin; opencode=failed: installed, the service running, and the plugin failing to load).

It also has stand-in Claude Code and Codex clouds and a Copilot cloud agent: this program, run as claude, codex or gh, is the stand-in claude, codex or gh; the demo repository's GitHub remote is a local bare repository; POST /cloud adds a cloud session (?cloud=copilot-cloud for a Copilot task, ?cloud=codex-cloud for a Codex cloud task with ?env=; ?handed=1 records it as one hopsesh handed off; it sets the failure the next driver call plays); POST /dirty leaves work in progress in the demo repository, for a hand-off; and a command the window opens "in a terminal" runs in the background instead.

The terminal window: /terminal/ is the real page (with its content security policy), and its two streams are WebSockets to /stream. POST /reset?terminal=here makes sessions and steps open in the app's own terminal (other resets choose the user's terminal app, which the older tests expect), and &close=1 closes tabs whose program ended well; POST /terminal-test/open?title=…[&trust=1][&quiet=1][&kind=step][&as=claude] opens a tab running termfake (internal/testkit/termfake), as an entry point would; GET /terminal-test/links lists the links the window asked hopsesh to open (no browser opens), and "app:<name>" for each desktop app it asked to bring forward (none opens). POST /live?session=<id>&entrypoint=claude-desktop makes a Claude Code session open in the Claude app (entrypoint=cli: in a terminal). POST /seed?n=220 adds n made-up Claude Code sessions over a dozen made-up repositories and the last 90 days (for a long list).

go run ./internal/devtools/webtest -addr 127.0.0.1:8765 -home /tmp/demo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL