Skip to content

Add timeouts to Linear/GitHub API calls in server endpoints #92

@eltmon

Description

@eltmon

Problem

The dashboard can hang forever when clicking "Done" after planning and "Start Agent". While blocking git push calls were fixed in e723d74, there are many await fetch() calls to Linear and GitHub APIs without explicit timeouts.

Affected Endpoints

  • POST /api/issues/:id/complete-planning - Lines 6474-6504
  • POST /api/agents - Lines 5280-5318

Solution Options

  1. Add AbortController timeouts to all external API calls
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 10000);
await fetch(url, { signal: controller.signal, ... });
clearTimeout(timeoutId);
  1. Make non-critical updates fire-and-forget
    • Status updates to Linear/GitHub can happen in background
    • Only block on operations that must complete

Impact

Medium - affects user workflow when APIs are slow/unreachable

Related

  • e723d74 - Fixed blocking git push
  • User report: dashboard hangs forever until page refresh

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions