Skip to content

AI Agent page: failed requests give no feedback — new chat, delete conversation, and send message fail silently #551

Closed

Description

@gkhngyk

Problem

Three handlers in web/src/app/[locale]/(dashboard)/dashboard/agent/page.tsx bail with if (!res.ok) return; and zero user feedback:

  1. newChat — clicking "New chat" does nothing when the request fails.
  2. deleteConversation — the row stays in place after the user already confirmed the delete dialog.
  3. onSubmit — the user's typed message is dropped on the floor: no error, input untouched, nothing happens. They'll assume the app hung.

Other fetches in the same file already parse the error body and surface it (see the handlers around message loading), so this is an internal inconsistency, not a missing pattern.

Fix

For each of the three sites: parse body.error from the response, show a toast.error(...) with it (falling back to a generic message), and for onSubmit keep the user's message in the input (or restore it) so nothing they typed is lost. Optionally extract a tiny shared fetchJsonOrToast helper if it keeps the diff small.

Acceptance

  • Each of the three actions shows an error toast when the API fails.
  • A failed send leaves the user's typed message intact.

Activity

  1. added
    bug
    on Jul 28, 2026
  2. BharadwajKanneveti commented on Aug 3, 2026

    @BharadwajKanneveti
    Contributor

    Hi @gkhngyk Can I work on this issue?

  3. gkhngyk commented on Aug 3, 2026

    @gkhngyk
    ContributorAuthor

    Assigned — thanks! Same family of fix as your recent error-state work: each of the three actions (new chat, delete conversation, send message) needs its failure surfaced with a toast and the UI left in a consistent state.

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

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions