Skip to content

Fix/snapshot polling and block directive bugs - #1413

Merged
perber merged 3 commits into
mainfrom
fix/snapshot-polling-and-block-directive-bugs
Aug 9, 2026
Merged

Fix/snapshot polling and block directive bugs#1413
perber merged 3 commits into
mainfrom
fix/snapshot-polling-and-block-directive-bugs

Conversation

@perber

@perber perber commented Aug 9, 2026

Copy link
Copy Markdown
Owner

No description provided.

perber added 3 commits August 9, 2026 14:23
normalizeMarkdownBlocks left the outer scan index unchanged when a
:::type directive ran off the end of the file without a closing :::,
so the outer loop re-processed (and re-emitted) the last already-output
line on its next iteration.

Found while adding regression-test coverage for the new Collapsible
Blocks feature, which had shipped without any tests.
triggerNow() fired the create-snapshot POST (which only starts an
async background job and returns 202) and immediately reloaded status
and the list once. If the job hadn't finished by then, the list never
updated again on its own, leaving "Create backup now" looking like it
silently did nothing on a busy server or large wiki.

Now polls status every 800ms (giving up after 3 consecutive errors,
same convention as resync.ts/restore.ts) until the job reports done
before reloading the list.

Found via the e2e suite: backup-restore.spec.ts's live-restore test
reliably timed out waiting for the new snapshot row on a loaded
machine. Verified the fix against that test directly (180s timeout ->
15.6s pass).
@perber
perber merged commit a5cf961 into main Aug 9, 2026
9 checks passed
@perber
perber deleted the fix/snapshot-polling-and-block-directive-bugs branch August 9, 2026 12:48
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