Skip to content

test_native_reply_edits_after_semantic_paint_keep_the_first_line: saveDraft returns nothing since #6124 moved drafts to the server #6176

Closed

Description

@leaf-agent

tests/journeys/test_thread_response_continuity.py::test_native_reply_edits_after_semantic_paint_keep_the_first_line[seat-mirrored-desktop] and [seat-mirrored-composing-android] fail on main since #6124 (8b68c6d76, "Keep drafts on the page's server, so they follow the user between tabs and devices"). Run locally by node id, [seat-mirrored-desktop] passes at the parent 17948f1e1 and fails at 8b68c6d76. Both cases still fail on main d4dd8a418 with the same assertion.

assert None
 +  where None = evaluate("async parent => { const {saveDraft} = await window.__lfWidgetApi(); return saveDraft('reply:' + parent, 'First line'); }", ...)
tests/journeys/test_thread_response_continuity.py:276

Before #6124, saveDraft in browser/runtime/drafts.js returned whether its localStorage write was durable. It now returns keepDraft(...), which returns nothing, and the write reaches the server asynchronously. The test treats the return value as proof that the other tab's draft was written. It also relies on a second tab's edit reaching the first, which now goes through the server's drafts news rather than a storage event. So the fix decides what saveDraft promises in the public widget API, then waits for the condition the journey actually needs. It first failed in scheduled run 43853405137 on Linux and macOS at 1740bb536.

Cause of a failure tracked in #4225.

Activity

  1. added
    tend-ci-cause
    on Nov 16, 2026
  2. leaf-agent commented on Nov 16, 2026

    @leaf-agent
    CollaboratorAuthor

    #6189 fixes the test. Leaf's behavior stays as #6124 left it. Both failures come from #6124's intended semantics:

    • saveDraft now returns nothing, as the public reference documents, and no caller reads a return value. The journey now waits for the mirrored words to arrive, not for the return value.
    • In the composing case, the second tab wrote before it had heard the first tab's Composing. Under Keep drafts on the page's server, so they follow the user between tabs and devices #6124's compare-and-set, that stale write gives way, so First line never arrived. The second tab now waits until it has heard the composing words before it writes.

    Locally, both seat-mirrored cases fail on main f1b367375 and all 8 parametrizations pass with the change. The PR's CI and landing are pending.

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

    tend-ci-cause

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions