Add @generated comment to HTML and SVG exports#3928
Open
jackrosenthal wants to merge 1 commit intoTextualize:masterfrom
Open
Add @generated comment to HTML and SVG exports#3928jackrosenthal wants to merge 1 commit intoTextualize:masterfrom
jackrosenthal wants to merge 1 commit intoTextualize:masterfrom
Conversation
The `@generated` marker is a loose standard used to identify machine-generated files. Tools like GitHub, IDEs, and various linters recognize this marker to automatically collapse generated files, exclude generated code from coverage metrics, and provide visual indicators in pull requests. This convention has been adopted by many popular tools including Poetry (in `poetry.lock`), Cargo (in `Cargo.lock`), protobuf gencode, and more. This adds the `@generated` header comment to HTML and SVG files produced by `Console.export_html()`, `Console.export_svg()`, `Console.save_html()`, and `Console.save_svg()`.
willmcgugan
requested changes
Jan 22, 2026
Member
willmcgugan
left a comment
There was a problem hiding this comment.
We use SVGs to take snapshots of TUI apps. This change will make all snapshots break, for the sake of a comment.
It is a good idea, but I'd prefer if you made it optional for now, defaulting to off. In the future I can update the default to on.
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.
Type of changes
AI?
AI generated PRs may be accepted, but only if @willmcgugan has responded on an issue or discussion.
Checklist
Description
The
@generatedmarker is a loose standard used to identify machine-generated files. Tools like GitHub, IDEs, and various linters recognize this marker to automatically collapse generated files, exclude generated code from coverage metrics, and provide visual indicators in pull requests.This convention has been adopted by many popular tools including Poetry (in
poetry.lock), Cargo (inCargo.lock), protobuf gencode, and more.This adds the
@generatedheader comment to HTML and SVG files produced byConsole.export_html(),Console.export_svg(),Console.save_html(), andConsole.save_svg().