Andrushika commented on PR #71270: URL: https://github.com/apache/airflow/pull/71270#issuecomment-5213454444
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 `▶` marker and the timestamp format. If someone adds a new element to the log view one day, for example a badge in front of error lines or an inline link to the failed task, and forgets the copy path, it drifts again. The test in this PR compares rebuilt lines with the real copy text of mounted rows, so it catches the current elements, but the approach is still brittle by nature. I think the better way is to make `renderStructuredLog` produce one neutral token list first, and then render the same tokens to JSX for the screen and to plain text for copy. The two outputs cannot drift because they come from the same source. But that is a big change and touches search, ANSI and i18n. So I would like to hear opinions from maintainers first. If that direction sounds right, I would like to merge this one as an interim fix and do the refactor in a follow-up PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
