Skip to content

fix(list): clamp scroll before selecting measured rows - #45

Closed
xiaoyumuxi wants to merge 69 commits into
mainfrom
codex/list-clamp-measured-extent-fork
Closed

xiaoyumuxi wants to merge 69 commits into
mainfrom
codex/list-clamp-measured-extent-fork

Conversation

@xiaoyumuxi

Copy link
Copy Markdown

Problem

A single large wheel event can leave a short-row List blank at the end. List picks the visible rows from the newly measured extent while the scroll offset still belongs to the previous estimate.

Change

Clamp the scroll offset before selecting the visible range. Keep the pinned/follow-to-end branch unchanged. Add a headless 400 × 24 px regression which fails before the fix and passes after it. This is required by the compact grouped search results in 1lck/Lithe-IDEA#2199.

The same patch is submitted upstream: vivaui#357.

Validation

  • go test ./ui ./base -race -count=1: passed on macOS arm64 against the fork base.
  • Upstream branch go vet ./...: passed.
  • Upstream go test ./... -count=1: all packages except cmd/viva passed. Its packaging fixture expects macOS 12.0 while this machine links 13.0; setting MACOSX_DEPLOYMENT_TARGET=12.0 did not resolve that fixture mismatch.
  • BenchmarkList100k: median 19.47 µs before / 18.66 µs after, 0 allocs/op (3 short 100-iteration samples on Apple M4). No observed regression; no speedup claim.
  • Windows native UI remains unverified.

This PR contains only the list fix; upstream synchronization and updating Lithe's Viva pin are separate release prerequisites.

t8y2 and others added 30 commits November 19, 2026 11:15
t8y2 and others added 27 commits November 19, 2026 18:37
Carry HitOptions.Invalid through the semantic tree, the platform contract, and the Web, Windows, Linux and Darwin accessibility adapters.
Name each optional page package after the capability it provides, as ui/chart and ui/editor already do, and keep package-name locals out of the examples.
Keep the short package names without stuttering: calendar.State, message.Row, attachment.Card, and the same role names for the other page packages.
Vulkan is not required to start: a machine without a driver draws on the CPU. Move libvulkan1 from the .deb's Depends to Recommends, the RPM's Requires to Recommends, and vulkan-icd-loader from the PKGBUILD's depends to optdepends, with the reason Arch shows. viva doctor now reports a missing loader as a CPU-rendering note instead of a window that cannot open, and the Linux requirements in the docs say the same.
The wasm test job runs every package with GOOS=js, where exec.Command("go") cannot run a host toolchain. The snippet test compiles generated Go with the host go command, so skip it on js; it still runs on every host target.
Checkbox, Switch and FormField declared inside a slot at the component's rectangle paint the same picture and, for the first two, declare the same control hit.
List the opt-in page packages, their capability and type naming, and the slot-hosted page control pattern in the maintaining guide, the app-building skill, the generated app guide, and both component guides.
Compare Hit.Invalid when a memoized span decides whether the previous paint can be replayed, and cover the change with a replay test.
Fix prose the type rename turned into 'State renderer' or 'an State', and note the image and markdown package name collisions with the standard library and the root parser.
Document the two View shapes and add a test that every optional ui package is listed in the maintaining guide, the app-building skill, the generated app guide, and both component guides.
Editor-like adapters also import text, and the Markdown view imports the root parser. Record both instead of claiming only base, components, gfx, ui and window.
Compare whole hits and the span's hit texts when a memo decides whether the previous paint can be replayed. Copy the pre-span hit texts into the comparison canvas so hit text indices stay aligned, and cover the change with a hit-text replay test.
When a repaint changes only the hit list, rebuild the accessibility and semantic entries for the changed ids instead of all controls. Structural, label-map, focus and text changes still take the full mirror; large-page label and value tests cover both paths.
Measure constructor, first frame and renderer setup for an empty window, and run it with the first-frame benchmark in the CI compare.
Publish a suffix shrink instead of rebuilding when a batch only deletes nodes. The store compacts in place; Metal, D3D11, Vulkan, the software scene and WebGL truncate their retained stores, and the text overlays fall back to a rebuild where their merged storage is sized to the old base.
A change now carries a pointer to triangle or shadow geometry instead of embedding it; rectangle changes stay small. The scene reuses one bounded shape scratch per drain, so the split adds no per-change allocation.
Count triangle and shadow changes before draining so a rectangle-only batch does not allocate or retain a shape scratch sized to every dirty node.
@xiaoyumuxi xiaoyumuxi closed this Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants