messages listlengths 3 3 | category stringclasses 6
values | crate stringclasses 1
value | source dict |
|---|---|---|---|
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Refactor this Leptos regression test component to be clearer about what it's testing and to avoid the inline comment referenc... | refactoring | leptos | {
"type": "function_item",
"name": "ScenarioC",
"source_file": "examples/regression/src/issue_4492.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain how `hydrate_lazy` in `leptos/src/mount.rs` differs from `hydrate_body`, and why it uses `spawn_local` with an async ... | code_explanation | leptos | {
"type": "function_item",
"name": "hydrate_lazy",
"source_file": "leptos/src/mount.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write a code generation component that uses the `defined_at` pattern from `arc_trigger.rs` to create a debug-only location tr... | code_generation | leptos | {
"type": "function_item",
"name": "defined_at",
"source_file": "reactive_graph/src/signal/arc_trigger.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Refactor `file_progress` server function to use a typed progress stream instead of a raw `TextStream`. Define a `ProgressEven... | refactoring | leptos | {
"type": "function_item",
"name": "file_progress",
"source_file": "examples/server_fns_axum/src/app.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Refactor the `AppWorld::new()` implementation to add a configurable timeout for the WebDriver connection, returning a descrip... | refactoring | leptos | {
"type": "impl_item",
"name": "AppWorld",
"source_file": "examples/todo_app_sqlite_axum/e2e/tests/fixtures/world/mod.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain what the `to_template` function does in the context of Leptos's server-side rendering template system. Why does it de... | api_usage | leptos | {
"type": "function_item",
"name": "to_template",
"source_file": "leptos/src/into_view.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Create a Leptos component for an error boundary state that correctly unmounts and cleans up error registrations when dropped.... | code_generation | leptos | {
"type": "function_item",
"name": "drop",
"source_file": "tachys/src/view/error_boundary.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write a Leptos component that uses a keyed `Store` with `patch_field_keyed` to efficiently update a list of todo items, only ... | code_generation | leptos | {
"type": "impl_item",
"name": "[unnamed]",
"source_file": "reactive_stores/src/patch.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Analyze this `hydrate` implementation for `Unsuspend<T>` and identify any issues with the const generic parameter propagation... | bug_detection | leptos | {
"type": "function_item",
"name": "hydrate",
"source_file": "leptos/src/suspense_component.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "The `derive_patch` proc macro in `reactive_stores_macro/src/lib.rs` is supposed to generate a `PatchField` implementation for... | bug_detection | leptos | {
"type": "macro_item",
"name": "derive_patch",
"source_file": "reactive_stores_macro/src/lib.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain what this Leptos component does and how `Suspend`, `Resource`, and `expect_context` work together:\n\n```rust\nfn Ite... | code_explanation | leptos | {
"type": "function_item",
"name": "ItemOverview",
"source_file": "examples/suspense_tests/src/instrumented.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Implement and explain `substores_reachable_through_option` in Leptos's reactive_stores. How does the store system handle `Opt... | code_generation | leptos | {
"type": "function_item",
"name": "substores_reachable_through_option",
"source_file": "reactive_stores/src/option.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain how `Req<Error, InputStreamError, OutputStreamError>` for `Request<Bytes>` in server_fn implements the streaming inpu... | code_explanation | leptos | {
"type": "impl_item",
"name": null,
"source_file": "server_fn/src/request/generic.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write comprehensive tests for the `list_post_metadata` server function from `examples/ssr_modes_axum`. The function returns `... | test_generation | leptos | {
"type": "function_item",
"name": "list_post_metadata",
"source_file": "examples/ssr_modes_axum/src/app.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Show a complete example of a Leptos server function that upgrades to a WebSocket connection using Actix-Web, with a client-si... | code_generation | leptos | {
"type": "function_item",
"name": "try_into_websocket",
"source_file": "server_fn/src/request/actix.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Using the Leptos `add_todo` pattern shown below as inspiration, implement a **new** related function or component that extend... | code_generation | leptos | {
"type": "function_item",
"name": "add_todo",
"source_file": "examples/todo_app_sqlite_csr/e2e/tests/fixtures/action.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Show me how `ArcStoredValue::eq` using pointer equality works in practice, and write a test that demonstrates the difference ... | api_usage | leptos | {
"type": "impl_item",
"name": "PartialEq",
"source_file": "reactive_graph/src/owner/arc_stored_value.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Find the bug in this `Counter` component:\n\n```rust\nfn Counter(initial_value: i32) -> impl IntoView {\n let (value, set_... | bug_detection | leptos | {
"type": "function_item",
"name": "Counter",
"source_file": "leptos/tests/ssr.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write tests for `Memo::new_owning` in leptos. The constructor takes a function `fn(Option<T>) -> (T, bool)` where `bool` indi... | test_generation | leptos | {
"type": "generated",
"name": "new_owning",
"source_file": "reactive_graph/src/computed/memo.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain in depth how the `ItemInspect` component works in `examples/suspense_tests/src/instrumented.rs`. It uses `expect_cont... | code_explanation | leptos | {
"type": "function_item",
"name": "ItemInspect",
"source_file": "examples/suspense_tests/src/instrumented.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Create a helper function `wait_for_component_text` for Leptos e2e tests that polls a named component element until its text m... | code_generation | leptos | {
"type": "function_item",
"name": "inside_message",
"source_file": "examples/suspense_tests/e2e/tests/fixtures/find.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write comprehensive tests for the following Leptos function `AsSubscriberSet`:\n\n```rust\nimpl<T> AsSubscriberSet for ArcRea... | test_generation | leptos | {
"type": "impl_item",
"name": "AsSubscriberSet",
"source_file": "reactive_graph/src/signal/arc_read.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Implement `ErrorHookFuture` — a wrapper that captures the current error hook at construction time and restores it on every po... | code_generation | leptos | {
"type": "impl_item",
"name": null,
"source_file": "any_error/src/lib.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Based on the Leptos codebase pattern shown below from `tachys/src/html/attribute/any_attribute.rs`, write a new, related but ... | code_generation | leptos | {
"type": "function_item",
"name": "build",
"source_file": "tachys/src/html/attribute/any_attribute.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Generate a complete `Stories` list component for a Leptos HackerNews clone. It should fetch stories server-side using a Lepto... | code_generation | leptos | {
"type": "function_item",
"name": "Story",
"source_file": "examples/hackernews_axum/src/routes/stories.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Based on the Leptos codebase pattern shown below from `server_fn/src/error.rs`, write a new, related but distinct function or... | code_generation | leptos | {
"type": "impl_item",
"name": null,
"source_file": "server_fn/src/error.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain in depth how `provide_context` works in Leptos: what it stores the value in, how child components access it, what the... | code_explanation | leptos | {
"type": "function_item",
"name": "provide_context",
"source_file": "reactive_graph/src/owner/context.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain what this `Clone` impl for `AtIndex<Inner, Prev>` does and why the `ty: PhantomData` field is explicitly cloned rathe... | code_explanation | leptos | {
"type": "impl_item",
"name": "Clone",
"source_file": "reactive_stores/src/iter.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Create a new leptos implementation for a task inspired by `Stories` from `examples/hackernews/src/routes/stories.rs`.\n\nRefe... | code_generation | leptos | {
"type": "function_item",
"name": "Stories",
"source_file": "examples/hackernews/src/routes/stories.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write unit tests for a simplified version of the `handle_static_route` logic from Leptos's Actix integration. The tests shoul... | test_generation | leptos | {
"type": "function_item",
"name": "handle_static_route",
"source_file": "integrations/actix/src/lib.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Provide a deep technical explanation of the following Leptos/Rust code for `impl_attr_for_tuples`. Cover: what it does, how i... | code_explanation | leptos | {
"type": "macro_definition",
"name": "impl_attr_for_tuples",
"source_file": "tachys/src/html/attribute/mod.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write a Leptos `App` component that sets up a router with three routes using `FlatRoutes`: a home page at `/`, a blog post pa... | code_generation | leptos | {
"type": "example",
"name": "App",
"source_file": "examples/ssr_modes/src/app.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Show how to implement the `IncomingRequest` trait for a custom HTTP request wrapper that adds request ID tracking and timing ... | api_usage | leptos | {
"type": "impl_item",
"name": "IncomingRequest",
"source_file": "server_fn/src/request/spin.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write a Leptos counter-test helper that removes an existing counter div from the DOM before each test. Extend the pattern to ... | code_generation | leptos | {
"type": "function_item",
"name": "remove_existing_counter",
"source_file": "examples/counter_without_macros/tests/web.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Show a practical, real-world usage example of the `None` API from `reactive_graph/src/signal/rw.rs` in a Leptos application. ... | api_usage | leptos | {
"type": "impl_item",
"name": null,
"source_file": "reactive_graph/src/signal/rw.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain the `pending_data` function in `hydration_context/src/ssr.rs`. What are `__RESOLVED_RESOURCES`, `__PENDING_RESOURCES`... | api_usage | leptos | {
"type": "function_item",
"name": "pending_data",
"source_file": "hydration_context/src/ssr.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Create a `SignIn` leptos component that uses a server action to trigger Google SSO authentication and redirects the user to t... | code_generation | leptos | {
"type": "function_item",
"name": "SignIn",
"source_file": "projects/sso_auth_axum/src/sign_in_sign_up.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "In a Leptos proc-macro, component function signatures are cleaned up before being used in compiler error messages. Write a pr... | code_generation | leptos | {
"type": "function_item",
"name": "to_tokens",
"source_file": "leptos_macro/src/component.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Review the following `main` function from an nginx-mpmc demo that sets up an Axum server with Leptos routes and a server-func... | bug_detection | leptos | {
"type": "example",
"name": "main",
"source_file": "projects/nginx-mpmc/app-1/src/main.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Using the Leptos `Subscriber` pattern shown below as inspiration, implement a **new** related function or component that exte... | code_generation | leptos | {
"type": "impl_item",
"name": "Subscriber",
"source_file": "reactive_graph/src/computed/inner.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain the `from` implementation that converts a `DerefedField<Inner>` into an `ArcField`. Why are all the closures cloned b... | code_explanation | leptos | {
"type": "function_item",
"name": "from",
"source_file": "reactive_stores/src/arc_field.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Generate a simplified version of `patch_field_keyed` for a `Vec<V>` (keyed by index) that: removes elements not in the new ve... | code_generation | leptos | {
"type": "generated",
"name": "patch_field_keyed",
"source_file": "reactive_stores/src/patch.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Implement a `ServerAction` wrapper that tracks the number of pending invocations reactively, shows a loading spinner badge wh... | code_generation | leptos | {
"type": "struct_item",
"name": "Action",
"source_file": "reactive_graph/src/actions/action.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Using the Leptos `failed_to_cast_marker_node` pattern shown below as inspiration, implement a **new** related function or com... | code_generation | leptos | {
"type": "function_item",
"name": "failed_to_cast_marker_node",
"source_file": "tachys/src/hydration.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Implement `add_event_listener_delegated` for a DOM renderer in Leptos/tachys. The function should attach a single listener on... | code_generation | leptos | {
"type": "crates.io",
"name": "tachys",
"source_file": "tachys/src/renderer/dom.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Refactor the following Leptos server-function error handling code. The current version uses a single `String` error type whic... | refactoring | leptos | {
"type": "crates.io",
"name": "leptos",
"source_file": "examples/server_fns_axum/src/app.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain the `status_code` method pattern for error types in Leptos and show how it integrates with Axum's response system:\n\... | code_explanation | leptos | {
"type": "impl_item",
"name": "TodoAppError",
"source_file": "examples/todo_app_sqlite_csr/src/errors.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Show how Leptos's `meta::Title` component cleans up its DOM side-effects when dropped. Why is `Drop` important for meta tags,... | api_usage | leptos | {
"type": "function_item",
"name": "drop",
"source_file": "meta/src/title.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write a custom Axum handler for a Leptos app that injects a path parameter into the reactive context before rendering. The ha... | code_generation | leptos | {
"type": "function_item",
"name": "custom_handler",
"source_file": "examples/todo_app_sqlite_axum/src/main.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Generate a `new` constructor for a `ByteStream<E>` struct that wraps a pinned boxed stream of `Result<String, E>` values. The... | code_generation | leptos | {
"type": "function_item",
"name": "new",
"source_file": "server_fn/src/codec/stream.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write comprehensive tests for `BrowserMockServer` from `server_fn/src/lib.rs`.\n\nCode:\n```rust\nimpl<Error, InputStreamErro... | test_generation | leptos | {
"type": "impl_item",
"name": "BrowserMockServer",
"source_file": "server_fn/src/lib.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Refactor the following `Debug` implementation for `ArcField` to also include the `path_segment` field (if it exists on the st... | refactoring | leptos | {
"type": "generated",
"name": "fmt",
"source_file": "reactive_stores/src/arc_field.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Implement `OnceResource::and_then` for the following skeleton. The method should map the `Ok` value of a `Result` resource us... | code_generation | leptos | {
"type": "derived",
"name": "OnceResource::and_then",
"source_file": "leptos_server/src/once_resource.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Refactor `ExternalServiceTrait2` in this hexagonal architecture Leptos project. The trait has too many responsibilities. Appl... | refactoring | leptos | {
"type": "impl_item",
"name": "ExternalServiceTrait2",
"source_file": "projects/hexagonal-architecture/src/trait_impl.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain the Axum `from_request_parts` implementation for a custom Leptos extractor that retrieves an authenticated user from ... | code_explanation | leptos | {
"type": "function_item",
"name": "from_request_parts",
"source_file": "projects/ory-kratos/app/src/auth/extractors.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Refactor the following Leptos Rust function `None` to improve readability, reduce boilerplate, and follow idiomatic Rust/Lept... | refactoring | leptos | {
"type": "impl_item",
"name": null,
"source_file": "leptos_server/src/local_resource.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Refactor this e2e test step to also support checking that the empty-list message is *absent* (i.e., no such element), and mak... | refactoring | leptos | {
"type": "function_item",
"name": "i_see_the_empty_list_message_is",
"source_file": "examples/todo_app_sqlite/e2e/tests/fixtures/check.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Implement a generic `BoundedCounter` component in Leptos that wraps an `ArcRwSignal<i32>` and exposes increment/decrement but... | code_generation | leptos | {
"type": "function_item",
"name": "set",
"source_file": "reactive_graph/src/signal/arc_rw.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Find the bug in this `IntoView` implementation for `ViewableLoginFlow`:\n\n```rust\nimpl IntoView for ViewableLoginFlow {\n ... | bug_detection | leptos | {
"type": "impl_item",
"name": "IntoView",
"source_file": "projects/ory-kratos/app/src/auth/login.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Detect the bug in this Leptos portal test. The toggle button clicks don't seem to be changing the HTML output — the three ass... | bug_detection | leptos | {
"type": "function_item",
"name": "portal",
"source_file": "examples/portal/tests/web.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "For a Leptos e2e test suite, write an async fixture helper `first_count_is(client, expected)` that retrieves the counter valu... | code_generation | leptos | {
"type": "function_item",
"name": "first_count_is",
"source_file": "examples/suspense_tests/e2e/tests/fixtures/check.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Implement a `get_from_email` function for a Leptos SSO auth module (`projects/sso_auth_axum/src/auth.rs`) that queries a SQLi... | code_generation | leptos | {
"type": "function_item",
"name": "get_from_email",
"source_file": "projects/sso_auth_axum/src/auth.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain how `match_nested` works in `router/src/matching/nested/tuples.rs`. Why does it return `RouteMatchId(0)` unconditiona... | code_explanation | leptos | {
"type": "function_item",
"name": "match_nested",
"source_file": "router/src/matching/nested/tuples.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write a complete Leptos + SQLx full-stack todo app component where `SqlTodo` is converted to a `Todo` with user data loaded f... | code_generation | leptos | {
"type": "impl_item",
"name": "SqlTodo",
"source_file": "projects/session_auth_axum/src/todo.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write tests for `MaybeProp<T>`'s `From<Option<T>>` implementation. The tests should verify: (1) `MaybeProp::from(Some(value))... | test_generation | leptos | {
"type": "impl_item",
"name": "None",
"source_file": "reactive_graph/src/wrappers.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "The following Leptos/Rust code for `UnwrapOrDebug` contains a subtle bug. Identify the bug, explain why it's problematic in a... | bug_detection | leptos | {
"type": "impl_item",
"name": "UnwrapOrDebug",
"source_file": "tachys/src/lib.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write a Leptos e2e helper function `empty_todo_list_parallel` that deletes all todos concurrently using `futures::future::joi... | code_generation | leptos | {
"type": "function_item",
"name": "empty_todo_list",
"source_file": "examples/todo_app_sqlite/e2e/tests/fixtures/action.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Examine this `clear_cookies_inner` function from a Leptos + Ory Kratos integration and identify security and correctness bugs... | bug_detection | leptos | {
"type": "function_item",
"name": "clear_cookies_inner",
"source_file": "projects/ory-kratos/app/src/lib.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Create a new leptos implementation for a task inspired by `server_function_1` from `projects/hexagonal-architecture/src/app.r... | code_generation | leptos | {
"type": "function_item",
"name": "server_function_1",
"source_file": "projects/hexagonal-architecture/src/app.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Show how to use `to_actix_path` from the Leptos Actix integration to convert a Leptos route definition into an Actix-Web rout... | api_usage | leptos | {
"type": "function_item",
"name": "to_actix_path",
"source_file": "integrations/actix/src/lib.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write comprehensive tests for `from` from `reactive_stores/src/field.rs`.\n\nCode:\n```rust\nfn from(value: DerefedField<Inne... | test_generation | leptos | {
"type": "function_item",
"name": "from",
"source_file": "reactive_stores/src/field.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain what the `build` method on `Nonce` does in `leptos/src/nonce.rs`. How does it generate the nonce, and how does it mak... | code_explanation | leptos | {
"type": "library",
"name": "build",
"source_file": "leptos/src/nonce.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "The Leptos tachys view layer has this `AddAnyAttr` implementation for `&'static str`:\n\n```rust\nimpl AddAnyAttr for &'stati... | refactoring | leptos | {
"type": "tachys_source",
"name": "AddAnyAttr",
"source_file": "tachys/src/view/strings.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain the following leptos code in depth (`result_is` from `examples/lazy_routes/e2e/tests/fixtures/check.rs`):\n\n```rust\... | code_explanation | leptos | {
"type": "function_item",
"name": "result_is",
"source_file": "examples/lazy_routes/e2e/tests/fixtures/check.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Implement `Notify` for a custom store field that also logs the notification in debug builds:\n\n```rust\nimpl<T, S> Notify fo... | code_generation | leptos | {
"type": "impl_item",
"name": "Notify",
"source_file": "reactive_stores/src/field.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write a test for the `changing_parent_notifies_subfield` behavior in reactive stores:\n\n```rust\nasync fn changing_parent_no... | code_generation | leptos | {
"type": "function_item",
"name": "changing_parent_notifies_subfield",
"source_file": "reactive_stores/src/lib.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Provide a deep technical explanation of the following Leptos/Rust code for `PossibleRouteMatch`. Cover what it does, why it's... | code_explanation | leptos | {
"type": "impl_item",
"name": "PossibleRouteMatch",
"source_file": "router/src/matching/horizontal/mod.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Create a `to_content_type` helper function for a custom Axum request type that extracts the `Content-Type` header as a `Cow<s... | code_generation | leptos | {
"type": "function_item",
"name": "to_content_type",
"source_file": "server_fn/src/request/spin.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write a complete Leptos app using the `slice!` macro to derive read/write signal pairs from nested struct fields. Show how sl... | code_generation | leptos | {
"type": "function_item",
"name": "green",
"source_file": "leptos_macro/tests/slice.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain what the `hydrate` function in `router/src/flat_router.rs` does. Why does it delegate only to `self.1` and ignore `se... | code_explanation | leptos | {
"type": "function_item",
"name": "hydrate",
"source_file": "router/src/flat_router.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Compare these two `referer()` implementations and identify which is more correct and why:\n\n**Version A:**\n```rust\nfn refe... | bug_detection | leptos | {
"type": "function_item",
"name": "referer",
"source_file": "server_fn/src/request/generic.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Show a practical example of building a Leptos `HomePage` component that renders a sitemap with both static and dynamic links,... | api_usage | leptos | {
"type": "generated",
"name": "HomePage",
"source_file": "projects/sitemap_axum/src/app.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Refactor the `FromFormDataError` enum in `leptos/src/form.rs`. The current version has three variants: `MissingForm`, `FormDa... | refactoring | leptos | {
"type": "crates.io",
"name": "leptos",
"source_file": "leptos/src/form.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write an `IntoRes` implementation for a custom streaming response type called `NdJsonStream<E>` (newline-delimited JSON strea... | code_generation | leptos | {
"type": "impl_item",
"name": "IntoRes for ByteStream",
"source_file": "server_fn/src/codec/stream.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write integration tests for the `ClientReq` implementation on `reqwest::Request` that verify correct HTTP methods are set for... | test_generation | leptos | {
"type": "impl_item",
"name": "Request",
"source_file": "server_fn/src/request/reqwest.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Show how to use `Oco` string concatenation with the `+` operator in leptos, including mixing `Oco::Borrowed`, `Cow`, and `Oco... | api_usage | leptos | {
"type": "function_item",
"name": "add_should_concatenate_strings",
"source_file": "oco/src/lib.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain what `BoxedStream` and its `From<S>` implementation do in `server_fn`. Why is the stream boxed and pinned, and what c... | code_explanation | leptos | {
"type": "impl_item",
"name": null,
"source_file": "server_fn/src/lib.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Find the bug in this server function that manages a shared counter using an atomic:\n\n```rust\npub async fn adjust_server_co... | bug_detection | leptos | {
"type": "function_item",
"name": "adjust_server_count",
"source_file": "examples/counter_isomorphic/src/counters.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Show how to use `ErrorBoundaryView`'s `AddAnyAttr` implementation to attach a CSS class to an error boundary that changes bas... | api_usage | leptos | {
"type": "impl_item",
"name": "AddAnyAttr",
"source_file": "leptos/src/error_boundary.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Create a WebSocket-based hot-reload listener for a Leptos CSR application. It should connect to a devserver, receive JSON mes... | code_generation | leptos | {
"type": "function_item",
"name": "connect_to_hot_patch_messages",
"source_file": "leptos/src/subsecond.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain the `PartialEq` implementation in `reactive_graph/src/signal/guards.rs`. Why does it use a double deref pattern (`**s... | code_explanation | leptos | {
"type": "impl_item",
"name": "PartialEq",
"source_file": "reactive_graph/src/signal/guards.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain how this `cucumber` step function works in the context of a Leptos WebSocket e2e test:\n\n```rust\nasync fn i_see_the... | code_explanation | leptos | {
"type": "function_item",
"name": "i_see_the_page_title_is",
"source_file": "examples/websocket/e2e/tests/fixtures/world/check_steps.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write tests for the `HomePage` component from `examples/ssr_modes_axum/src/app.rs` that verify: posts are listed reactively v... | test_generation | leptos | {
"type": "function_item",
"name": "HomePage",
"source_file": "examples/ssr_modes_axum/src/app.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write unit tests for a `RouterExample` Leptos component that verifies: (1) it renders without panicking, (2) the navigation l... | test_generation | leptos | {
"type": "function_item",
"name": "RouterExample",
"source_file": "examples/router/src/lib.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "I have this `ArcSignal::derive` implementation and I want to find a subtle bug introduced when wrapping the derived signal wi... | bug_detection | leptos | {
"type": "impl_item",
"name": null,
"source_file": "reactive_graph/src/wrappers.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Based on the Leptos codebase pattern shown below from `tachys/src/html/attribute/custom.rs`, write a new, related but distinc... | code_generation | leptos | {
"type": "impl_item",
"name": "NextAttribute",
"source_file": "tachys/src/html/attribute/custom.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write comprehensive tests for this Leptos component that uses `use_context`:\n\n```rust\nfn Child() -> impl IntoView {\n l... | test_generation | leptos | {
"type": "function_item",
"name": "Child",
"source_file": "examples/regression/src/pr_4015.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Generate a Leptos component using `is_attr_let` logic to demonstrate how `let:ref_name` attributes work to bind node refs in ... | refactoring | leptos | {
"type": "synthetic",
"name": "is_attr_let",
"source_file": "leptos_macro/src/view/component_builder.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Refactor the following Rust function/impl `Clone` to improve readability, performance, or idiomatic Rust style. Explain each ... | refactoring | leptos | {
"type": "impl_item",
"name": "Clone",
"source_file": "router/src/matching/choose_view.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Generate a complete implementation extending `build` from `tachys/src/html/attribute/value.rs`:\n\n```rust\nfn build(\n ... | code_generation | leptos | {
"type": "function_item",
"name": "build",
"source_file": "tachys/src/html/attribute/value.rs"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.