Skip to content

chore: isolate story examples from test-support - #2985

Merged
huacnlee merged 2 commits into
mainfrom
refactor/example-editor
Sep 6, 2026
Merged

chore: isolate story examples from test-support#2985
huacnlee merged 2 commits into
mainfrom
refactor/example-editor

Conversation

@huacnlee

@huacnlee huacnlee commented Sep 6, 2026

Copy link
Copy Markdown
Member

Description

Running story examples enables the gallery's gpui-kit/test-support development dependency. GPUI's App::flush_effects() then synchronously draws dirty windows during updates, adding work to interactive execution.

Move all eight story examples into standalone example-* workspace packages that depend on the gallery normally. Their GPUI dependency graphs exclude test-support and leak-detection. Move fixtures with them, update shared fixture references, and update the documented commands. Editor behavior and story test configuration are preserved.

This is a temporary workaround for the reported Linux stuttering, not a fix for GPUI's test-support performance. Why the slowdown is particularly severe on Linux still needs profiling and an upstream investigation; no before/after frame-time measurements or cross-platform performance verification are claimed here.

Break Changes

Launch the migrated examples by package name:

- cargo run --example editor
+ cargo run -p example-editor
- cargo run --example stream_markdown
+ cargo run -p example-stream-markdown

The same convention applies to brush, dock, html, large-text, markdown, and tiles.

How to Test

  • Build all eight packages with cargo build -p example-editor -p example-brush -p example-dock -p example-html -p example-large-text -p example-markdown -p example-stream-markdown -p example-tiles.
  • cargo test -p example-markdown: 10 tests.
  • Inspect each package with cargo tree -p example-editor -e features -i gpui-pre (substitute each package): no test-support or leak-detection features.
  • Rust formatting, diff whitespace, fixture paths, and source-move equivalence checked.

Interactive Linux scrolling and macOS/Windows performance have not been tested.

Checklist

  • Read the contributing guidelines.
  • Reviewed the migration diff; AI-assisted implementation.
  • Ran interactive examples and verified scrolling.
  • Tested macOS, Windows and Linux performance.

@huacnlee huacnlee changed the title build: isolate story examples from test-support chore: isolate story examples from test-support Sep 6, 2026
@huacnlee
huacnlee merged commit 50e2f9a into main Sep 6, 2026
8 of 9 checks passed
@huacnlee
huacnlee deleted the refactor/example-editor branch September 6, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant