Skip to content

test: pin egui resize-response id coupling - #4

Merged
Marenz merged 1 commit into
masterfrom
test/resize-id-coupling
Jun 24, 2026
Merged

test: pin egui resize-response id coupling#4
Marenz merged 1 commit into
masterfrom
test/resize-id-coupling

Conversation

@Marenz

@Marenz Marenz commented Jun 24, 2026

Copy link
Copy Markdown
Owner

The diff-panel and file-list splitter persistence in App::update reads an egui-internal resize response keyed Id::new(<panel>).with("__resize") (added in #3). That id suffix is not part of egui's public API, so an egui upgrade that renames it would silently break splitter persistence with no compile error.

These two headless single-pass egui tests assert the resize response is readable at the exact ids the production code depends on (diff_panel.__resize, file_list_panel.__resize), so such a break fails loudly in CI instead of going unnoticed.

18 tests pass, clippy --all-targets -- -D warnings clean.

The diff-panel and file-list splitter persistence in App::update reads
an egui-internal resize response keyed `Id::new(<panel>).with("__resize")`.
That id suffix is not part of egui's public API, so an egui upgrade that
renames it would silently break splitter persistence with no compile error.

Add two headless single-pass egui tests that assert the resize response is
readable at the exact ids the prod code depends on, so such a break fails
loudly in CI instead.

Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
@Marenz
Marenz enabled auto-merge (squash) June 24, 2026 12:38
@Marenz
Marenz merged commit d971463 into master Jun 24, 2026
1 check passed
@Marenz
Marenz deleted the test/resize-id-coupling branch June 24, 2026 12:52
selckin added a commit to selckin/gitkay that referenced this pull request Jul 18, 2026
dispatch_prefetch warmed selected ± (4 below, 2 above) into the diff cache. Instead, warm every commit currently visible in the list, ordered by distance from the selected row (closest first; ties favor the row below / scroll-down direction), with a hard cap (PREFETCH_MAX=24) so a very tall window doesn't queue a huge number of diff builds. Re-fires when the list scrolls new rows into view as well as when a fresh diff settles; dispatch early-returns if the visible commits are already cached, so scrolling over warm rows is a no-op.

prefetch_targets now reads oids straight from the commit list (no whole-list oid clone per dispatch — the earlier review's finding Marenz#4). Pure + unit-tested for distance order, tie-break, cap, view limiting, and virtual-row exclusion.

Requested feature.
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.

1 participant