Skip to content

feat: no error display on sync integration and no test connectivity #355

Closed
Davsooonowy wants to merge 2 commits into
mainfrom
feature/ent-251-no-error-display-on-sync-integration-error
Closed

feat: no error display on sync integration and no test connectivity #355
Davsooonowy wants to merge 2 commits into
mainfrom
feature/ent-251-no-error-display-on-sync-integration-error

Conversation

@Davsooonowy
Copy link
Copy Markdown
Contributor

@Davsooonowy Davsooonowy commented Apr 3, 2026

Note

Left for further consideration.

Problem

Two gaps in the Integrations page UX:

  1. When a sync fails (e.g. a typo in base_url), the user receives no feedback — the button returns to its default state silently and the error is lost
  2. There was no way to verify a source's connectivity before saving configuration, meaning users only discovered misconfiguration after attempting a full sync

Solution

  • Sync error notification
    When a sync is triggered, the button shows a spinner while the Celery task runs. The frontend polls /api/tasks/<task_id> every 2s until the task completes. On failure, a destructive Alert appears above the sources table with the error message returned by the task.

  • Test Connection
    A "Test Connection" button is added to the Add/Edit source modal. It instantiates the plugin with the current config and attempts to fetch data without persisting anything.
    The result is shown inline — green on success, red with the error message on failure. Works for product sources, document sources, and e-commerce integrations.

Backend changes

  • TaskStatusView — GET /api/tasks/<task_id> returns Celery task state and error string on failure
  • TestProductSourceConnectionView, TestDocumentSourceConnectionView, TestECommerceConnectionView — POST /api/data_sets//{source_type}/test validates connectivity without
    side effects

Demo

Sync error alert

Screen.Recording.2026-04-03.at.14.45.04.mov

Test Connection

Screen.Recording.2026-04-03.at.14.46.36.mov

@Davsooonowy Davsooonowy self-assigned this Apr 3, 2026
@Davsooonowy Davsooonowy added the enhancement New feature or request label Apr 3, 2026
@Davsooonowy
Copy link
Copy Markdown
Contributor Author

Note on the polling approach

The current implementation polls GET /api/tasks/<task_id> every 2s to detect sync failures. There's an open PR - #51 that saves synchronization status
directly to the database and builds a full sync history UI with error details surfaced there.

Once #51 lands, the polling approach here could be replaced with a simpler solution: read sync status from the DB (via a dedicated endpoint or WebSocket
push) rather than querying Celery's AsyncResult. This would also make the error state persistent - right now the alert disappears on page refresh.

Worth keeping in mind as a follow-up or coordinating with #51 before merging.

Priority is not high but it might be discussed :)
@rafalcymerys @mateus-po

@Davsooonowy Davsooonowy changed the title [Enthusiast ENT-251] noe error display on sync integration and no test connectivity feat: no error display on sync integration and no test connectivity Apr 8, 2026
@Davsooonowy
Copy link
Copy Markdown
Contributor Author

close it for now - left for further consideration

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant