Fix copying task logs dropping rows that scrolled out of view - #71156
Merged
Conversation
bbovenzi
reviewed
Aug 5, 2026
The task log viewer only renders the visible rows. Copying a selection uses the browser's default copy, which serializes only the rows currently in the DOM, so rows the viewer has unmounted are silently missing from the copied text. Rebuild the missing rows from log data, using the same text pipeline as the log download. The rebuild reads row text programmatically, which ignores the CSS that keeps the line-number links out of a normal copy, so strip those links too and leave single-row, fully-mounted, and multi-range selections to the browser.
Andrushika
force-pushed
the
fix-log-viewer-copy-rows
branch
from
August 6, 2026 08:56
812a8fe to
9b7d756
Compare
Andrushika
marked this pull request as ready for review
August 6, 2026 10:21
Andrushika
requested review from
choo121600,
guan404ming,
pierrejeambrun,
ryanahamilton,
shubhamraj-git and
vatsrahul1001
as code owners
August 6, 2026 10:21
Contributor
Author
|
Rebased. Thanks for reviewing! |
bbovenzi
approved these changes
Aug 6, 2026
1 task
Andrushika
added a commit
to Andrushika/airflow
that referenced
this pull request
Aug 7, 2026
Users expect copying logs to yield exactly what the screen shows. The clipboard rebuild for rows the virtualizer unmounted previously emitted the raw download format, so one copy could mix two timestamp formats and drop the group expand marker. The group marker now also follows the expand state (collapsed / expanded) in both the DOM and the rebuilt text. Follow-up to review feedback on apache#71156; the log download keeps raw source timestamps.
Andrushika
added a commit
to Andrushika/airflow
that referenced
this pull request
Aug 12, 2026
Users expect copying logs to yield exactly what the screen shows. The clipboard rebuild for rows the virtualizer unmounted previously emitted the raw download format, so one copy could mix two timestamp formats and drop the group expand marker. The group marker now also follows the expand state (collapsed / expanded) in both the DOM and the rebuilt text. Follow-up to review feedback on apache#71156; the log download keeps raw source timestamps.
bbovenzi
pushed a commit
that referenced
this pull request
Aug 13, 2026
* Make copied task log text match the on-screen format Users expect copying logs to yield exactly what the screen shows. The clipboard rebuild for rows the virtualizer unmounted previously emitted the raw download format, so one copy could mix two timestamp formats and drop the group expand marker. The group marker now also follows the expand state (collapsed / expanded) in both the DOM and the rebuilt text. Follow-up to review feedback on #71156; the log download keeps raw source timestamps. * Remove unnecessary comment * UI: Keep copied log timestamps aligned with the screen Timestamp formatting belongs at the selection reconstruction boundary so downloads retain source timestamps and log parsing stays independent of UI timezone state. * UI: Preserve existing task log download formatting The clipboard fix should not alter shared text rendering because downloaded logs use the same path.
dabla
pushed a commit
to dabla/airflow
that referenced
this pull request
Aug 14, 2026
…#71156) The task log viewer only renders the visible rows. Copying a selection uses the browser's default copy, which serializes only the rows currently in the DOM, so rows the viewer has unmounted are silently missing from the copied text. Rebuild the missing rows from log data, using the same text pipeline as the log download. The rebuild reads row text programmatically, which ignores the CSS that keeps the line-number links out of a normal copy, so strip those links too and leave single-row, fully-mounted, and multi-range selections to the browser.
dabla
pushed a commit
to dabla/airflow
that referenced
this pull request
Aug 14, 2026
* Make copied task log text match the on-screen format Users expect copying logs to yield exactly what the screen shows. The clipboard rebuild for rows the virtualizer unmounted previously emitted the raw download format, so one copy could mix two timestamp formats and drop the group expand marker. The group marker now also follows the expand state (collapsed / expanded) in both the DOM and the rebuilt text. Follow-up to review feedback on apache#71156; the log download keeps raw source timestamps. * Remove unnecessary comment * UI: Keep copied log timestamps aligned with the screen Timestamp formatting belongs at the selection reconstruction boundary so downloads retain source timestamps and log parsing stays independent of UI timezone state. * UI: Preserve existing task log download formatting The clipboard fix should not alter shared text rendering because downloaded logs use the same path.
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.
Why
After #71148, when the user selects and tries to copy task log rows, virtualized rows that scrolled out of view are missing. It's because native copy only serializes mounted DOM.
What
Rebuild missing selected rows from parsed log data with the same plain-text rendering as the log download. Keep native copy for single-row, fully mounted, and multi-range selections.
stacked on: #71148
related: #68846
Before:
2026-08-05.3.53.54.mov
After:
2026-08-05.4.00.03.mov
Was generative AI tooling used to co-author this PR?
Generated-by: Codex (GPT-5) following the guidelines