tanishqgandhi1908 opened a new pull request, #8932:
URL: https://github.com/apache/texera/pull/8932

   
   ### What changes were proposed in this PR?
   
   The file preview on dataset and model detail pages subscribed to each file 
request without an error handler and never cancelled it. So:
   
   A failed download (storage unreachable, expired link, network error) left 
the preview on “File content is loading” forever.
   When a file was clicked before the previous one finished, the earlier file 
could arrive last and replace the newer one’s content under the newer file’s 
name.
   
   UserDatasetFileRendererComponent now keeps the current request and cancels 
it whenever a new file is loaded, and shows the existing “File loading 
encounter error” message when the request fails.
   
   Before: a failed download keeps loading, and a slow earlier file replaces 
the selected one:
   
   <img width="1440" height="900" alt="before-1-download-failed" 
src="https://github.com/user-attachments/assets/ca24ccb0-e721-48c1-b18d-23dffc1996dc";
 />
   
   <img width="1440" height="900" alt="before-3-first-file-overwrites" 
src="https://github.com/user-attachments/assets/3522331f-1941-42ff-bc8a-11364342837c";
 />
   
   After: the failed download shows the error, and the selected file stays:
   
   <img width="1440" height="900" alt="after-1-download-failed" 
src="https://github.com/user-attachments/assets/6e3b9ded-910d-4d13-ae12-879918f82a4a";
 />
   
   <img width="1440" height="900" alt="after-2-second-file-kept" 
src="https://github.com/user-attachments/assets/782cf354-7963-4ebc-bdbb-4685aac03601";
 />
   
   ### Any related issues, documentation, discussions?
   Closes #8930
   
   ### How was this PR tested?
   
   Added two cases to user-dataset-file-renderer.component.spec.ts: a failed 
fetch shows the loading error, and a slow file is dropped once another file is 
selected. Both fail without the fix.
   
   cd frontend
   yarn ng test --watch=false 
--include='**/user-dataset-file-renderer.component.spec.ts'
   Tests  57 passed (57)
   
   Also checked against a local stack: with the object store stopped, clicking 
a file shows the error; and with one file’s request delayed, clicking it and 
then another file keeps the second file’s content.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 5.5)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to