Skip to content

add graceful fallback state for document previewer#958

Open
pavsoss wants to merge 1 commit into
imDarshanGK:mainfrom
pavsoss:graceful-fallback-previewer
Open

add graceful fallback state for document previewer#958
pavsoss wants to merge 1 commit into
imDarshanGK:mainfrom
pavsoss:graceful-fallback-previewer

Conversation

@pavsoss

@pavsoss pavsoss commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Description

Implemented a graceful fallback state for the document previewer to improve the user experience when document preview generation fails.

Previously, preview failures were handled by displaying an error message as preview content. This update introduces dedicated error handling so failed previews show a proper fallback UI with clear recovery options.

Changes Made

Frontend

  • Added dedicated preview error state management in UploadPanel.jsx.

  • Updated preview failure handling to track errors separately from valid preview content.

  • Updated preview modal behavior to support both successful previews and fallback error states.

  • Added a graceful fallback UI containing:

    • Error indication when preview loading fails.
    • User-friendly failure message.
    • Retry option to attempt loading the preview again.
    • Clear Selection option to remove the problematic file and close the preview.

Tests

  • Mocked the preview document API flow.

  • Added test coverage for:

    • Successful document preview rendering.
    • Preview failure fallback UI rendering.
    • Retry action behavior.
    • Clear Selection action behavior.

Issue Checklist

  • Implemented graceful fallback in the document previewer.
  • Added validation/tests for the touched preview flow.

Closes #809

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

@pavsoss is attempting to deploy a commit to the Darshan's projects Team on Vercel.

A member of the Team first needs to authorize it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add graceful fallback to document previewer

1 participant