Make copied task log text match the on-screen format - #71270
Conversation
|
TBH... I don't really like the approach in this PR, but it is the minimal and fastest change for the target. We intercept the copy event and rebuild the text ourselves. So the rebuild has to know about every visual element, like the I think the better way is to make |
e9b45cb to
ee3d9c9
Compare
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.
Timestamp formatting belongs at the selection reconstruction boundary so downloads retain source timestamps and log parsing stays independent of UI timezone state.
77deb61 to
b51b610
Compare
The clipboard fix should not alter shared text rendering because downloaded logs use the same path.
|
Ci failures appear unrelated. |
Backport failed to create: v3-3-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker 28f00cc v3-3-testThis should apply the commit to the v3-3-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
* 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.
Why
Follow up PR for #71156.
Copied logs should match what the user sees on the screen. The rebuilt virtualized rows used the raw download format, so one copy could mix two timestamp formats and drop the group marker.
What
The copy rebuild now formats timestamps in the selected timezone, same as the screen. Group headers keep their marker, and it follows the expand state (
▶/▼) in both native copy and rebuilt text.The marker is now a real character that switches with state (this change keeps our code cleaner in handling copy event), so the small rotate animation is gone.
2026-08-07.2.22.46.mov
related: #71156
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Fable 5) following the guidelines