Fix asset upload error state when upload succeeds #36

Closed
opened 2026-06-03 20:12:19 -05:00 by Gitchegumi · 0 comments
Gitchegumi commented 2026-06-03 20:12:19 -05:00 (Migrated from github.com)

Problem

When uploading assets, the site displays an error even though the upload actually succeeds. Refreshing the Assets tab shows the uploaded asset is present.

This creates a bad user experience because the app tells the user the upload failed when the asset was stored successfully.

Expected behavior

After a successful upload:

  • The UI should show a success/complete state.
  • The asset list should update without requiring a manual refresh.
  • The uploaded asset should appear in the Assets tab immediately.
  • Errors should only be shown when the upload or post-upload processing actually fails.

Current behavior

  • User uploads an asset.
  • UI displays an error.
  • Refreshing the Assets tab shows the asset was uploaded successfully.

Areas to inspect

  • Asset upload API response shape and status code.
  • Client-side upload handler expectations.
  • Error handling around upload completion and list refresh.
  • Asset list cache/state invalidation after upload.
  • Any mismatch between ok, asset, error, or response parsing fields.
  • S3/AIStor/local storage success path vs database metadata creation path.

Acceptance criteria

  • Successful uploads do not display an error.
  • The asset list refreshes or updates optimistically after upload success.
  • Failed uploads still show a useful error message.
  • If storage succeeds but metadata/list refresh fails, the UI message should distinguish that from a failed upload.
  • Add regression coverage if practical.

Notes

The fact that a browser refresh shows the asset means the backend storage/database path is likely succeeding. The issue is probably client-side response handling, stale state, or post-upload refresh logic.

## Problem When uploading assets, the site displays an error even though the upload actually succeeds. Refreshing the Assets tab shows the uploaded asset is present. This creates a bad user experience because the app tells the user the upload failed when the asset was stored successfully. ## Expected behavior After a successful upload: - The UI should show a success/complete state. - The asset list should update without requiring a manual refresh. - The uploaded asset should appear in the Assets tab immediately. - Errors should only be shown when the upload or post-upload processing actually fails. ## Current behavior - User uploads an asset. - UI displays an error. - Refreshing the Assets tab shows the asset was uploaded successfully. ## Areas to inspect - Asset upload API response shape and status code. - Client-side upload handler expectations. - Error handling around upload completion and list refresh. - Asset list cache/state invalidation after upload. - Any mismatch between `ok`, `asset`, `error`, or response parsing fields. - S3/AIStor/local storage success path vs database metadata creation path. ## Acceptance criteria - Successful uploads do not display an error. - The asset list refreshes or updates optimistically after upload success. - Failed uploads still show a useful error message. - If storage succeeds but metadata/list refresh fails, the UI message should distinguish that from a failed upload. - Add regression coverage if practical. ## Notes The fact that a browser refresh shows the asset means the backend storage/database path is likely succeeding. The issue is probably client-side response handling, stale state, or post-upload refresh logic.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gitchegumi/GitchAlerts#36
No description provided.