Skip to content

e2e: settings popout save lands late or not at all under load #2213

Description

@chhoumann

What happens

tests/e2e/settings-popout-save.test.ts ("saves a reorder made in the Settings popout that closes right after, main window hidden") fails often under CPU load. After the popout closes, data.json still holds the old order when the spec's 3 s poll ends:

AssertionError: expected [ 'Alpha', 'Bravo', 'Charlie' ] to deeply equal [ 'Bravo', 'Charlie', 'Alpha' ]

Measured on macOS with a 16 to 24 core busy-loop load, spec run alone on an isolated instance:

  • 3 s poll (as committed): failed 6 of 8 runs.
  • Poll widened to 15 s in a temporary copy: passed 5 of 6 runs. One run still had the old order on disk after 15 s.

Why it matters

The spec guards #2182, where a settings write was lost when the popout closed. Most failures are the write landing after 3 s on a throttled hidden main window. The one 15 s failure is not explained yet, so a lost write under load is not ruled out.

Expected

Either the write always lands and the spec waits on that state with a budget that fits a loaded machine, or a write that never lands is found and fixed.

Found while fixing #2207.

Activity

  1. chhoumann commented on Oct 24, 2026

    @chhoumann
    OwnerAuthor

    Fixed in 2.33.1. Closing Settings now starts saving any pending QuickAdd change at once, instead of waiting for the one-second timer in the main window.

    The macOS slowdown itself was inferred, not measured on macOS. Every repro here ran on Linux with a CPU cap. If you still see a save land late after closing Settings, please reopen this with your Obsidian version and setup.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions