Skip to content

Three draft and thread journeys fail after a reload since #6860 restores each history entry's place #7172

Done

Description

@leaf-agent

Three journeys fail on both Linux and macOS in the scheduled run 45598918111 (118f31f6d) and still fail at 90bc5d55c. Bisecting e7d5808f3..118f31f6d puts the first failure of all three at #6860 (93ebc4dbe); all three pass at its parent a34788414.

Test Deciding error
tests/journeys/drafts/test_shared_drafts.py::test_words_typed_on_a_reload_stand_over_the_send_it_cut_short expect(field).to_be_focused() on .lf-fp-field leaf-text[name="comment"] after the reload: inactive (test_shared_drafts.py:42, in _type_on_arrival)
tests/journeys/test_render_drafts.py::test_executable_revision_does_not_restore_a_new_draft_generation after the document is replaced, captureDraftEditing() still returns the old generation's editing state (context: reply:…, words: "Old reply generation with selected words.") where the test expects None
tests/journeys/threads/test_rewrites.py::test_an_emptied_rewrite_keeps_nothing_and_saved_deletes_its_message words.dblclick() at test_rewrites.py:41 times out waiting for .lf-fp-view[data-lf-route="thread"]:not([data-lf-leaving])[data-lf-thread=…] .lf-msg-text, so the panel's thread view never settles there

#6860 keeps where the user was (place, focus and caret, selection, panel view) in each history entry's Navigation API state, and puts the user back there on Back, Forward and every reload, including the reload a new revision asks for. Each of these tests reloads or replaces the document and then expects either a fresh state or the focus the test itself sets. They now get the restored entry instead: focus restored somewhere other than the comment field, the old draft generation's editing place carried into the new document, and a thread view still leaving or restored to another route. Which of the three is the intended behaviour under #6860 and which is a regression still has to be read case by case (tests/AGENTS.md, Failing tests). The test that drives draft restoration (test_executable_revision_does_not_restore_a_new_draft_generation) is the one most likely to point at a real regression, since it guards against restoring a generation the user didn't write in this tab.

Cause of a failure tracked in #7166.

Activity

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

    @leaf-agent
    CollaboratorAuthor

    #7186 repairs all three. Each test still expected the arrival from before #6860, and nothing in Leaf regressed: the reload now puts the user back where the entry's record says, as #6860 intends.

    • The second reload of the cut-short send doesn't put the user back in the comment box, because the send had taken them out of it. Keep where the user was in each history entry, so Back, Forward and a reload return there #6860 already added a c press for this case to the test's browser-tier sibling, but not to this journey.
    • The history.js header says the record's return reopens a draft's box without checking which generation it holds. Only the handoff's restore stands down for another tab's rewrite. The box shows the other tab's words, taken from the drafts store, and the stored draft stays theirs.
    • After the reload, the emptied rewrite is open again with the message's own words, so the old double-click on the message text had nothing to hit.

    All three failed on main at 32dc564a8 and pass with the PR, three runs in a row. Review and CI on #7186 are still 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