Repository navigation
gpui-rhai 0.4.0
gpui-rhai 0.4.0
Release date: 2026-10-31. A minor release that is not compatible with 0.3.3;
read Not compatible with 0.3.3 before upgrading.
Runtime API stays 3, gpui-pre/core/platform stay 0.3.9 and MSRV stays 1.95.
Upgrade core, registry and CLI together.
This release is about design. Corner radius now tells kinds of things apart
instead of being a corner style an application picks; fields pad by the gap
around their text again; pressable rows are rounded blocks without the accent
bar; Toolbar sets its fields first; focus frames show after navigation keys
rather than after every click; and key legends sit on their label's baseline.
The full list is in the CHANGELOG.
Radius by kind
The token base no longer has a corners environment axis (square, subtle,
round). Each component takes the radius of its kind, so a tag never reads as a
button beside one:
| Kind | Role | Value |
|---|---|---|
Layout: Region, divider-built bars, rows between dividers (Table, List dividers: true) |
none | 0 |
| Controls: Button, IconButton, fields, Textarea, triggers, groups, the Tabs track; rows you press: Menu items, Select and Combobox options, Command rows, Tree, Timeline, undivided List rows | radius.md |
4 up to 24px tall, 6 above |
| Boxes in a control: Checkbox, Kbd, the Tabs thumb, clear and close targets | radius.xs |
half of md |
| Markers: Tag, Badge, chips, Switch, counts, the SplitPane grip | radius.sm |
capsule |
| Surfaces: Card, Alert, selectable cards, Menu, Popover, Dialog, Toast, field panels | radius.lg |
8 |
A one-line Tooltip takes 4px. Selection in a pressable row is a fill; the
start-edge accent bar is gone. Rows that float sit 4px in from a bare container
or inside a panel's padding. The SplitPane grip darkens on hover and extends only
while dragged. See design/atoms.md and
decisions D74 and D76.
Field padding
metrics.field_pad returns to about 1.4 times the gap between a field's frame
and its text (comfortable 5 / 7 / 10 / 12, compact 3 / 4 / 6 / 10), so md field
text starts on metrics.inset with row text again. Textarea pads evenly:
metrics.multiline_pad is field_pad less the half-leading of its text
(comfortable 2 / 3 / 6 / 8, compact 0 / 0 / 2 / 6). Decision D75.
Toolbar
Toolbar sets fill first, then filters, then context (tags, a breadcrumb),
with the actions at the end, so control-height items hold both edges and
shorter markers sit between them. DataView's toolbar follows. Decision D77.
Focus indicators
ScriptViewConfig::focus_indicators(FocusIndicators) decides when focus styles
paint. By default (Navigation) a focus frame shows after a navigation key
(Tab, Shift+Tab, an arrow, Home, End, Page Up, Page Down, F6) and hides at the
next pointer press; a key with Command, Control or Alt, a shortcut, does not
show it. Always keeps the 0.3 behavior and Never suits an application driven
by shortcuts. A focused text field shows its frame in every mode. The policy
covers focus, group_focus and focus_within styles, overlay triggers and
the native SplitPane and Resizable handles and sliders; a custom primitive reads
PrimitiveContext::focus_indicators. Script windows follow the opening view.
Decision D78.
Baseline alignment
style().items_baseline() sets a row's text children on the baseline of the
row's own text style, measured with the font metrics GPUI paints with (GPUI
gives Taffy no text baselines). Button, Menu and Command set their key legends
on the label's baseline: the ⌘K of Search ⌘K sat 1.5pt high and now ends on
the label's pixel row. An inline Kbd renders one run of text. Decision D79.
Not compatible with 0.3.3
- The
cornersaxis is removed. A Host that setscornersthrough
ThemeTokenOverrides::environment_defaultsfails theme preparation with
UndeclaredEnvironment; drop the entry. A script's.env(#{ corners: ... })
has no effect and can be removed. - Token base and components move together. 0.4.0 components no longer
declarecorners. A project with its own copy ofui/tokens.rhaikeeps
working until it updates the copy; update the token base and the components
in onegpui-rhai update. - The
indicator_barpart is removed from Menu, Combobox (and Select),
Command, Tree, List, Table and Timeline. A stylesheet that names it fails to
load withunknown part. - Behavior. Focus frames no longer follow a click (
focus_indicators);
Toolbar's order changed; cards, rows, fields and the grip changed shape and
padding. A Textarea of a given row count is a few pixels taller. - Structure. An inline Kbd is one text node; its
keypart styles that
text. Button, Menu and Command put the label and the legend in one row. - Rust API.
Aligngains aBaselinevariant: an exhaustivematchneeds
an arm.FocusIndicators,ScriptViewConfig::focus_indicatorsand
PrimitiveContext::focus_indicatorsare new, so they break nothing.
Upgrading from 0.3.3
Upgrade the CLI first, then run gpui-rhai update. It merges the token base
and the 37 modules this release changed, which take 0.4.0: 33 components plus
Toolbar, Composer, DataView and NavigationStack. Merges keep local edits and
write conflicts to .gpui-rhai/conflicts/. Then:
- remove
cornersfrom the Host's environment defaults and from scripts; - remove
indicator_barfromui/styles.rhai; - to keep frames after a click, mount with
.focus_indicators(FocusIndicators::Always); tests that focus a node in code
and expect its frame press Tab instead, or useAlways.
Verification
Before the release, on macOS: format and strict Clippy for the workspace,
tests/native-keyboard and the apps; cargo doc with warnings denied; the
workspace tests (876), the default-feature library tests (614), the native suite
(665, with new tests for focus indicators), the token reload tests (5) and the
apps' tests (51). Each of the release's feature commits passes the registry
lint, the official registry tests, the CLI tests, the app component check, the
native suite and gpui-rhai Clippy on its own.
gallery_profile: Window::draw p95 at most 2.72 ms over every interaction,
within the 8.3 ms budget. The 57 visual baselines (19 Gallery, 38 examples) were
recaptured for the new shapes, and the second pass's 21 changed files are
attributed to D76, D77 and D79; the theme appearance probes (light, dark)
reported no error and closed their windows, and the appearance lifecycle
passed. The release smoke launched its 25 cases and the artifact audit passed
for its 11 binaries. disktree: key_harness passes, and its screenshots in dark
and light show the treemap filling the stage beside the SplitPane panel.
cargo package packaged and built gpui-rhai and gpui-rhai-registry. CI ran
the stable (latest stable and the Grain backend), portable, native, release
(Linux X11 and Wayland smoke, artifact audit) and apps jobs on the pull request
(#216).