Skip to content

bug: Frontend has no request timeout or abort controller — long queries hang indefinitely #77

@QuantumByte-01

Description

@QuantumByte-01

Problem

sendMessage() in App.tsx has no timeout or AbortController. If the backend takes too long (e.g. Gemini is slow), the UI just spins forever with no way to cancel.

Also

  • onKeyPress is deprecated in React — replace with onKeyDown
  • checkApiHealth() is only called once on mount, never retried on reconnect
  • clearChat() only clears frontend state — does not call /api/session/reset, so the backend still remembers the old conversation

Fix

  • Add AbortController with a ~30s timeout to the fetch in sendMessage()
  • Replace onKeyPress with onKeyDown
  • Call /api/session/reset in clearChat()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions