Skip to content

Global asset view reports failures and unmatched searches as an empty cache #4385

Description

@jrusso1020

Studio's global asset list reports “No assets in the global cache yet” for three different situations: an actual empty cache, a failed request, and a search that matches none of the existing assets. This tells users that their cache is empty when the data is unavailable or merely filtered out.

Reproduction and evidence

Verified against origin/main 86fa10c on September 23, 2026. Relevant source is unchanged from the browser probe.

In Studio's Assets panel, select the global asset view:

  1. Return HTTP 500 from /api/assets/global, or reject that request. The view displays the empty-cache message.
  2. Return { "assets": [{ "id": "logo", "type": "image", "description": "Brand logo" }] } successfully and search for zzz. The view again displays the empty-cache message.
  3. Clear the query. The existing Brand logo row reappears.

All these cases were executed in Chrome with the actual GlobalAssetsView component and mocked fetch responses. A successful response containing zero assets was also checked and currently displays the same message. This is an isolated component reproduction; the Assets panel caller was inspected in source rather than exercised through the complete application.

Scope

Represent loading, request failure, empty successful result, and no matching search results separately. Offer a retry for request failures using the existing endpoint. Preserve the current asset rows and filtering behavior.

Acceptance criteria

  • A non-OK response or rejected request displays a failure message rather than an empty-cache explanation.
  • Retrying a failed request can recover to a populated or genuinely empty result; there is no automatic retry loop.
  • A successful empty response displays the existing empty-cache guidance.
  • When the cache contains records but the query matches none, the view says there are no matching results.
  • Clearing the query restores the existing records without requiring another request.
  • Loading remains identifiable, and a response arriving after unmount does not update the disposed view.
  • Component tests cover these states and recovery using controlled fetch responses.

Code pointers and validation

Difficulty: easy — bounded component state and rendering behavior. Before starting, check current assignments and linked PRs. Open UI migration PRs #3625, #3626, #3774 and #3776 make only a CSS-class change in this component; their inspected patches do not address these states.

Reviewer/mentor is being arranged. Comment with your intended approach before starting so ownership can be coordinated; this issue is not yet a newcomer invitation.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdifficulty/easyLocalized change with a known approach, limited risk, and straightforward verification.triage/readyAccepted scope, current evidence, acceptance criteria, and validation path are recorded.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions