Skip to content

Support stable GPUI CE 0.3 - #6

Merged
philocalyst merged 5 commits into
gpui-ce:mainfrom
domenkozar:fix/gpui-ce-0.3
Oct 27, 2026
Merged

philocalyst merged 5 commits into
gpui-ce:mainfrom
domenkozar:fix/gpui-ce-0.3

Conversation

@domenkozar

@domenkozar domenkozar commented Oct 22, 2026 •

Copy link
Copy Markdown

Description

Move the CE workspace from GPUI 0.2.2 to the stable 0.3.0 core, platform, macros, and web releases. Applications using gpui-tray 0.3 can then share one GPUI package with components.

The port adapts shaping, backend caret/cluster geometry, visual-line and shimmer painting, masks, shadow backgrounds, window activation, inspector registration, and profiler frame events. An internal compatibility wrapper preserves the editor's UTF-8 boundaries, indentation, and atomic inline elements while measuring fallback glyphs through the new shaper. Custom selectable text and shimmer keep an independent layout node so automatic inline flow cannot bypass their measurement. The obsolete resolved-system-font reverse lookup is removed because 0.3 caches font resolution.

Draft: the 29 original library regressions are resolved. The current Linux library run passes 1,227 Base tests and 578 Component tests, with one existing Component ignore. The full non-WebView workspace passes, and refreshed native CI is pending; Story interaction and platform performance still need validation. No assertions were disabled or marked ignored to hide failures.

AI assistance: implemented and reviewed with Codex. Validation and its limitations are reported below.

Public API

gpui-base

  • Removed StyledExt::refine_style(self, style: &StyleRefinement) -> Self. GPUI 0.3 supplies the same builder on gpui::Styled, avoiding ambiguous method calls. The wrapping and caret compatibility module is internal.

gpui-component

  • Its re-export of gpui_base::StyledExt has the same method removal. Other widget and theme APIs keep their existing paths.

gpui-kit

  • GPUI re-exports now resolve to stable CE 0.3. Consumers that also depend directly on GPUI must update those dependencies together.

Breaking Changes

Use GPUI's Styled trait for the style refinement builder:

- use gpui_component::StyledExt as _;
+ use gpui::Styled as _;
  div().refine_style(&style)

Keep direct GPUI dependencies aligned with components:

- gpui = { package = "gpui-ce", version = "0.2.2" }
- gpui_platform = { package = "gpui_ce_platform", version = "0.1.0" }
+ gpui = { package = "gpui-ce", version = "0.3.0" }
+ gpui_platform = { package = "gpui_ce_platform", version = "0.3.0" }

How to Test

  • Passed cargo fmt --all --check and git diff --check.
  • Passed Linux workspace Clippy with --all-targets --features gpui-component-story/test-support -- -D warnings, excluding the WebView library/example because WebKitGTK is unavailable locally. This includes Story, examples, and integration-test type checking.
  • Passed cargo test -p gpui_ce_components_base -p gpui_ce_components --features gpui_ce_components/test-support --lib --no-fail-fast: Base 1,227 passed; Component 578 passed, 1 existing ignore.
  • Passed the ten website documentation tests, six recipe-policy tests and recipe fragment verification, four CE version-pin guard tests, and cargo machete.
  • Passed the clean website production build (461 pages), showcase/SEO/link checks, snapshot tests, and versioned-example build/link checks. Kit version resolution now handles both explicit and workspace-inherited versions in live and versioned builds. Local website checks used Bun 1.3.11; the temporary showcase fixture lock header was adapted for that reader while preserving its package versions/checksums. Upstream CI uses Bun 1.4.0.
  • Passed the full non-WebView workspace test run with the CI feature set and example exclusions: 2,245 tests and doctests passed, 3 existing ignores, no failures.
  • Passed cargo check -p gpui_ce_components --no-default-features --locked and the no-default-features library/callback/legacy-compatibility suites: 571 library tests plus 6 integration tests passed, 1 existing ignore.
  • Kit integration fixtures now provide an explicit cached-view root size, disable motion for functional overlay checks, and advance the scheduler for animated geometry checks. Their visibility, validation, focus restoration, and dismissal assertions are retained.
  • FactorSeal's consuming migration PR #70 merged with Linux, macOS, Windows, and experimental Apple desktop CI passing on the earlier native-menu commit. Its Linux Desktop suite passed 200 tests with one live Sentry test ignored. Native Story interaction, accessibility, tray lifecycle, and platform performance remain unverified.

The cleanup restores Icon::data rendering through Svg::data, fixes the macOS test-support feature guard, migrates inherited CI jobs and package/version checks to this CE workspace, and removes unused dependencies. Shared example imports hidden from cargo-machete by #[path] are documented exceptions.

Actual compatibility fixes include constrained rich-text wrapping, direct caret lookup for reveal requests, Command style invalidation and safe first-frame shortcut lookup, and a flex-column Dialog body that keeps its scroll viewport within the capped panel. Test fixtures now use real Parley shaping with bundled fonts for wrapping, actual viewport sizes, deliberate renderer invalidation, and the scheduler clock for animations. The Base suite completes in about four seconds; the old reveal cluster walk made one test alone take several minutes with real shaping.

See docs/GPUI-CE-0.3.md for migration details. The two text_compat tests still cover Unicode caret round trips and multi-byte atomic element ranges using bundled IBM Plex. All seven native-menu tests pass on Linux.

Checklist

  • I have read the CONTRIBUTING document and the coding/design guides.
  • Reviewed the AI-assisted changes.
  • Passed cargo run for related Story tests.
  • Tested macOS, Windows and Linux platform performance.

Native menu CI follow-up

Both native menu backends and their icon loader use App::assets / AssetRegistry, including borrowed/optional registry loads. Tests cover preloaded and on-demand entries, relative-path shadowing, absolute paths, and inline SVG data. FactorSeal's macOS and Windows CI verified consuming builds; this PR's refreshed platform matrix must still verify the full component workspace.

Current CI status

The pushed cleanup commits have no new GitHub check runs registered yet. The earlier failures shown on the original head do not validate these changes. Native CI and the WebView build remain outstanding; the PR stays draft.

@philocalyst

Copy link
Copy Markdown
 --> crates/component/src/icon.rs:80:10
   |
80 |     Data(Arc<[u8]>),
   |     ---- ^^^^^^^^^
   |     |
   |     field in this variant
   |
   = note: `IconSource` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
   = note: `-D dead-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[expect(dead_code)]` or `#[allow(dead_code)]`
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
   |
80 -     Data(Arc<[u8]>),
80 +     Data(()),
   |

Lots of failures like these, are you able to resolve them to the best of your ability?

@domenkozar

Copy link
Copy Markdown
Author

@philocalyst builds now on Linux

@philocalyst
philocalyst marked this pull request as ready for review October 26, 2026 19:32
@philocalyst
philocalyst merged commit d248729 into gpui-ce:main Oct 27, 2026
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.

2 participants