Skip to content

fix(ui): Scroll the bench log dialog after the body mounts (backport #7259) - #7260

Closed
mergify[bot] wants to merge 2 commits into
masterfrom
mergify/bp/master/pr-7259
Closed

mergify[bot] wants to merge 2 commits into
masterfrom
mergify/bp/master/pr-7259

Conversation

@mergify

@mergify mergify Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #7257. Click-testing the deep link in a browser showed that the log opens at the top, not at the bottom.

Problem

/dashboard/benches/<bench>/logs/web.error.log redirects correctly and the dialog opens on the correct log, but scrollTop stays 0 while 6953px of scroll is available.

Two causes, both on the deep-link path:

  • onSuccess runs before frappe-ui sets loading back to false (resources.js:121), so at that moment the body still shows Loading... and has almost no scroll height.
  • The dialog fetches in setup, so the response can arrive before the dialog body is in the DOM. The template ref is then still null.

Change

A post-flush watcher on both the element and the data. The scroll happens when the last of the two arrives, so the order does not matter.

Testing

New Playwright test dashboard/tests-e2e/tests/dashboard/bench-log-deep-link.test.ts. It asserts the redirect, the open dialog, the log content, and scrollTop at the end. It fails on develop and passes with this change.

Run:

npx playwright test tests-e2e/tests/dashboard/bench-log-deep-link.test.ts

Tested against a local bench with the dashboard dev server. The View Logs row action is not click-tested; it uses the same dialog.

🤖 Generated with Claude Code


This is an automatic backport of pull request #7259 done by Mergify.

Click-testing the deep link (/dashboard/benches/<bench>/logs/web.error.log)
showed the log opening at the top, not the bottom. onSuccess runs before
frappe-ui sets loading back to false, and on this path the response can beat
the dialog body into the DOM, so the ref is still null.

A post-flush watcher on both the element and the data fires whichever lands
last. Added an e2e test that asserts the redirect, the open dialog and
scrollTop at the end.

(cherry picked from commit 48d5c20)

# Conflicts:
#	dashboard/src/components/group/BenchLogsDialog.vue
The test used a bench and a group from my local database, so it failed on
CI, where the site has only a press admin team. The redirect still happened,
but the sites page had no group to show and the dialog never rendered.

The test now mocks the Release Group document and the Bench, New Bench Queue
and Site lists, like the other dashboard tests do. This also reproduced the
CI failure locally.

(cherry picked from commit cede0a6)
@mergify
mergify Bot requested a review from siduck as a code owner August 18, 2026 10:38
@mergify mergify Bot added the conflicts label Aug 18, 2026
@mergify

mergify Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Cherry-pick of 48d5c20 has failed:

On branch mergify/bp/master/pr-7259
Your branch is up to date with 'origin/master'.

You are currently cherry-picking commit 48d5c2080.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   dashboard/tests-e2e/tests/dashboard/bench-log-deep-link.test.ts

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   dashboard/src/components/group/BenchLogsDialog.vue

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@balamurali27

Copy link
Copy Markdown
Contributor

Closing in favour of #7264 and #7265. The cherry-pick conflicted because master did not have #7257, and this branch also missed the second commit of #7259. The two new pull requests carry all four commits, and they apply clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant