Public: anyone can read this; the crew can change it.

/backups patches from /events while a backup moves, instead of reloading the page every 5 seconds #2902

opened this

Merged 44d 21h ago, live in production

/settings/backups now patches itself from /events while a backup moves, so it no longer reloads the page every 5 seconds. The earlier pull failed the design-audit test, and this push fixes that. Why the check failed: the change added a GET /settings/backups/live route.

Notes

opened this

/settings/backups now patches itself from /events while a backup moves, so it no longer reloads the page every 5 seconds. The earlier pull failed the design-audit test, and this push fixes that.

Why the check failed: the change added a GET /settings/backups/live route. test/design-audit.test.ts counts every static GET route as a top-level page, so it found 62 pages where docs/design/audit.md states 61. The new route is a fragment that the page fetches, not a page. I added it to the test's NOT_PAGES list, so the count is 61 again. The test was wrong here; the code is unchanged.

What I ran:

  • The design-audit and backups-live tests pass (8 tests).
  • I did not run the full suite, because the forge runs it on push.
  • I could not run bun x tsc --noEmit here: bun fails with "unable to write files to tempdir: ReadOnlyFileSystem". The forge's check will run the type check.

What I left out: no new audit entry in the doc, since a fragment is not a page.

To try it: start a backup from /settings/backups and watch the progress update in place, with no reload. A failed backup ends with {ok:false}.

Closes #2890

commented

/settings/backups now patches itself from /events while a backup moves, so it no longer reloads the page every 5 seconds. The earlier pull failed the design-audit test, and this push fixes that.

Why the check failed: the change added a GET /settings/backups/live route. test/design-audit.test.ts counts every static GET route as a top-level page, so it found 62 pages where docs/design/audit.md states 61. The new route is a fragment that the page fetches, not a page. I added it to the test's NOT_PAGES list, so the count is 61 again. The test was wrong here; the code is unchanged.

What I ran:

  • The design-audit and backups-live tests pass (8 tests).
  • I did not run the full suite, because the forge runs it on push.
  • I could not run bun x tsc --noEmit here: bun fails with "unable to write files to tempdir: ReadOnlyFileSystem". The forge's check will run the type check.

What I left out: no new audit entry in the doc, since a fragment is not a page.

To try it: start a backup from /settings/backups and watch the progress update in place, with no reload. A failed backup ends with {ok:false}.

commented

I merged main into the branch and pushed. The merge had one conflict, in test/no-polling.test.ts.

/settings/backups no longer polls, and main also stopped pull.ts from polling. So the polling allowlist in that test now has no entry for either src/web/pages/backups.ts or src/web/pages/pull.ts. Keeping either one made the test fail, because it checks that every allowlisted file still uses the timer it is allowed.

Tests: test/no-polling.test.ts and the backups tests pass (7 pass, 0 fail). The full bun test ran past the sandbox's 120-second limit and I didn't wait for it; the forge's check will run it on this push. The type check didn't run: tsc failed on a read-only temp directory in the sandbox.

The "bucket said no" lines in the backups test output are the test's intentional failure case.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs