Add code checks before document publication

Author: FlinglinCreated Sep 21, 2026Updated Sep 22, 2026

I have noticed that gpui-kit is undergoing rapid iteration, leading to API changes between versions that are not always reflected in the documentation examples in a timely manner—such as the event listener examples for the Input component in gpui-component. Therefore, I propose introducing a pre-release check tool for gpui-kit to ensure that all examples are updated to align with the new APIs. This will be implemented using GitHub Actions.

Implementation method: Compile each small example (just like this picture) using the code below and ensure it compiles successfully; gpui-kit will use the latest version from GitHub.

Image
rust
pub struct TestBox {}
impl Render for TestBox {
    fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
      //example_here
    }
}

This is just a preliminary idea. It may be adjusted after reviewing all the examples. If you think this change would benefit the gpui-kit documentation, I would be happy to submit a PR to implement it. Please also let me know if you have any better suggestions. @huacnlee

Source: longbridge/gpui-component