Rust GUI components for building fantastic cross-platform desktop application by using GPUI.
This report summarizes scanner evidence for longbridge/gpui-component, a Rust project with 18,826 GitHub stars. SynthScan examined 592,126 lines of code across 1610 source files, recording 843 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 1.6 (Low 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.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 779 finding(s).
Are imports declared and package/API names verified? 48 finding(s).
Are wrappers, guards, and repeated structures necessary? 30 finding(s).
Which changes need focused human review? 843 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 843 distinct pattern matches across 10 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 | crates/story-web/www/src/main.js | 1 | const embedded = window.parent !== window; | COMMENT |
| LOW | crates/shell/tests/integration/main.rs | 1 | //! The shell's integration tests, in one binary. | COMMENT |
| LOW | crates/shell/src/spec.rs | 1 | //! The element description buffer. | COMMENT |
| LOW | crates/shell/src/spec.rs | 21 | use crate::HostValue; | COMMENT |
| LOW | crates/shell/src/spec.rs | 41 | /// | COMMENT |
| LOW | crates/shell/src/spec.rs | 61 | hashed ^= hashed >> 30; | COMMENT |
| LOW | crates/shell/src/spec.rs | 261 | Registered(RegisteredComponentSpec), | COMMENT |
| LOW | crates/shell/src/spec.rs | 281 | COMMENT | |
| LOW | crates/shell/src/spec.rs | 301 | /// The heading that owns one item's trigger. | COMMENT |
| LOW | crates/shell/src/spec.rs | 321 | /// | COMMENT |
| LOW | crates/shell/src/spec.rs | 341 | /// One tab in a [`Component::Tabs`]. | COMMENT |
| LOW | crates/shell/src/spec.rs | 361 | /// The press and drag surface of a [`Component::Slider`]. | COMMENT |
| LOW | crates/shell/src/spec.rs | 381 | /// A semantic table root. It has no data source and no delegate: the | COMMENT |
| LOW | crates/shell/src/spec.rs | 401 | /// there is no builder to change it afterwards. | COMMENT |
| LOW | crates/shell/src/spec.rs | 421 | /// window, and window-edge snapping. It holds no open state at all — it | COMMENT |
| LOW | crates/shell/src/spec.rs | 441 | /// Nothing under it is described. Its panels are entities the script handed | COMMENT |
| LOW | crates/shell/src/spec.rs | 661 | pub fn render_items(&self) -> CallbackId { | COMMENT |
| LOW | crates/shell/src/spec.rs | 781 | /// A handler for one named action. | COMMENT |
| LOW | crates/shell/src/spec.rs | 801 | Slot(&'static str, SpecId), | COMMENT |
| LOW | crates/shell/src/spec.rs | 941 | pub fn keys(&self) -> &[String] { | COMMENT |
| LOW | crates/shell/src/spec.rs | 1001 | Value(Bridged), | COMMENT |
| LOW | crates/shell/src/spec.rs | 1221 | // structure, and a template could not fill one from the other. | COMMENT |
| LOW | crates/shell/src/dock.rs | 1 | //! Dock and panel integration: a script contributes a panel to a docked | COMMENT |
| LOW | crates/shell/src/dock.rs | 21 | //! nothing but the panels — so every tab bar and dock frame a script wants | COMMENT |
| LOW | crates/shell/src/dock.rs | 61 | entities::EntityHandle, | COMMENT |
| LOW | crates/shell/src/dock.rs | 81 | /// The returned pointer is stable: calling this twice with the same pair | COMMENT |
| LOW | crates/shell/src/dock.rs | 121 | /// | COMMENT |
| LOW | crates/shell/src/dock.rs | 141 | COMMENT | |
| LOW | crates/shell/src/dock.rs | 201 | ) { | COMMENT |
| LOW | crates/shell/src/dock.rs | 361 | .child(self.view.clone()) | COMMENT |
| LOW | crates/shell/src/dock.rs | 481 | /// no-chrome behavior, so an application that draws no dock chrome implements | COMMENT |
| LOW | crates/shell/src/dock.rs | 581 | COMMENT | |
| LOW | crates/shell/src/dock.rs | 641 | /// installs the real one here for the length of the call and the script's | COMMENT |
| LOW | crates/shell/src/dock.rs | 721 | /// | COMMENT |
| LOW | crates/shell/src/dock.rs | 741 | /// Make this tab a drag source carrying base's own panel payload. | COMMENT |
| LOW | crates/shell/src/dock.rs | 841 | fn default() -> Self { | COMMENT |
| LOW | crates/shell/src/dock.rs | 941 | }) | COMMENT |
| LOW | crates/shell/src/dock.rs | 1001 | } | COMMENT |
| LOW | crates/shell/src/typings.rs | 1 | //! TypeScript declarations for the script API (design doc §14.4). | COMMENT |
| LOW | crates/shell/src/typings.rs | 21 | //! `gpui-component`, whose components are the reason the seam exists — needs a | COMMENT |
| LOW | crates/shell/src/typings.rs | 41 | //! * Their documentation is GPUI's own, carried on the same reflection entries, | COMMENT |
| LOW | crates/shell/src/typings.rs | 61 | //! * **Element lifetime.** An element is consumed when it is used and belongs | COMMENT |
| LOW | crates/shell/src/typings.rs | 101 | /// The editor configuration filename, in the spelling a JavaScript project uses. | COMMENT |
| LOW | crates/shell/src/typings.rs | 941 | // Do not edit: gpui-shell rewrites this on every run, in every directory that | COMMENT |
| LOW | crates/shell/src/policy.rs | 1 | //! What a piece of running script is allowed to do, and who answers for it. | COMMENT |
| LOW | crates/shell/src/policy.rs | 21 | //! activate(B) ↑ | COMMENT |
| LOW | crates/shell/src/policy.rs | 61 | /// The authority one application or plugin runs under. | COMMENT |
| LOW | crates/shell/src/policy.rs | 81 | /// | COMMENT |
| LOW | crates/shell/src/policy.rs | 181 | } | COMMENT |
| LOW | crates/shell/src/runtime.rs | 241 | /// what keeps a later field from being a breaking change to somebody else. | COMMENT |
| LOW | crates/shell/src/runtime.rs | 281 | /// | COMMENT |
| LOW | crates/shell/src/runtime.rs | 441 | } | COMMENT |
| LOW | crates/shell/src/runtime.rs | 501 | /// otherwise panic on the outstanding borrow. | COMMENT |
| LOW | crates/shell/src/runtime.rs | 741 | } | COMMENT |
| LOW | crates/shell/src/action.rs | 1 | //! The one action type a script can name. | COMMENT |
| LOW | crates/shell/src/host.rs | 201 | // --------------------------------------------------------------------------- | COMMENT |
| LOW | crates/shell/src/host.rs | 221 | /// Write TypeScript declarations next to an application. | COMMENT |
| LOW | crates/shell/src/host.rs | 861 | // Launched from a terminal, a GPUI process opens its window behind | COMMENT |
| LOW | crates/shell/src/host.rs | 1161 | .map_err(|error| format!("invalid {}: {error}", path.display())) | COMMENT |
| LOW | crates/shell/src/host.rs | 1241 | /// The loop, the failure toast and the exit conditions all live in | COMMENT |
| 685 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | crates/shell/src/policy.rs | 20 | //! activate(A) ─▶ A runs ─▶ await ────────────────▶ A resumes | COMMENT |
| MEDIUM⚡ | crates/shell/src/snapshot.rs | 10 | //! script state changes ──▶ build snapshot ──▶ ┌───────────┐ | COMMENT |
| MEDIUM⚡ | crates/shell/src/snapshot.rs | 12 | //! └───────────┘ | COMMENT |
| MEDIUM⚡ | crates/shell/src/snapshot.rs | 14 | //! many GPUI frames ◀──────┘ │ │ | COMMENT |
| MEDIUM⚡ | crates/shell/src/snapshot.rs | 34 | //! ┌───────────┐ | COMMENT |
| MEDIUM⚡ | crates/shell/src/snapshot.rs | 36 | //! └───────────┘ | COMMENT |
| MEDIUM⚡ | crates/shell/src/snapshot.rs | 38 | //! many GPUI frames ◀──────┤ | COMMENT |
| MEDIUM | crates/shell/src/engine/quickjs/entity_api.rs | 562 | // ── CalendarState ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/component/src/tooltip.rs | 30 | // ── Tooltip view (unchanged API) ──────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/component/src/tooltip.rs | 151 | // ── Managed tooltip system ────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/component/src/tooltip.rs | 195 | // ── Extension trait for managed tooltips ───────────────────────────────────── | COMMENT |
| MEDIUM | crates/component/src/tooltip.rs | 197 | // ── Shared tooltip state for components ───────────────────────────────────── | COMMENT |
| MEDIUM | crates/component/src/tooltip.rs | 234 | // ── Internal managed tooltip trait ────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/base/src/animation.rs | 73 | // ── Easing presets ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/base/src/animation.rs | 97 | // ── Lerp trait ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/base/src/animation.rs | 141 | // ── Transition combinator ─────────────────────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/shell/src/components/shell/retained_forms/mod.rs | 429 | "placeholder", | CODE |
| LOW | crates/shell/src/components/shell/retained_forms/mod.rs | 431 | "placeholder", | CODE |
| LOW | crates/shell/src/components/shell/retained_forms/mod.rs | 474 | "placeholder", | CODE |
| LOW | crates/shell/src/components/shell/retained_forms/mod.rs | 492 | let placeholder = optional_text(placeholder, "placeholder")?; | CODE |
| LOW | …ates/shell/src/components/shell/delegate_select/mod.rs | 296 | method("placeholder", "Sets the text shown while nothing is selected.", ArgumentSchema::String, |arg| match | CODE |
| LOW | crates/shell/src/components/shell/command/command.rs | 299 | MethodDescriptor::new("placeholder", vec![ArgumentDescriptor::new("placeholder", ArgumentSchema::String)], |args | CODE |
| LOW | crates/shell/src/components/shell/input_group/mod.rs | 421 | "placeholder", | CODE |
| LOW | …es/shell/src/components/shell/delegate_combobox/mod.rs | 326 | method("placeholder", "Sets the text shown while nothing is selected.", ArgumentSchema::String, |arg| match | CODE |
| LOW | crates/kit/tests/integration/painted_text.rs | 16 | .child(Avatar::new().name("Jane Doe")) | CODE |
| LOW | crates/kit/tests/integration/painted_text.rs | 49 | assert!(find("Jane Doe").is_alternative()); | CODE |
| LOW | crates/base/src/test_support.rs | 67 | .field("placeholder", &self.placeholder) | CODE |
| LOW | crates/base/src/text/text_view.rs | 1486 | .map(|i| format!("Block {i}: {}", "lorem ipsum dolor ".repeat(words))) | CODE |
| LOW | crates/story/src/stories/input_story.rs | 153 | "Jane Doe", | CODE |
| LOW | website/component/label.md | 249 | .child(Label::new("John Doe")) | CODE |
| LOW | website/component/input.md | 46 | .default_value("John Doe") | CODE |
| LOW | website/component/menu.md | 445 | .child("John Doe") | CODE |
| LOW | website/component/description-list.md | 172 | DescriptionItem::new("Full Name").value("John Doe"), | CODE |
| LOW | website/component/sidebar.md | 262 | menu.menu("Acme Corp", Box::new(SelectCompany("acme"))) | CODE |
| LOW | website/component/sidebar.md | 281 | .child("John Doe") | CODE |
| LOW | website/component/avatar.md | 24 | .name("John Doe") | CODE |
| LOW | website/component/avatar.md | 35 | .name("John Doe") | CODE |
| LOW⚡ | website/component/avatar.md | 67 | .name("John Doe") | CODE |
| LOW⚡ | website/component/avatar.md | 71 | .name("John Doe") | CODE |
| LOW⚡ | website/component/avatar.md | 75 | .name("John Doe") // 48px (default medium) | CODE |
| LOW⚡ | website/component/avatar.md | 78 | .name("John Doe") | CODE |
| LOW⚡ | website/component/avatar.md | 83 | .name("John Doe") | CODE |
| LOW | website/component/avatar.md | 110 | .child(Avatar::new().name("John Doe")) | CODE |
| LOW | website/component/avatar.md | 178 | Avatar::new().name("John Doe"), | CODE |
| LOW | website/component/avatar.md | 223 | .name("John Doe") | CODE |
| LOW | website/component/avatar.md | 230 | .child("John Doe") | CODE |
| LOW | website/zh-CN/component/label.md | 224 | .child(Label::new("John Doe")) | CODE |
| LOW | website/zh-CN/component/input.md | 44 | .default_value("John Doe") | CODE |
| LOW | website/zh-CN/component/menu.md | 405 | .child("John Doe") | CODE |
| LOW | website/zh-CN/component/description-list.md | 167 | DescriptionItem::new("Full Name").value("John Doe"), | CODE |
| LOW | website/zh-CN/component/avatar.md | 24 | .name("John Doe") | CODE |
| LOW | website/zh-CN/component/avatar.md | 34 | .name("John Doe") | CODE |
| LOW⚡ | website/zh-CN/component/avatar.md | 61 | .name("John Doe") | CODE |
| LOW⚡ | website/zh-CN/component/avatar.md | 65 | .name("John Doe") | CODE |
| LOW⚡ | website/zh-CN/component/avatar.md | 69 | .name("John Doe") | CODE |
| LOW⚡ | website/zh-CN/component/avatar.md | 72 | .name("John Doe") | CODE |
| LOW⚡ | website/zh-CN/component/avatar.md | 76 | .name("John Doe") | CODE |
| LOW | website/zh-CN/component/avatar.md | 103 | .child(Avatar::new().name("John Doe")) | CODE |
| LOW | website/zh-CN/component/avatar.md | 165 | Avatar::new().name("John Doe"), | CODE |
| LOW | website/zh-CN/component/avatar.md | 210 | .name("John Doe") | CODE |
| LOW | website/zh-CN/component/avatar.md | 217 | .child("John Doe") | CODE |
| LOW | examples/sidebar/src/main.rs | 116 | .child("Acme Inc") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | crates/base/src/input/editor/lsp/code_actions.rs | 84 | editor.extras.context_menu_content.code_action.items.clear(); | CODE |
| CRITICAL | crates/base/src/input/editor/lsp/overlay.rs | 81 | !self.extras.context_menu_content.completion.items.is_empty(); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/story-web/scripts/build-wasm.sh | 23 | # Step 1: Build WASM | COMMENT |
| LOW⚡ | crates/story-web/scripts/build-wasm.sh | 48 | # Step 2: Generate JavaScript bindings | COMMENT |
| LOW⚡ | script/bump-version.sh | 56 | # Step 1: Update crates version | COMMENT |
| LOW⚡ | script/bump-version.sh | 66 | # Step 2: Stage changes | COMMENT |
| LOW⚡ | script/bump-version.sh | 76 | # Step 3: Create commit and tag | COMMENT |
| LOW | script/bump-version.sh | 93 | # Step 4: Push to remote | COMMENT |
| LOW⚡ | …ills/gpui-kit/references/gpui/entity-best-practices.md | 51 | // Step 1: call hooks directly through list_state (no entity lock) | COMMENT |
| LOW⚡ | …ills/gpui-kit/references/gpui/entity-best-practices.md | 54 | // Step 2: update the parent entity — different lock, safe | COMMENT |
| LOW⚡ | …ills/gpui-kit/references/gpui/entity-best-practices.md | 61 | // Step 3: sync list state directly — no entity lock | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | website/src/lib/llms.ts | 27 | export function documentationLicenseNotice(lang: 'en' | 'zh-CN', source: string): string { | CODE |
| LOW | website/src/lib/llms.ts | 34 | function documentationLicenseSummary(lang: 'en' | 'zh-CN', source: string): string { | CODE |
| LOW | script/bump-gpui.ts | 1187 | function makeDeclarativeMacrosCrateRelative( | CODE |
| LOW | script/bump-gpui.ts | 1207 | function rewriteDeclarativeMacroPaths(source: string): string { | CODE |
| LOW | script/bump-gpui.ts | 1410 | function installFacadeAwareMacroPaths( | CODE |
| LOW | script/bump-gpui.ts | 1672 | function vendorGpuiSourcesForApple( | CODE |
| LOW | script/tests/test_ai_recipes.py | 28 | def test_changed_source_rejects_stale_published_code(self): | CODE |
| LOW⚡ | script/tests/test_ai_recipes.py | 40 | def test_removed_or_duplicate_markers_cannot_silently_drop_coverage(self): | CODE |
| LOW⚡ | script/tests/test_ai_recipes.py | 46 | def test_empty_inventory_cannot_report_success(self): | CODE |
| LOW⚡ | script/tests/test_ai_recipes.py | 51 | def test_invalid_trust_label_is_rejected(self): | CODE |
| LOW⚡ | script/tests/test_ai_recipes.py | 56 | def test_duplicate_recipe_ids_are_rejected(self): | CODE |
| LOW | script/tests/test_ai_recipes.py | 67 | def test_missing_recipe_destination_is_rejected(self): | CODE |
| LOW | examples/js_story/stories/registered.js | 259 | export function initializeRegisteredExamples() { | CODE |
| LOW | examples/js_story/stories/registered.js | 328 | function expandedInputGroupExamples(cx) { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | website/docs/design-guides.md | 913 | ## Guidance for AI-generated interfaces | COMMENT |
| HIGH | …lls/gpui-kit-design-guides/references/design-guides.md | 913 | ## Guidance for AI-generated interfaces | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/story-web/scripts/build-wasm.sh | 23 | # Step 1: Build WASM | COMMENT |
| LOW⚡ | crates/story-web/scripts/build-wasm.sh | 48 | # Step 2: Generate JavaScript bindings | COMMENT |
| LOW⚡ | script/bump-version.sh | 56 | # Step 1: Update crates version | COMMENT |
| LOW⚡ | script/bump-version.sh | 66 | # Step 2: Stage changes | COMMENT |
| LOW⚡ | script/bump-version.sh | 76 | # Step 3: Create commit and tag | COMMENT |
| LOW | script/bump-version.sh | 93 | # Step 4: Push to remote | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | crates/story-web/scripts/build-wasm.sh | 42 | # Check if WASM file exists | COMMENT |
| LOW | script/bump-version.sh | 13 | # Check if version argument is provided | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | crates/kit/Cargo.toml | 26 | # GPUI's test harness, native-platform rendering, and Kit UI test helpers. | COMMENT |