Skip to content

Add a loading state to ScreenPanel screenshot refresh #110

Description

@alimaandev

Summary

desktop/src/components/sidebar/ScreenPanel.tsx shows the screen screenshot from the API. When the user triggers a refresh/recapture, there is no visual loading state between clicks, so the UI feels unresponsive.

Goal

Show a Skeleton placeholder (reuse desktop/src/components/common/Skeleton.tsx) over the screenshot area while a new capture is being fetched, and disable the refresh button during the fetch.

Tasks

  • Track a
    efreshing\ boolean driven by the fetch lifecycle (prop or local state)
  • Render skeleton while refreshing; show image when ready
  • Disable + dim the refresh button during the fetch
  • Add/extend a Vitest test in desktop/src/test/ScreenPanel.test.tsx

Acceptance criteria

  • Refresh button disabled while fetching
  • Skeleton shown instead of stale image during refresh
  • Test covers the refreshing state

Labels

good first issue, help wanted

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions