channel-worker 1.1.0 → 1.1.2

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.
@@ -591,6 +591,7 @@ class CommandPoller {
591
591
  // Focus target element via CDP mouse click (trusted event)
592
592
  const rawSel = (focus_selector || '');
593
593
  const isXpath = rawSel.startsWith('xpath:');
594
+ const isTallest = rawSel === 'tallest_editor';
594
595
  const sel = rawSel.replace('xpath:', '').replace(/'/g, "\\'").replace(/"/g, '\\"');
595
596
 
596
597
  // Get element bounding box
@@ -598,7 +599,13 @@ class CommandPoller {
598
599
  expression: `
599
600
  (function() {
600
601
  let el = null;
601
- if (${isXpath} && '${sel}') {
602
+ if (${isTallest}) {
603
+ // Find tallest contenteditable editor (for "Describe your reel" etc.)
604
+ let maxH = 0;
605
+ document.querySelectorAll('[contenteditable="true"], [role="textbox"]').forEach(e => {
606
+ if (e.offsetHeight > maxH) { maxH = e.offsetHeight; el = e; }
607
+ });
608
+ } else if (${isXpath} && '${sel}') {
602
609
  el = document.evaluate("${sel}", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
603
610
  } else if ('${sel}') {
604
611
  el = document.querySelector('${sel}');
@@ -613,7 +620,7 @@ class CommandPoller {
613
620
  }
614
621
  if (!el) return null;
615
622
  const rect = el.getBoundingClientRect();
616
- return { x: rect.x + rect.width / 2, y: rect.y + rect.height / 2, tag: el.tagName, aria: (el.getAttribute('aria-label') || '').substring(0, 30) };
623
+ return { x: rect.x + rect.width / 2, y: rect.y + rect.height / 2, tag: el.tagName, aria: (el.getAttribute('aria-label') || '').substring(0, 30), height: el.offsetHeight };
617
624
  })()
618
625
  `,
619
626
  returnByValue: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "channel-worker",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Channel Manager worker daemon — runs on remote machines to execute video pipeline jobs",
5
5
  "main": "lib/daemon.js",
6
6
  "bin": {