fix: add explicit render waits to step_jobs screenshot generation#77
Merged
MaximumTrainer merged 1 commit intomainfrom Apr 17, 2026
Merged
fix: add explicit render waits to step_jobs screenshot generation#77MaximumTrainer merged 1 commit intomainfrom
MaximumTrainer merged 1 commit intomainfrom
Conversation
… diagnostics Agent-Logs-Url: https://github.com/MaximumTrainer/OpenDataMask/sessions/a1a7af6f-359c-4a73-8473-bb4bcc442f7e Co-authored-by: MaximumTrainer <1376575+MaximumTrainer@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
MaximumTrainer
April 17, 2026 16:38
View session
There was a problem hiding this comment.
Pull request overview
This PR improves the reliability of the Playwright-based UI screenshot generator by adding explicit DOM render “gates” in step_jobs() so screenshots for running a job and viewing logs are consistently captured after the Vue UI has actually rendered job data.
Changes:
- Add an explicit wait for
.job-card, .empty-statebefore attempting any job-page interactions. - Replace best-effort clicking with explicit
wait_for_selector(state="visible") + click()for “Run New Job”. - Increase timeouts and add a post-click wait for
.logs-section, and emit[WARN]messages instead of silently swallowing exceptions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
17-run-job-modal.pngand19-job-logs.pngwere never generated because both interaction blocks instep_jobs()failed silently —try_click/wait_for_selectorcouldn't find the buttons, and bareexcept: passswallowed all diagnostics.Root cause: no wait for Vue to finish rendering job data after page navigation.
networkidlecan fire beforeonMountedAPI calls complete, leaving the job card (and its buttons) absent from the DOM.Changes to
verification/take_screenshots.py:.job-card, .empty-statebefore interacting — ensures Vue's reactive update from the/api/workspaces/{id}/jobsresponse has landed in the DOMtry_click("button:has-text('Run New Job')")with explicitwait_for_selector(state="visible")+click()for more reliable element detection.logs-sectionafter clicking "View Logs" before capturing screenshot[WARN]on failure instead of silentpass