chromeflow 0.1.29 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CLAUDE.md CHANGED
@@ -96,13 +96,20 @@ use `take_and_copy_screenshot()` — it saves a PNG to ~/Downloads and copies it
96
96
 
97
97
  ## Working with complex forms
98
98
  - Before filling a large or unfamiliar form, call `get_form_fields()` to get a full inventory
99
- of every field (type, label, current value, vertical position). Use `get_elements()` when
100
- you need pixel coordinates of visible elements; use `get_form_fields()` when you need to
101
- understand the full structure of a form including fields below the fold.
99
+ of every field (type, label, current value, vertical position, and section heading). Use
100
+ `get_elements()` when you need pixel coordinates of visible elements; use `get_form_fields()`
101
+ when you need to understand the full structure of a form including fields below the fold.
102
+ - `get_form_fields()` includes `[type=file]` fields even when they are visually hidden behind
103
+ custom drag-and-drop zones. File fields are marked "manual only" — highlight them and ask
104
+ the user to select the file; they cannot be filled programmatically.
102
105
  - `fill_input` works on React-controlled inputs, contenteditable (Stripe, Notion), and
103
106
  **CodeMirror 6 editors** — it auto-detects all three. No `execute_script` workaround needed.
107
+ After filling, `fill_input` reads back the value and warns if React did not accept it.
108
+ - If a form has collapsible sections, expand them all before calling `get_form_fields()` so
109
+ the field list is complete. Use the `[under: "section name"]` context in each field's entry
110
+ to identify fields by section rather than by index — indices shift when sections expand.
104
111
  - Prefer `scroll_to_element("label text or #selector")` over `scroll_page` whenever you know
105
- which field or section you need — it scrolls precisely without guessing pixel amounts.
112
+ which field or section you need — it scrolls precisely and confirms the matched element.
106
113
  - For multi-session tasks (long forms that may exceed context), call `save_page_state()` as a
107
114
  checkpoint. A future session can call `restore_page_state()` to reload all field values.
108
115
 
@@ -112,6 +119,8 @@ use `take_and_copy_screenshot()` — it saves a PNG to ~/Downloads and copies it
112
119
  - `open_page(url, new_tab=true)` opens a URL without losing the current tab. Use sparingly —
113
120
  prefer switching to an existing tab over opening a new one.
114
121
  - `switch_to_tab("1")` switches by tab number; `switch_to_tab("form")` matches by URL or title substring.
122
+ - Before navigating away from a partially-filled form, call `save_page_state()` so the form
123
+ can be restored if the tab reloads or the page loses its state on return.
115
124
 
116
125
  ## Error handling
117
126
 
@@ -159,7 +159,8 @@ Unlike get_elements, this includes ALL fields (even far below the fold) and is n
159
159
  }
160
160
  const lines = fields.map((f) => {
161
161
  const val = f.value ? ` [currently: "${f.value}"]` : "";
162
- return `${f.index}. [${f.type}] "${f.label}"${val} \u2014 y:${f.y}`;
162
+ const ctx = f.context ? ` [under: "${f.context}"]` : "";
163
+ return `${f.index}. [${f.type}] "${f.label}"${val}${ctx} \u2014 y:${f.y}`;
163
164
  });
164
165
  return {
165
166
  content: [{ type: "text", text: `Form fields (${fields.length} total, sorted top-to-bottom):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chromeflow",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "description": "Browser guidance MCP server for Claude Code — highlights, clicks, fills, and captures from the web so you don't have to.",
5
5
  "type": "module",
6
6
  "bin": {