Skip to content

test_evidence_close_folds_room_but_retires_controls_immediately fails on main since #5479 halved a Tab's cost #5659

Closed

Description

@leaf-agent

Since #5479 (018fc25870f09b10ad0d5252a6235ce5e6572ae4), these tests fail on main. Each still fails locally on current main 903e1d106. Scheduled run 42205827418 at 62cb54fc8 shows the diagnostics below.

Failing tests

  • tests/browser/test_render_diff_controls.py::test_evidence_close_folds_room_but_retires_controls_immediately[browser-call]
    assert 85.953125 > (85.953125 + 1)
    
  • tests/browser/test_render_diff_controls.py::test_evidence_close_folds_room_but_retires_controls_immediately[browser-file]
    assert 140.203125 > (140.203125 + 1)
    

Introducing change: I ran both cases at each commit between b3c9842e8 and 6cd5093f3: they pass at fead36fb9 (#5479's parent) and at every commit before it, and both fail at 018fc2587.

CI evidence: last passing push run 42010431285; first failing push run 42029761182, and every completed push run since through 42203695127. Each run's pytest-results-* artifact holds the tracebacks and pictures.

Nothing has been diagnosed past the bisect. Read #5479's description for what it meant to change, then decide per .claude/skills/running-tend/SKILL.md, Reading a red suite, whether each test expects behaviour #5479 replaced (update the test) or caught a regression (fix the code).

Cause of a failure tracked in #4225.

Activity

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

    @leaf-agent
    CollaboratorAuthor

    This is a regression from #5479, not a stale test. #5688 fixes it.

    #5479 changed the diff fold's "close at once from the keyboard" rule (packages/diff/styles/disclosure.css) to read Leaf's data-lf-focus-visible mark instead of native :focus-visible. But browser/runtime/focus.js repainted that mark only in a setTimeout after a keydown. The test focuses the summary with a click and then presses Enter, which fires no focus event. So the fold started its full close transition before the mark arrived, and it stayed at the test's stretched halfway height. That is why middle and closed are equal in both failures. The fix also queues the focus paint inside the keydown listener, so the mark lands before the key's default action, as native :focus-visible already did. #5479's move to Leaf's marks stays.

    Both failing cases fail on main and pass with #5688; the Firefox cases, pnpm run test:runtime, and 167 focus-ring browser tests also pass. PR CI is running, and the PR lands once it is green.

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