Skip to content

fix(desktop): hidden workers time out opening WPP Assistant popover #36

Closed as not planned

Description

@trmosala

Summary

On a Linux VM, CookieMonster workers fail to open the WPP AI Assistant popover while hidden. When worker windows are shown, loading takes a while but proceeds.

Exact error:
Timed out opening WPP AI Assistant popover.

Environment

  • Installed branded Linux .deb, rebuilt locally from desktop package version 1.18.27
  • Electron 42.3.3, x64
  • VM: approximately 5.8 GiB RAM and 4 CPUs
  • User confirmed reproduction on the newly installed build

Reproduction

  1. Launch the installed CookieMonster build with worker windows hidden.
  2. Send a request requiring a fresh worker.
  3. Observe the popover-opening timeout.
  4. Compare with worker windows shown via the View menu.

Expected: worker startup succeeds without showing or focusing its window.
Actual: hidden startup times out; visible startup loads slowly but proceeds.

Investigation and attempted mitigation

  • Failure occurs before model selection, in openAssistantPopover() in packages/desktop/src/main/wpp-bridge/worker-pool.ts (around line 468).
  • This function polls for the assistant iframe and sends native mouse events via webContents.sendInputEvent() to the Assistant button, using a 30-second deadline.
  • The View visibility toggle calls hide(), not close().
  • Added backgroundThrottling: false to worker webPreferences in packages/desktop/src/main/wpp-bridge/session.ts.
  • Rebuilt and installed the .deb; the user confirmed the same timeout still occurs while hidden.
  • 197 bridge tests, desktop typecheck, and scoped lint passed for that change; they do not validate live hidden-window startup.

Next investigation

Hidden-window native click delivery is a hypothesis, not a confirmed root cause. Test DOM-based button activation and add targeted startup diagnostics distinguishing missing controls, click attempts, iframe appearance, and evaluation failures. Avoid treating this as a model-picker roster timeout or only increasing downstream picker waits.

Acceptance criteria

  • Fresh hidden workers open the Assistant popover and reach composer readiness on the affected VM.
  • Visible-worker startup remains functional.
  • Failure diagnostics identify the startup stage without logging credentials or prompt contents.
  • Validate repeated hidden and visible startup attempts, including slow loading.

Activity

  1. trmosala commented on Sep 16, 2026

    @trmosala
    OwnerAuthor

    Investigation priority clarification

    The reporter notes that the reproduction steps may not reproduce on a more powerful machine. Identifying the trigger on the affected VM must be the first task, before choosing an implementation fix.

    Hidden versus visible behavior is an observed correlation, not proof of failed native click delivery. Disabling background throttling did not resolve it.

    First task:

    • Establish repeatable baseline attempts on the affected VM with fresh workers, hidden and visible.
    • Record startup timings and lightweight diagnostics: control discovery, control geometry/readiness, attempted activation, iframe appearance, and JavaScript evaluation failures.
    • Compare cold versus warm loads and resource pressure (CPU, RAM/swap, concurrent worker startup), varying one factor at a time.
    • Determine whether the timeout is caused by delayed page readiness, control lookup, activation delivery, iframe loading, or another condition.
    • Document the minimum triggering conditions before implementing a fix.

    Do not assume that reproducing the same steps on a powerful machine will fail. DOM-based activation is only a candidate experiment after baseline evidence, not an established solution.

  2. added
    bugSomething isn't working
    wontfixThis will not be worked on
    on Sep 22, 2026
  3. trmosala commented on Sep 22, 2026

    @trmosala
    OwnerAuthor

    This was generated by AI during triage.

    Closing as an unsupported-platform bug. The report is specific to a branded Linux VM build on Electron 42.3.3. macOS is now the sole CookieMonster release target; Windows and Linux implementation remains in source only for upstream compatibility and is no longer built or validated for CookieMonster releases.

    The current source still contains the native mouse-event popover path and timeout described by the report, so this closure does not claim the Linux behavior was fixed. No equivalent failure has been established on the supported macOS target. Reopen or file a macOS-specific issue if the supported build reproduces it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfixThis will not be worked on

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions