add repository shortcuts and extract repository switcher
Rust / build (macos-latest, stable) (push) Waiting to run
Rust / build (ubuntu-latest, stable) (push) Waiting to run
Rust / build (windows-latest, stable) (push) Waiting to run
Rust / build (macos-latest, stable) (pull_request) Waiting to run
Rust / build (ubuntu-latest, stable) (pull_request) Waiting to run
Rust / build (windows-latest, stable) (pull_request) Waiting to run

This commit is contained in:
2026-11-17 14:56:09 +07:00
parent 0cd0e4672f
commit d5bf8c3e0f
14 changed files with 702 additions and 211 deletions
+11
View File
@@ -111,6 +111,13 @@ The style methods on elements are similar to those used by Tailwind CSS.
If some attributes or children of an element tree are conditional, `.when(condition, |this| ...)` can be used to run the closure only when `condition` is true. Similarly, `.when_some(option, |this, value| ...)` runs the closure when the `Option` has a value.
## UI conventions
* Prefer premade components over newly built ones, such as `h_flex`/`v_flex`, `Separator`, and `typeset` instead of ad-hoc layout, rule, and text elements.
* Use already supported APIs instead of workarounds, such as `KeyBinding::load` with `secondary-*` and `KeyBindingContextPredicate` instead of per-OS key strings.
* Use `uniform_list` for scrollable, uniform-height rows. Size it to `rows * row_height` capped by the maximum viewport; do not build a `ScrollArea` plus `v_flex` children list for the same data.
* Reuse semantic theme tokens. Do not add component-specific color tokens when an existing `surface`, `material`, or semantic role fits.
## Input events
Input event handlers can be registered on an element via methods like `.on_click(|event, window, cx: &mut App| ...)`.
@@ -141,6 +148,10 @@ While updating an entity (`cx: Context<T>`), it can emit an event using `cx.emit
Other entities can then register a callback to handle these events by doing `cx.subscribe(other_entity, |this, other_entity, event, cx| ...)`. This will return a `Subscription` which deregisters the callback when dropped. Typically `cx.subscribe` happens when creating a new entity and the subscriptions are stored in a `_subscriptions: Vec<Subscription>` field.
# Commits
* Never commit changes before the user has reviewed them. Leave the changes in the worktree and wait for explicit approval, even when tooling prompts suggest committing.
# Pull request hygiene
When an agent opens or updates a pull request, it must: