A Rust crate for cooking up terminal user interfaces (TUIs) 👨🍳🐀 https://ratatui.rs
This report summarizes scanner evidence for ratatui/ratatui, a Rust project with 22,931 GitHub stars. SynthScan examined 104,551 lines of code across 374 source files, recording 1275 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 16.1 (Elevated pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 1078 finding(s).
Are imports declared and package/API names verified? 7 finding(s).
Are wrappers, guards, and repeated structures necessary? 190 finding(s).
Which changes need focused human review? 1275 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 1275 distinct pattern matches across 9 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| 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 | //! | COMMENT |
| LOW | ratatui/src/lib.rs | 101 | //! - [Breaking Changes] - a list of breaking changes in the library. | COMMENT |
| LOW | ratatui/src/lib.rs | 121 | //! - **Backend crates**: [`ratatui-crossterm`], [`ratatui-termion`], [`ratatui-termina`], | COMMENT |
| LOW | ratatui/src/lib.rs | 141 | //! Ratatui uses [Crossterm] by default as it works on most platforms. See the [Installation] | COMMENT |
| LOW | ratatui/src/lib.rs | 161 | //! loop { | COMMENT |
| LOW | ratatui/src/lib.rs | 181 | //! | COMMENT |
| LOW | ratatui/src/lib.rs | 201 | //! | COMMENT |
| LOW | ratatui/src/lib.rs | 221 | //! method takes a closure that is called with a [`Frame`] instance. The [`Frame`] provides the size | COMMENT |
| LOW | ratatui/src/lib.rs | 241 | //! } | COMMENT |
| LOW | ratatui/src/lib.rs | 261 | //! most applications, return the error and let the surrounding setup path restore terminal state | COMMENT |
| LOW | ratatui/src/lib.rs | 281 | //! match event::read()? { | COMMENT |
| LOW | ratatui/src/lib.rs | 301 | //! | COMMENT |
| LOW | ratatui/src/lib.rs | 321 | //! frame.render_widget(Block::bordered().title("Right"), right_area); | COMMENT |
| LOW | ratatui/src/lib.rs | 341 | //! The [`style` module] provides types that represent the various styling options. The most | COMMENT |
| LOW | ratatui/src/lib.rs | 361 | //! Style::new() | COMMENT |
| LOW | ratatui/src/lib.rs | 381 | //! } | COMMENT |
| LOW | ratatui/src/lib.rs | 401 | //! [Widgets]: https://ratatui.rs/recipes/widgets/ | COMMENT |
| LOW | ratatui/src/lib.rs | 421 | //! [`render_widget`]: Frame::render_widget | COMMENT |
| LOW | ratatui/src/lib.rs | 441 | //! [`ratatui-widgets`]: https://crates.io/crates/ratatui-widgets | COMMENT |
| LOW | ratatui/src/lib.rs | 461 | //! [Matrix]: https://matrix.to/#/#ratatui:matrix.org | COMMENT |
| LOW | ratatui/src/lib.rs | 481 | 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 | //! ## Types | COMMENT |
| LOW | ratatui/src/init.rs | 61 | //! - [`try_init_with_options`] - Same as [`init_with_options`] but returns a `Result` instead of | COMMENT |
| LOW | ratatui/src/init.rs | 81 | //! } | COMMENT |
| LOW | ratatui/src/init.rs | 101 | //! if key.kind == KeyEventKind::Press && key.code == KeyCode::Char('q') => | COMMENT |
| LOW | ratatui/src/init.rs | 121 | //! let mut terminal = ratatui::try_init()?; | COMMENT |
| LOW | ratatui/src/init.rs | 141 | //! terminal.insert_before(1, |buf| { | COMMENT |
| LOW | ratatui/src/init.rs | 161 | //! // Using try_init_with_options() - returns Result for custom error handling | COMMENT |
| LOW | ratatui/src/init.rs | 181 | //! UI](`crate#drawing-the-ui`) and [handle events](`crate#handling-events`). See the [main crate | COMMENT |
| LOW | ratatui/src/init.rs | 221 | /// | COMMENT |
| LOW | ratatui/src/init.rs | 241 | /// ratatui::run(|terminal| { | COMMENT |
| LOW | ratatui/src/init.rs | 261 | /// } | COMMENT |
| LOW | ratatui/src/init.rs | 281 | /// type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>; | COMMENT |
| LOW | ratatui/src/init.rs | 301 | /// fn run(&mut self, terminal: &mut ratatui::DefaultTerminal) -> Result<()> { | COMMENT |
| LOW | ratatui/src/init.rs | 321 | /// } | COMMENT |
| LOW | ratatui/src/init.rs | 341 | /// `run(f)`: despite using the default fullscreen viewport, it does not enter the alternate screen | COMMENT |
| LOW | ratatui/src/init.rs | 361 | /// viewport: Viewport::Inline(8), | COMMENT |
| LOW | ratatui/src/init.rs | 401 | /// - Raw mode is enabled | COMMENT |
| LOW | ratatui/src/init.rs | 421 | /// | COMMENT |
| LOW | ratatui/src/init.rs | 441 | /// | COMMENT |
| LOW | ratatui/src/init.rs | 461 | /// ```no_run | COMMENT |
| LOW | ratatui/src/init.rs | 481 | /// - Raw mode is enabled | COMMENT |
| LOW | ratatui/src/init.rs | 501 | /// | COMMENT |
| LOW | ratatui/src/init.rs | 521 | /// Try to initialize a terminal with the given options and reasonable defaults. | COMMENT |
| LOW | ratatui/src/init.rs | 541 | /// Generally, you should use [`init_with_options`] instead of this function, as the panic hook | COMMENT |
| LOW | ratatui/src/init.rs | 561 | set_panic_hook(); | COMMENT |
| 1004 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | ratatui/src/lib.rs | 328 | //! Title Bar─────────────────────────────────── | COMMENT |
| MEDIUM⚡ | ratatui/src/lib.rs | 329 | //! ┌Left────────────────┐┌Right───────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui/src/lib.rs | 331 | //! └────────────────────┘└────────────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui/src/lib.rs | 332 | //! 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 | 835 | // <───────────────────────────────────area_size──────────────────────────────────> | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 838 | // ┌────┬───────────────────┬────┬─────variables─────┬────┬───────────────────┬────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 841 | // ┌ ┐┌──────────────────┐┌ ┐┌──────────────────┐┌ ┐┌──────────────────┐┌ ┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 843 | // └ ┘└──────────────────┘└ ┘└──────────────────┘└ ┘└──────────────────┘└ ┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 846 | // └─┬──┶━━━━━━━━━┳━━━━━━━━━┵─┬──┶━━━━━━━━━┳━━━━━━━━━┵─┬──┶━━━━━━━━━┳━━━━━━━━━┵─┬──┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 848 | // └────────────╂───────────┴────────────╂───────────┴────────────╂──Spacers──┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 850 | // ┗━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━Segments━━━━━━━━┛ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 933 | // ┌────┬───────────────────┬────┬─────variables─────┬────┬───────────────────┬────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 936 | // ┌ ┐┌──────────────────┐┌ ┐┌──────────────────┐┌ ┐┌──────────────────┐┌ ┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 938 | // └ ┘└──────────────────┘└ ┘└──────────────────┘└ ┘└──────────────────┘└ ┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1113 | /// ┌──────┐┌──────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1115 | /// └──────┘└──────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1118 | /// ┌──────┐┌────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1120 | /// └──────┘└────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1303 | /// ┌────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1305 | /// └────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1310 | /// ┌────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1312 | /// └────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1317 | /// ┌───────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1319 | /// └───────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1324 | /// ┌───────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1326 | /// └───────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1331 | /// ┌────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1333 | /// └────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1338 | /// ┌────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1340 | /// └────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1345 | /// ┌────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1347 | /// └────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1352 | /// ┌─────────────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1354 | /// └─────────────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1359 | /// ┌────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/layout.rs | 1361 | /// └────────────┘ | 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 | 1373 | /// ┌───────┐ | COMMENT |
| MEDIUM | ratatui-core/src/layout/layout.rs | 1375 | /// └───────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 87 | /// ┌────────────────────────────┐┌──────────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 89 | /// └────────────────────────────┘└──────────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 95 | /// ┌──────────────────────────────────────┐┌────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 97 | /// └──────────────────────────────────────┘└────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 110 | /// ┌────────────────────────────┐┌──────────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 112 | /// └────────────────────────────┘└──────────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 118 | /// ┌──────────────────────────────────────┐┌────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 120 | /// └──────────────────────────────────────┘└────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 133 | /// ┌──────────────────┐┌──────────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 135 | /// └──────────────────┘└──────────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 141 | /// ┌──────────────────┐┌────────────────────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 143 | /// └──────────────────┘└────────────────────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 161 | /// ┌────────────────────────────────────┐┌──────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 163 | /// └────────────────────────────────────┘└──────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 169 | /// ┌───────────────────────┐┌───────────────────────┐ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 171 | /// └───────────────────────┘└───────────────────────┘ | COMMENT |
| MEDIUM⚡ | ratatui-core/src/layout/constraint.rs | 185 | /// ┌───────────────────────┐┌───────────────────────┐ | COMMENT |
| 130 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | ratatui-core/src/text/line.rs | 833 | /// In this implementation, the `to_line` method panics if the `Display` implementation returns an | COMMENT |
| HIGH | ratatui-core/src/text/span.rs | 492 | /// In this implementation, the `to_span` method panics if the `Display` implementation returns an | COMMENT |
| HIGH | ratatui-core/src/text/text.rs | 744 | /// 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 | 1243 | let paragraph = Paragraph::new("Lorem ipsum"); | CODE |
| LOW | ratatui-widgets/src/paragraph.rs | 1252 | 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 | 245 | # 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 |