Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

File preview keeps a stale failure when revisiting a repaired media file

Đang mở
#4,386 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@lorenzozanee đang làm issue này rồi.

Từ ngày 24/9/2026.

  • #4397 của @lorenzozanee — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
frontend, testing-qa

Hướng nghiên cứu

Read packages/studio/AGENTS.md, then inspect the failure state in packages/studio/src/components/MediaPreview.tsx and its caller in StudioLeftPanels.tsx. Run bun run --cwd packages/studio test and add focused component regression coverage for file and project changes. Done means repaired previews retry correctly, persistent failures show one error without automatic retries, and the file-switching flow is verified in Studio.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug difficulty/easy triage/ready

The file preview remembers a failed media path after the user visits another file. Returning to the original file can display the old error without making a new request, even after the file becomes available.

Reproduction and evidence

Verified against origin/main 86fa10ced4297bfd9f4fe67b6767afae7a07fd3c on September 23, 2026. The relevant component and its caller are unchanged from the browser probe.

Keep one MediaPreview mounted and change its props as the file panel does:

  1. Render project test, file broken.png; serve its preview URL with HTTP 404. The error panel appears.
  2. Make broken.png available, then switch to healthy.png, served as a valid image. Its image loads successfully.
  3. Switch back to broken.png. The old error appears immediately and no new image request is made.

A Chrome probe using the actual component and intercepted HTTP responses recorded only:

/api/projects/test/preview/broken.png
/api/projects/test/preview/healthy.png

The returned view still said Couldn't load this file — it may be missing or corrupt. Changing the project prop to second while retaining broken.png also retained the error without requesting the second project's image.

This is a browser component reproduction. StudioLeftPanels renders MediaPreview without a file key, which supports the same-file-panel switching path. A complete Studio navigation session has not been run; the cross-project symptom is only asserted for a retained component instance, not for shell navigation that remounts it.

Scope

Tie media failure state to the current preview lifecycle/source identity so visiting another file or changing projects does not carry a previous error into a fresh preview. Preserve useful errors for genuinely unavailable images, videos, and audio. Do not add background polling or automatic retry loops.

Acceptance criteria
  • Failed image A → healthy image B → repaired A attempts to load A again and displays it successfully.
  • Failed image A → binary file B → repaired A also retries A on returning.
  • Changing project with the same file path does not inherit the old project's failure when the component remains mounted.
  • A file that still fails continues to show the existing error panel without repeated automatic requests.
  • Include focused component regression coverage and verify the file-switching flow in Studio before considering the issue resolved.
Code pointers and validation

Difficulty: easy — localized state identity and reset behavior with a small regression fixture. Before starting, check current assignments and linked PRs. Open UI migration PRs #3625, #3626, #3774 and #3776 contain only image/video border-radius class changes in this file. PR #4370's file-tree and missing-composition work does not change this component or its caller.

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.

Ngôn ngữ chính
TypeScript
Star
54.1k
Fork
4.9k
Merge trung bình
7 giờ 29 phút
Pull request đã merge (30 ngày)
778

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của heygen-com/hyperframes

Tất cả issue của heygen-com/hyperframes

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.