Skip to content

fix: avoid blank epub settings preview on first advanced layout open#690

Merged
everpcpc merged 1 commit intomainfrom
codex/fix-epub-preview-blank
Mar 24, 2026
Merged

fix: avoid blank epub settings preview on first advanced layout open#690
everpcpc merged 1 commit intomainfrom
codex/fix-epub-preview-blank

Conversation

@everpcpc
Copy link
Copy Markdown
Owner

Problem

Opening Advanced Layout in the EPUB settings sheet could leave the preview blank on the first expansion. The preview only recovered after another setting change triggered a new payload update.

Approach

Keep the preview coordinator state honest by marking a payload as applied only after the WebView JavaScript update succeeds. This avoids caching a failed injection as if it had rendered successfully.

Scope

  • Update EPUB settings preview payload application logic in the sheet WebView coordinator
  • Preserve the existing preview architecture and avoid adding extra retry state machinery

Validation

  • make build-ios
  • Manual check: first Advanced Layout expansion keeps the preview visible

Only mark the EPUB settings preview payload as applied after the WebView JavaScript update succeeds.

This prevents the first Advanced Layout expansion from caching a failed preview injection as successful, which could leave the preview blank until another setting changed.
@everpcpc everpcpc merged commit 72735d6 into main Mar 24, 2026
3 checks passed
@everpcpc everpcpc deleted the codex/fix-epub-preview-blank branch March 24, 2026 05:56
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.

1 participant