Skip to content

fix(autosave): acknowledge restores and surface delete failures - #339

Merged
ChristopherVR merged 1 commit into
ChristopherVR:mainfrom
yunfeizhu:fix/autosave-recovery-acknowledgement
Sep 21, 2026
Merged

ChristopherVR merged 1 commit into
ChristopherVR:mainfrom
yunfeizhu:fix/autosave-recovery-acknowledgement

Conversation

@yunfeizhu

Copy link
Copy Markdown
Contributor

What does this change?

Keeps restored AutoSave snapshots as safety copies without offering the same bytes on every reload in the same tab. It records the exact restored (document key, timestamp) in sessionStorage, so documents remain independent, newer snapshots are still offered, and a fresh tab can still recover the preserved copy.

It also makes deleteAutosaveSnapshot() reject when an IndexedDB delete transaction errors, aborts, or throws. Recovery dialogs now stay open on deletion failure, while fire-and-forget lifecycle cleanup handles failures explicitly at its own boundary.

Closes #337.
Closes #338.

Type of change

  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Breaking change
  • Docs / tooling / CI only

Cross-binding parity

Which bindings did you check, and what did you find?

Binding Affected? Fixed / implemented here? Notes
React (packages/react) yes yes Acknowledges successful restore; failed discard remains retryable
Vue (packages/vue) yes yes Same shared recovery and deletion contract
Angular (packages/angular) yes yes Same shared recovery and deletion contract
Svelte (packages/svelte) yes yes Acknowledges before async load and rolls back if loading fails
Vanilla (packages/vanilla) yes yes Acknowledges before async load and rolls back if loading fails

UI fix

  • I reproduced the bug (or confirmed its absence) in every binding above
  • Every affected binding is fixed in this PR

Testing

  • Unit tests added or updated for each binding I changed
  • Regression test added that fails without this change
  • Framework-neutral e2e spec added or updated in e2e/
  • Recovery lifecycle browser checks pass in all five bindings

The browser regression restores a real IndexedDB snapshot, reloads the same tab without another prompt, confirms the snapshot is still stored, opens a fresh tab where it is offered again, and then explicitly discards it. React, Vue, and Angular passed all three recovery cases; Svelte and Vanilla also passed all three after their asynchronous-load acknowledgement path was finalized.

Deletion tests cover both an aborted IndexedDB transaction and a synchronous transaction-creation exception. Binding tests verify that failed discard leaves the recovery prompt available for retry.

Checks run locally

  • Formatting check (oxfmt --check)
  • Lint (oxlint; existing unrelated warnings only, changed JS/TS files also pass --deny-warnings)
  • Typecheck in shared and all five bindings
  • Full tests in all affected packages
  • Shared, Angular, and React demo builds
  • Framework-neutrality contract
  • Local-only GIF/video export E2E in all five bindings (10/10)

Full package test results:

  • shared: 9,953 passed, 3 skipped
  • React: 7,384 passed
  • Vue: 3,055 passed
  • Angular: 3,839 passed
  • Svelte: 1,928 passed
  • Vanilla: 1,966 passed

Conventional Commits

  • My commit message follows Conventional Commits

@github-actions github-actions Bot added react React binding (pptx-react-viewer) vue Vue binding (pptx-vue-viewer) angular Angular binding (pptx-angular-viewer) svelte Svelte binding (pptx-svelte-viewer) vanilla Vanilla binding (pptx-vanilla-viewer) shared Framework-agnostic viewer logic (pptx-viewer-shared) e2e Playwright end-to-end suite labels Sep 21, 2026

@ChristopherVR ChristopherVR left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the shared acknowledgement contract and all five bindings. The per-tab timestamp acknowledgement, retryable deletion path, and asynchronous restore rollback are correctly covered.

@ChristopherVR
ChristopherVR merged commit e0f9569 into ChristopherVR:main Sep 21, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

angular Angular binding (pptx-angular-viewer) e2e Playwright end-to-end suite react React binding (pptx-react-viewer) shared Framework-agnostic viewer logic (pptx-viewer-shared) svelte Svelte binding (pptx-svelte-viewer) vanilla Vanilla binding (pptx-vanilla-viewer) vue Vue binding (pptx-vue-viewer)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autosave deletion swallows IndexedDB transaction failures Restored autosave snapshots are repeatedly offered in the same tab

2 participants