A resumed tab had zero width, so nothing opened
A queued browser run finished 40 of 42 items. The two that failed were not blocked by the site: the tab they ran in measured zero width, so the editor was never built.
What changed this week
- Each item now measures the window before it acts, and refuses rather than types when the size is zero
- A fresh tab replaces the one a resumed session hands back
How to do it
- Measure the window before every action, not once at the start. In the failed run the page was there, the item was there, and window.innerWidth was 0, so the comment box was never laid out and no editor existed to type into.
- Treat a closed and resumed session as a suspect environment. The two failures came after a resume, in the tab the session restored. From the third item on, the run opened a new tab instead, and 28 of 28 remaining items went out.
- Refuse, do not improvise. Both failures were labelled for one cause and nothing was typed or posted, so no half written text reached anyone. A run that cannot act should produce a reason, not a guess.
- Do not retry into the same broken window. Neither failure was retried, and that was the right call: the next attempt would have met the same zero width tab. Fix the window first, then continue.
- Report refusals separately from sends. A line that says 40 of 42 done, 2 refused, with the cause next to each, tells you whether to change the automation or the content. A single success rate hides which one.
- Keep the check cheap, because the queue is slow. With about five minutes between items, a long list outlives the window it started in, so one measurement per item costs nothing and catches the change.
I am running a queue of browser actions with a few minutes between items, in a session that may be closed and resumed between them. Before each action, measure window.innerWidth and window.innerHeight. If either is 0, refuse that item, log a one word reason, and type nothing. Prefer opening a fresh tab over reusing the tab a resumed session restored. Never retry into a window that already measured zero. At the end, report done, refused and skipped as separate counts, with the reason beside each refusal.