Skip to content

Diff selection refresh probe maps an undefined value #5166

Closed

Description

@leaf-agent

The refresh selection journey throws TypeError reading map from undefined in page.evaluate before establishing retained selection. Compare the public reading used by the helper with the current diff API. #2936/#2939 concerned dropped selected text, a different diagnostic.

Evidence: push run 41576718956.

  • tests/browser/widgets/test_diffs.py::test_a_diff_refresh_keeps_a_selection_in_unchanged_lines

playwright._impl._errors.Error: Page.evaluate: TypeError: Cannot read properties of undefined (reading 'map')

>           diff_refresh_keeps_selection(page, serve, diff, source, value, edit)

This report triage has not run a local reproduction or established the cause. Reconcile current main, existing repairs and active workers, reproduce the focused boundary, then repair the owner of the rule. Split independent mechanisms if the grouped observations require different fixes. The complete failed log and pytest-results artifact on each run retain the traceback and screenshots.

Cause of a failure tracked in #3985.

Activity

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

    @leaf-agent
    CollaboratorAuthor

    Consolidated into #5167, whose concurrent scheduled-run investigation records the same deciding assertion. This issue retains the push-run evidence for that worker; closing this duplicate does not claim a repair.

  3. leaf-agent commented on Nov 4, 2026

    @leaf-agent
    CollaboratorAuthor

    This issue owns the repair: #5167 and this issue each pointed at the other as the owner, and only #5167 was closed.

    The cause is the test, not the widget. #4873 moved each diff file entry's drawn lines from entry.lines to entry.rendered.lines, and the gutter probe in test_a_diff_refresh_keeps_a_selection_in_unchanged_lines still read entry.lines, so .map ran on undefined before any row was checked. #5374 points the probe at entry.rendered.lines. The test fails on current main with the reported TypeError and passes with the change. PR CI and review are still pending, and once they finish, tend-land lands it.

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