test-warp-ui
GitHub指导使用 computer_use 工具对 Warp UI 进行视觉测试。涵盖从仓库根目录启动 Warp(处理 API Key 认证)、验证登录状态,以及通过硬编码数据或模拟条件来导航和观察特定 UI 元素、布局和状态的完整工作流。
Trigger Scenarios
Install
npx skills add warpdotdev/warp --skill test-warp-ui -g -y
SKILL.md
Frontmatter
{
"name": "test-warp-ui",
"description": "Guides testing Warp UI features and changes using the computer use tool. Use this skill only when computer-use testing was requested (explicit request or accepted offer) and the computer_use tool is available to the agent. Covers launching Warp and verifying UI behavior.\n",
"user-invocable": false
}
Computer Use for Warp UI Testing
Use the computer_use tool to visually test that Warp looks and behaves as intended after UI changes, when computer-use testing was requested.
Running Warp
Launch Warp from the repository root. The exact command depends on which environment variable holds the API key:
-
If
WARP_API_KEYis already set, omit the flag entirely — the--api-keyflag is bound toWARP_API_KEY, so Warp reads it automatically:cargo run --bin warp -
If the key is in
STAGING_USER_WARP_API_KEYinstead, pass it explicitly via the flag:cargo run --bin warp -- --api-key $STAGING_USER_WARP_API_KEY
Always pass --bin warp explicitly. That target builds the internal (dogfood) channel, which is the only channel that honors --api-key for the GUI app. A plain cargo run builds the OSS channel, which ignores the key and falls back to interactive onboarding.
Authenticating this way starts the app directly without interactive login prompts.
Initial builds may take several minutes; subsequent incremental builds are faster.
Verify the launch is authenticated
After launching, confirm both of the following before testing:
- Warp is authenticated — it opens straight to the terminal, NOT the logged-out onboarding/sign-in screen.
- The
cargo runstderr/terminal output does not contain the substringprovided but IGNORED.
If that warning appears (or the app is logged out), the wrong binary/channel was launched — stop and relaunch with cargo run --bin warp.
Testing Workflow
1. Hardcode or Mock Data (When Needed)
If you just need to verify that a specific UI looks correct, it can be useful to hardcode or mock data so the UI state is immediately reachable without navigating a full flow. This is optional — skip this step when testing end-to-end flows that should work naturally.
Examples of when to hardcode:
- Conditional UI: The feature only appears under certain conditions (e.g., a specific setting, a non-empty data set, an active subscription) — hardcode the condition so the UI always appears.
- Feature flags: The feature is behind a flag that isn't enabled yet — enable it directly.
- Error states: You want to test error handling UI — hardcode error responses or failure conditions.
Keep mocked changes minimal and focused — only change what's necessary to reach the UI state under test.
2. Invoke Computer Use
Call the computer_use tool with a task description that includes:
- The command to build and launch Warp from the repo root:
cargo run --bin warpwhenWARP_API_KEYis set in the environment, orcargo run --bin warp -- --api-key $STAGING_USER_WARP_API_KEYwhen the key is inSTAGING_USER_WARP_API_KEYinstead - Step-by-step instructions for navigating to the UI being tested
- Specific observations to report: describe exactly what elements, text, colors, layout, or states the tool should observe and describe back
- Do not include expected values in the task — the tool should report what it sees, not judge correctness
3. Verify Results
Compare the observations returned by computer_use against your expectations. If the UI doesn't match, investigate and adjust the code or mocks accordingly.
Tips
- Be specific in task descriptions: Instead of "check if the dialog looks right," say "open Settings, click the General tab, and describe the text and layout of the first section."
- Test one thing at a time: Focused tests are easier to debug when observations don't match expectations.
- Build before invoking: Always confirm the build succeeds before calling
computer_use. The tool cannot fix build errors.
Version History
-
b9c21aa
Current 2026-09-03 05:59
将 Warp UI 的 computer-use 视觉验证改为可选模式,仅在用户请求或接受时触发。
- 726c1b6 2026-07-24 20:23


