Skip to content

Long async operations in apps can freeze eye bridge #9

@williamsharkey

Description

@williamsharkey

Problem

When an app runs long async operations (multiple sequential _exec calls), the eye bridge can timeout or freeze.

Reproduction

The Project Manager app loads projects with multiple git status calls:

for (const dir of dirs) {
  const status = await Studio.github._exec("git -C ~/repos/" + dir + " status --porcelain | wc -l");
  const branch = await Studio.github._exec("git -C ~/repos/" + dir + " branch --show-current");
  // ...
}

With 3+ projects, this creates 6+ sequential HTTP requests, causing eye commands to timeout.

Impact

  • Eye bridge becomes unresponsive
  • Can't query state or run new commands
  • Must wait for async operations to complete or refresh page

Potential Solutions

  1. Batch _exec calls - Allow multiple commands in one request
  2. Non-blocking apps - Run apps in isolated context that doesn't block bridge
  3. Timeout increase - Longer timeout for eye commands
  4. Progress indicator - Show when async ops are in progress

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions