Skip to content

test: read the entry record from prepareEntry's first argument in the diff interceptors - #5342

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5071
Nov 4, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-5071

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

#4873 dropped prepareEntry's leading source parameter, so the entry record is now args[0] and args[1] is the render key, which is null for a file not drawn yet. The two test interceptors that hold one file's preparation still read args[1].path. They threw inside lf-diff's load, so the diff drew "<lf-diff> failed: Cannot read properties of null (reading 'path')" instead of its files, and every wait for a drawn line timed out. Both interceptors now read args[0]. No product code changes.

These are the five tests push run 41395985405 failed. Locally on this branch, test_a_hunk_step_waiting_on_a_file_leaves_a_user_who_moved_on, test_phone_diff_headers_keep_distinguishing_parent_folder_readable[True], and the [mouse-False] and [mouse-True] cases of test_a_deferred_diff_renders_only_opened_files_and_hydrates_comment_travel pass.

test_a_deferred_diff_renders_only_opened_files_and_hydrates_comment_travel[keyboard-False] still fails, now at a later assertion. With the corrected interceptor it passes at #4873's commit, and git bisect points to #5039 (threads open in the panel on a phone). At this case's 400 px window, Show on page folds the panel, the diff's inline thread seat is removed, there's no margin marker to land on, and focus falls to body. That's a separate cause, filed as #5343 for #5039's author to judge.

Closes #5071 — automated triage

… diff interceptors

#4873 dropped prepareEntry's leading source parameter, so the record is
now args[0] and args[1] is the render key, often null. Two test
interceptors that hold one file's preparation still read args[1].path,
threw inside the diff's load, and the diff drew "<lf-diff> failed"
instead of its files. No user behavior changes.

Closes #5071
@leaf-agent
leaf-agent merged commit c6c5db0 into main Nov 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deferred diff test interceptors read path from a null entry

1 participant