π OpenHands: AI-Driven Development
docs(verify-openhands): map the Available Hooks text fix from #18107 (#18207)
Engel Nyst937d0d6aa201
diff --git a/.agents/skills/verify-openhands/references/feature-map/F07-conversation-page.md b/.agents/skills/verify-openhands/references/feature-map/F07-conversation-page.mdindex 53421220ff..52064c0086 100644--- a/.agents/skills/verify-openhands/references/feature-map/F07-conversation-page.md+++ b/.agents/skills/verify-openhands/references/feature-map/F07-conversation-page.md@@ -105,6 +105,7 @@ Preconditions:- The Usage tab logs `GET /api/llm/balance` 404 on a local backend (F27); count it in `browser errors --app-only` but it is not an F07 failure.- The overview's Automations section has no opener in the UI (the overview menu offers Workspace and Git sections only).- The Hooks dialog shows the workspace's `hooks.json` as of its last read (its first open for the conversation after a page load, or Refresh), not the hooks the conversation started with: after the hooks steps above, `browser goto /conversations/<git-id>` (started before the file existed; its `hook_config` is `null`) and opening the dialog lists both events too. A reopen within 5 minutes of that read shows the same list and sends no request: click Refresh after editing `hooks.json`.-- Expected: a prompt- or agent-type hook shows its text under Commands (the `prompt`, or an agent hook's `system_prompt`). Known failure (reproduced 2026-10-06): write `<run>/workspace/qa-f07-repo/.openhands/hooks.json` as `{"stop":[{"hooks":[{"type":"prompt","prompt":"QA_F07 prompt hook"}]}],"session_start":[{"hooks":[{"type":"agent","system_prompt":"QA_F07 agent hook"}]}]}`, open the Hooks dialog on `/conversations/<hooks-id>`, click `testid=hooks-modal >> testid=refresh-hooks`, then `role=button[name="Stop 1 hook"]` and `role=button[name="Session Start 1 hook"]` inside `testid=hooks-modal`. They expand to `Matcher * Commands Type: prompt Timeout: 60s` and `Matcher * Commands Type: agent Timeout: 60s`, and `browser text 'testid=hooks-modal >> pre'` returns two empty strings, although the server sends both texts (`control-openhands api POST /api/hooks --write --data '{"project_dir":"<run>/workspace/qa-f07-repo"}'` has them in `prompt` and `system_prompt`, with `command` empty) (#18089). Write the two-event `hooks.json` back and Refresh afterwards.+- A prompt- or agent-type hook shows its text under Commands (the `prompt`, or an agent hook's `system_prompt`). With the Hooks dialog closed (the hooks steps above end that way; otherwise `control-openhands browser click 'testid=close-hooks-modal'`), write `<run>/workspace/qa-f07-repo/.openhands/hooks.json` as `{"stop":[{"hooks":[{"type":"prompt","prompt":"QA_F07 prompt hook"}]}],"session_start":[{"hooks":[{"type":"agent","system_prompt":"QA_F07 agent hook"}]}]}`, run `control-openhands browser goto /conversations/<hooks-id>`, open the menu and `control-openhands browser click 'testid=conversation-name-context-menu >> testid=show-hooks-button'`, click `testid=hooks-modal >> testid=refresh-hooks`, then `role=button[name="Session Start 1 hook"]` and `role=button[name="Stop 1 hook"]` inside `testid=hooks-modal` (an event expanded before a Refresh stays expanded, and a second click collapses it, so start from a reopened dialog). In `control-openhands browser snapshot 'testid=hooks-modal'` they expand, in that order, to `Matcher * Commands QA_F07 agent hook Type: agent Timeout: 60s` and `Matcher * Commands QA_F07 prompt hook Type: prompt Timeout: 60s`, and `browser text 'testid=hooks-modal >> pre'` returns `QA_F07 agent hook` and `QA_F07 prompt hook` (`control-openhands browser screenshot --feature F07.hooks-modal --name prompt-agent-hooks`). An agent hook without `system_prompt` shows no box: with `{"session_start":[{"hooks":[{"type":"agent"}]}]}`, close, reopen and Refresh, `Session Start 1 hook` expands to `Matcher * Commands Type: agent Timeout: 60s` and `browser count 'testid=hooks-modal >> pre'` is `0`.+- Expected: an agent hook shows its `system_prompt`, the text it runs with, even when it also carries a `prompt`. Known failure (reproduced 2026-10-09): with `{"session_start":[{"hooks":[{"type":"agent","prompt":"QA_F07 stray prompt","system_prompt":"QA_F07 agent system prompt"}]}]}` in `hooks.json`, close, reopen and Refresh the dialog, then expand `Session Start 1 hook`: it reads `Matcher * Commands QA_F07 stray prompt Type: agent Timeout: 60s`, and `QA_F07 agent system prompt` appears nowhere (`control-openhands browser count 'text=QA_F07 agent system prompt'` is `0`), although `control-openhands api POST /api/hooks --write --data '{"project_dir":"<run>/workspace/qa-f07-repo"}'` returns both fields (#18206). Write the recipe's two-event `hooks.json` (`pre_tool_use` and `stop`) back and Refresh afterwards.- Expected: with the Agent Server down, Refresh in the Hooks dialog shows a fetch error about hooks. Known failure (reproduced 2026-10-06): after `control-openhands service stop agent-server` on an open dialog, `refresh-hooks` and `browser wait 'testid=hooks-modal >> text=Failed to fetch' --timeout 30000`, it reads `Failed to fetch skills. Please try again later.` (the shared `COMMON$FETCH_ERROR` string) (#18088). Run it last, or `restart` afterwards.- After the user-message branch in `F07.branch-from-message`, Send stays disabled next to the prefilled text (`browser enabled 'testid=submit-button'` is `false`; repro candidate, not filed yet, see F05 Gotchas). Enter in the field sends it.