chore(deps): re-pin MoonUI to the visible-range fix - #359
Closed
guyverino wants to merge 1 commit into
Closed
Conversation
MoonUI 850de06d gives `UniformList` its own `on_visible_range` channel, so the observer is no longer called from the closure that also measures a row. Before it, `MoonVirtualList` reported a phantom `0..1` twice per frame ahead of every real range, and the Connections tab acted on it: `on_conn_visible_range` evicts state for rows outside the reported range, so it blurred the focused core-name field one frame after the click and no core could be renamed. No terminal code changes — the consumer was already written against the range the list actually draws.
Collaborator
Author
|
Not needed: CI refreshes the MoonUI crates itself on every build ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Renaming a core in Settings → Connections was impossible: clicking the name field put the caret in and took it straight back out, and the field swallowed no keystrokes.
The cause was in MoonUI, not here.
MoonVirtualList::on_visible_rangecalled its observer from the closure it hands touniform_list— and that closure has a second job:measure_itemrenders one row to obtain a row height, fromrequest_layoutand again fromprepaint, before the real range exists. So the observer received a phantom0..1twice per frame ahead of every real range.settings/connections/mod.rs::on_conn_visible_rangeacts on that range destructively —window.blur(),feed_open = None,picking = Nonefor anything outside it. Entry 0 of that list is always a heading, never a core row, so every core row was evicted one frame after it gained focus. The regression arrived with #349 (virtualising the Connections list); the other consumer, the chart stack, survived it only because its handler is an idempotent assignment that the real range repaired later in the same frame.Fixed upstream in MoonUI#56 (
850de06d):UniformListgained its ownon_visible_rangechannel, invoked once per prepaint with the range that actually goes to the item renderer. This PR is the re-pin — no terminal code changes, because the consumer here was already written against the range the list actually draws.Notable decisions
MoonVirtualList::on_visible_rangehad no documented contract at all before this.0..0, while a list that holds rows but shows none of them (zero height, mid-collapse, not yet sized) stays silent — so a collapsed panel can no longer be mistaken for an empty one and blur the field the user is typing into.Known limitations
MoonDataTablestill observes from inside its item renderer and carries its ownvisible_range.len() <= 1guard against the same phantom. That guard is now redundant and also swallows a legitimate one-row range. Deliberately left for a separate PR — the table is the most heavily used component here and deserves its own verification pass.chart_tabs/mod.rs:1143-1155,windows.rs:131,592gate scenes by tab and window activity), so the new silence at zero height leaves no scene running.How to verify
-D warningserrors reproduce identically on a detachedorigin/main, and this diff contains no.rsat all — pre-existing debt, no new finding.theme_contractgreen.Upstream side, for the record:
MoonUI guardrails PASS(437 component tests),cargo test -p moon-gpui180 green, and six new behavioural tests held by a new audit contract, each proven by mutation.