channel-worker 1.0.24 → 1.0.25

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.
@@ -587,17 +587,26 @@ class CommandPoller {
587
587
  ws.on('open', async () => {
588
588
  try {
589
589
  await send('DOM.enable');
590
- // Focus the contenteditable editor via CDP
591
- await send('Runtime.evaluate', {
590
+ // Focus the contenteditable editor inside dialog via CDP
591
+ const focusResult = await send('Runtime.evaluate', {
592
592
  expression: `
593
- const editors = document.querySelectorAll('[contenteditable="true"], [role="textbox"]');
594
- let focused = false;
595
- for (const e of editors) {
596
- if (e.offsetHeight >= 15) { e.focus(); e.click(); focused = true; break; }
597
- }
598
- focused ? 'focused' : 'no_editor'
593
+ (function() {
594
+ // Try dialog editor first
595
+ const dialog = document.querySelector('[role="dialog"]');
596
+ if (dialog) {
597
+ const editor = dialog.querySelector('[contenteditable="true"], [role="textbox"]');
598
+ if (editor) { editor.focus(); editor.click(); return 'focused_dialog'; }
599
+ }
600
+ // Fallback
601
+ const editors = document.querySelectorAll('[contenteditable="true"], [role="textbox"]');
602
+ for (const e of editors) {
603
+ if (e.offsetHeight >= 15) { e.focus(); e.click(); return 'focused_fallback'; }
604
+ }
605
+ return 'no_editor';
606
+ })()
599
607
  `,
600
608
  });
609
+ console.log('[commands] Focus result:', focusResult?.result?.value);
601
610
  // Small delay for focus to take effect
602
611
  await new Promise(r => setTimeout(r, 300));
603
612
  // Type text
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "channel-worker",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
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": {