A Rust crate for cooking up terminal user interfaces (TUIs) 👨🍳🐀 https://ratatui.rs
This report presents the forensic synthetic code analysis of ratatui/ratatui, a Rust project with 21,668 GitHub stars. SynthScan v2.0 examined 100,804 lines of code across 370 source files, recording 1250 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 16.5 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 1250 distinct pattern matches across 9 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ratatui-termion/src/lib.rs | 1 | // show the feature flags in the generated documentation | COMMENT |
| LOW | ratatui-termion/src/lib.rs | 21 | //! This crate provides the [Termion] backend implementation for Ratatui. | COMMENT |
| LOW | ratatui-termion/src/lib.rs | 61 | /// This is done by calling [`IntoRawMode::into_raw_mode()`] and | COMMENT |
| LOW | ratatui-termion/src/lib.rs | 81 | /// let writer = stderr().into_raw_mode()?.into_alternate_screen()?; | COMMENT |
| LOW | ratatui-termion/src/lib.rs | 101 | writer: W, | COMMENT |
| LOW | ratatui/Cargo.toml | 21 | COMMENT | |
| LOW | ratatui/Cargo.toml | 101 | ] | COMMENT |
| LOW | ratatui/tests/state_serde.rs | 1 | //! State like [`ListState`], [`TableState`] and [`ScrollbarState`] can be serialized and | COMMENT |
| LOW | ratatui/src/lib.rs | 1 | #![no_std] | COMMENT |
| LOW | ratatui/src/lib.rs | 21 | //! </div> | COMMENT |
| LOW | ratatui/src/lib.rs | 41 | //! fn main() -> std::io::Result<()> { | COMMENT |
| LOW | ratatui/src/lib.rs | 61 | //! Most application authors should start with one of these entry points: | COMMENT |
| LOW | ratatui/src/lib.rs | 81 | //! contracts | COMMENT |
| LOW | ratatui/src/lib.rs | 101 | //! You can also watch the [FOSDEM 2024 talk] about Ratatui which gives a brief introduction to | COMMENT |
| LOW | ratatui/src/lib.rs | 121 | //! - **[`ratatui-macros`]**: Macros for simplifying the boilerplate | COMMENT |
| LOW | ratatui/src/lib.rs | 141 | //! [Termwiz]). | COMMENT |
| LOW | ratatui/src/lib.rs | 161 | //! if should_quit()? { | COMMENT |
| LOW | ratatui/src/lib.rs | 181 | //! fn main() -> std::io::Result<()> { | COMMENT |
| LOW | ratatui/src/lib.rs | 201 | //! should surround code outside the application closure, and see the [`init` module] documentation | COMMENT |
| LOW | ratatui/src/lib.rs | 221 | //! [`render_widget`] method. After this closure returns, a diff is performed and only the changes | COMMENT |
| LOW | ratatui/src/lib.rs | 241 | //! fn render(frame: &mut Frame) { | COMMENT |
| LOW | ratatui/src/lib.rs | 261 | //! - **If you move the cursor directly:**<br> Cursor changes made through backend-specific APIs or | COMMENT |
| LOW | ratatui/src/lib.rs | 281 | //! KeyCode::Char('q') => return Ok(true), | COMMENT |
| LOW | ratatui/src/lib.rs | 301 | //! use ratatui::Frame; | COMMENT |
| LOW | ratatui/src/lib.rs | 321 | //! | COMMENT |
| LOW | ratatui/src/lib.rs | 341 | //! | COMMENT |
| LOW | ratatui/src/lib.rs | 361 | //! "!".red().on_light_yellow().italic(), | COMMENT |
| LOW | ratatui/src/lib.rs | 381 | //! [Ratatui Website]: https://ratatui.rs/ | COMMENT |
| LOW | ratatui/src/lib.rs | 401 | //! [Styling Text]: https://ratatui.rs/recipes/render/style-text/ | COMMENT |
| LOW | ratatui/src/lib.rs | 421 | //! [`Style`]: style::Style | COMMENT |
| LOW | ratatui/src/lib.rs | 441 | //! [ARCHITECTURE.md]: https://github.com/ratatui/ratatui/blob/main/ARCHITECTURE.md | COMMENT |
| LOW | ratatui/src/lib.rs | 461 | //! [`ratatui-crossterm`]: https://crates.io/crates/ratatui-crossterm | COMMENT |
| LOW | ratatui/src/lib.rs | 481 | /// re-export the `crossterm` crate so that users don't have to add it as a dependency | COMMENT |
| LOW | ratatui/src/init.rs | 1 | //! Terminal initialization and restoration functions. | COMMENT |
| LOW | ratatui/src/init.rs | 21 | //! | COMMENT |
| LOW | ratatui/src/init.rs | 41 | //! - [`DefaultTerminal`] - A type alias for `Terminal<CrosstermBackend<Stdout>>`, providing a | COMMENT |
| LOW | ratatui/src/init.rs | 61 | //! - [`try_restore`] - Same as [`restore`] but returns a `Result` instead of printing errors. | COMMENT |
| LOW | ratatui/src/init.rs | 81 | //! | COMMENT |
| LOW | ratatui/src/init.rs | 101 | //! _ => {} | COMMENT |
| LOW | ratatui/src/init.rs | 121 | //! ``` | COMMENT |
| LOW | ratatui/src/init.rs | 141 | //! loop { | COMMENT |
| LOW | ratatui/src/init.rs | 161 | //! let mut terminal = ratatui::try_init_with_options(options)?; | COMMENT |
| LOW | ratatui/src/init.rs | 181 | //! | COMMENT |
| LOW | ratatui/src/init.rs | 201 | use ratatui_core::terminal::{Terminal, TerminalOptions}; | COMMENT |
| LOW | ratatui/src/init.rs | 221 | /// This function is a convenience wrapper around [`init`] and [`restore`], and is useful for simple | COMMENT |
| LOW | ratatui/src/init.rs | 241 | /// } | COMMENT |
| LOW | ratatui/src/init.rs | 261 | /// terminal.draw(|frame| frame.render_widget(format!("{GREETING}"), frame.area()))?; | COMMENT |
| LOW | ratatui/src/init.rs | 281 | /// } | COMMENT |
| LOW | ratatui/src/init.rs | 301 | /// Ok(()) | COMMENT |
| LOW | ratatui/src/init.rs | 321 | { | COMMENT |
| LOW | ratatui/src/init.rs | 341 | /// | COMMENT |
| LOW | ratatui/src/init.rs | 361 | /// | COMMENT |
| LOW | ratatui/src/init.rs | 381 | /// Ensure that this method is called *after* your app installs any other panic hooks to ensure the | COMMENT |
| LOW | ratatui/src/init.rs | 401 | let backend = CrosstermBackend::new(stdout()); | COMMENT |
| LOW | ratatui/src/init.rs | 421 | /// | COMMENT |
| LOW | ratatui/src/init.rs | 441 | /// ```rust,no_run | COMMENT |
| LOW | ratatui/src/init.rs | 461 | /// - Raw mode is enabled | COMMENT |
| LOW | ratatui/src/init.rs | 481 | /// # Examples | COMMENT |
| LOW | ratatui/src/init.rs | 501 | /// This function should be called before the program exits to ensure that the terminal is | COMMENT |
| LOW | ratatui/src/init.rs | 521 | /// ```rust,no_run | COMMENT |
| 979 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | ratatui/src/lib.rs | 323 | //! Title Bar─────────────────────────────────── | COMMENT |
| MEDIUM⚡ | ratatui/src/lib.rs | 324 | //! ┌Left────────────────┐┌Right───────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui/src/lib.rs | 326 | //! └────────────────────┘└────────────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui/src/lib.rs | 327 | //! Status Bar────────────────────────────────── | COMMENT |
| MEDIUM | examples/apps/constraint-explorer/src/main.rs | 62 | /// ┌──────────────┐ | COMMENT |
| MEDIUM | examples/apps/constraint-explorer/src/main.rs | 65 | /// └──────────────┘ | COMMENT |
| MEDIUM | ratatui-core/src/layout.rs | 25 | //! ┌─────────────→ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 833 | // <───────────────────────────────────area_size──────────────────────────────────> | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 836 | // ┌────┬───────────────────┬────┬─────variables─────┬────┬───────────────────┬────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 839 | // ┌ ┐┌──────────────────┐┌ ┐┌──────────────────┐┌ ┐┌──────────────────┐┌ ┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 841 | // └ ┘└──────────────────┘└ ┘└──────────────────┘└ ┘└──────────────────┘└ ┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 844 | // └─┬──┶━━━━━━━━━┳━━━━━━━━━┵─┬──┶━━━━━━━━━┳━━━━━━━━━┵─┬──┶━━━━━━━━━┳━━━━━━━━━┵─┬──┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 846 | // └────────────╂───────────┴────────────╂───────────┴────────────╂──Spacers──┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 848 | // ┗━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━Segments━━━━━━━━┛ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 931 | // ┌────┬───────────────────┬────┬─────variables─────┬────┬───────────────────┬────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 934 | // ┌ ┐┌──────────────────┐┌ ┐┌──────────────────┐┌ ┐┌──────────────────┐┌ ┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 936 | // └ ┘└──────────────────┘└ ┘└──────────────────┘└ ┘└──────────────────┘└ ┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1111 | /// ┌──────┐┌──────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1113 | /// └──────┘└──────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1116 | /// ┌──────┐┌────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1118 | /// └──────┘└────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1301 | /// ┌────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1303 | /// └────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1308 | /// ┌────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1310 | /// └────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1315 | /// ┌───────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1317 | /// └───────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1322 | /// ┌───────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1324 | /// └───────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1329 | /// ┌────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1331 | /// └────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1336 | /// ┌────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1338 | /// └────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1343 | /// ┌────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1345 | /// └────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1350 | /// ┌─────────────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1352 | /// └─────────────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1357 | /// ┌────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1359 | /// └────────────┘ | COMMENT |
| MEDIUM | ratatui-core/src/layout/layout.rs | 30 | // ┌ ┐┌──────────────────┐┌ ┐┌──────────────────┐┌ ┐┌──────────────────┐┌ ┐ | COMMENT |
| MEDIUM | ratatui-core/src/layout/layout.rs | 32 | // └ ┘└──────────────────┘└ ┘└──────────────────┘└ ┘└──────────────────┘└ ┘ | COMMENT |
| MEDIUM | ratatui-core/src/layout/layout.rs | 1371 | /// ┌───────┐ | COMMENT |
| MEDIUM | ratatui-core/src/layout/layout.rs | 1373 | /// └───────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 82 | /// ┌────────────────────────────┐┌──────────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 84 | /// └────────────────────────────┘└──────────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 90 | /// ┌──────────────────────────────────────┐┌────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 92 | /// └──────────────────────────────────────┘└────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 105 | /// ┌────────────────────────────┐┌──────────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 107 | /// └────────────────────────────┘└──────────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 113 | /// ┌──────────────────────────────────────┐┌────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 115 | /// └──────────────────────────────────────┘└────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 128 | /// ┌──────────────────┐┌──────────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 130 | /// └──────────────────┘└──────────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 136 | /// ┌──────────────────┐┌────────────────────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 138 | /// └──────────────────┘└────────────────────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 156 | /// ┌────────────────────────────────────┐┌──────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 158 | /// └────────────────────────────────────┘└──────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 164 | /// ┌───────────────────────┐┌───────────────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 166 | /// └───────────────────────┘└───────────────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 180 | /// ┌───────────────────────┐┌───────────────────────┐ | COMMENT |
| 130 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | ratatui-core/src/text/line.rs | 830 | /// In this implementation, the `to_line` method panics if the `Display` implementation returns an | COMMENT |
| HIGH | ratatui-core/src/text/span.rs | 488 | /// In this implementation, the `to_span` method panics if the `Display` implementation returns an | COMMENT |
| HIGH | ratatui-core/src/text/text.rs | 741 | /// In this implementation, the `to_text` method panics if the `Display` implementation returns an | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …mples/concepts/state/src/bin/nested-stateful-widget.rs | 5 | //! and want to leverage the benefits of the StatefulWidget pattern at multiple levels. | COMMENT |
| MEDIUM | .github/workflows/ci.yml | 25 | # without having to wait for the comprehensive matrix of tests to complete. | COMMENT |
| MEDIUM | ratatui-core/src/backend.rs | 71 | //! This creates a seamless transition between the application and the regular terminal session, as | COMMENT |
| MEDIUM | ratatui-widgets/src/clear.rs | 27 | /// For a more complete example how to utilize `Clear` to realize popups see | COMMENT |
| MEDIUM | ratatui-widgets/src/block.rs | 205 | /// - [Collapse borders recipe] - Techniques for creating seamless layouts (on the ratatui website) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/apps/popup/src/main.rs | 59 | let paragraph = Paragraph::new("Lorem ipsum").block(popup_block); | CODE |
| LOW | ratatui-widgets/examples/scrollbar.rs | 109 | Line::from_iter(["Lorem ipsum dolor sit amet, consectetur adipiscing elit.".repeat(10)]), | CODE |
| LOW | ratatui-widgets/examples/scrollbar.rs | 109 | Line::from_iter(["Lorem ipsum dolor sit amet, consectetur adipiscing elit.".repeat(10)]), | CODE |
| LOW | ratatui-widgets/examples/shadow.rs | 124 | let sentence = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore | CODE |
| LOW | ratatui-widgets/examples/shadow.rs | 124 | let sentence = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore | CODE |
| LOW | ratatui-widgets/src/paragraph.rs | 1325 | let paragraph = Paragraph::new("Lorem ipsum"); | CODE |
| LOW | ratatui-widgets/src/paragraph.rs | 1334 | let paragraph = Paragraph::new("Lorem ipsum"); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | CHANGELOG.md | 641 | > This PR was generated by Claude, and validated by me. | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/apps/todo-list/src/main.rs | 80 | "Minnak loves to be pet by you! Don't forget to pet and give some treats!", | CODE |
| MEDIUM | ratatui-core/src/layout.rs | 82 | //! Here's a simple example of creating a basic layout using the [`Layout`] struct: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/check-pr.yml | 65 | # Check if pattern matches | COMMENT |
| LOW | .github/workflows/ci.yml | 233 | # Check if README.md is up-to-date with the crate's documentation. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | .github/workflows/release-plz.yml | 44 | # Create a PR with the new versions and changelog, preparing the next release. | COMMENT |