Repository navigation
fix(preview): stabilize scrolling and reduce preview resource usage - #1752
Conversation
Keep the held scrollbar range separate from GTK's changing median row-height estimates, then resynchronize on release without moving the document. Cover rendered and virtual-source input routing and drag lifecycle regressions for #1749.
Local validation and handoffScope: virtual rendered/source previews, their shared selection/find/keyboard callers, and asynchronous document media. The adapter retains list virtualization and the document's native adjustment for ordinary scrolling. No preferences, UI strings, dependencies, toolkit/runtime patches, or runner logic changed; the mutation runner only gains one named scenario entry. Full local Rust/E2E suites were intentionally omitted for this bounded change; required CI remains authoritative. Commands/results:
Requested recording: the final rendered-document case also passed while recording the real app on its private Xvfb display. The owner's explicit recording request was followed without using the desktop/session bus. The ignored local file is |
|
still working on |
Keep GTK's visible-row anchor when re-estimated document heights would map thumb movement backwards. Extend the existing drag regressions to cover moving content and releasing the thumb without duplicating scrolling or layout machinery.\n\nRefs #1749
Follow-up: reproduce movement, not just stationary holdsPushed 95221e1. The previous version still reapplied an absolute fractional target behind GTK's corrected visible-row anchor during a forward drag. The old stationary-hold test missed this. The existing regression now checks actual visible text order during movement, interior progress, held content, endpoints, outside-thumb release, and subsequent wheel input. Its original-PR baseline fails in both rendered/source cases; all three A/B baseline repetitions fail the same backward-content assertion, with no setup errors. Architecture/implementation: only 13 additional production lines in the existing adapter, including one per-drag scalar. Preserve GTK's corrected anchor when an estimate would reverse the user's movement. No duplicated scrolling/reveal machinery, buffer copies, caches, timers, preferences, strings, dependencies, or toolkit changes. Larger buffer/reveal/row-sizing experiments were rejected and are not included. Existing unit/E2E coverage owners were extended, not duplicated. Final local checks — verified pinned Podman, GTK 4.22.5, private displays/buses:
Exact scoped commands: # Ignored local wrapper: same pinned Podman base and quality-container cache;
# private xvfb-run + dbus-run-session, GTK_A11Y=none, NO_AT_BRIDGE=1,
# STRATA_REQUIRE_GTK_TESTS=1; cargo test --locked --all-targets --all-features.
bash target/preview-scroll-profile/rust-scoped.sh -- ui::virtual_preview:: ui::document_media:: ui::preview::tests::find:: ui::window::tests::keyboard_dispatch::preview_ownership::default_editing_keys_reach_a_focused_preview ui::window::tests::keyboard_dispatch::preview_ownership::tenxer_preview_owns_document_keys_until_returned
STRATA_CONTAINER_ENGINE=podman ./scripts/e2e.sh tests/e2e/scenarios/test_quick_preview.py -k document_scrollbar_holds -n 0 -s --junitxml=target/e2e-1749-final-regression.xml
STRATA_CONTAINER_ENGINE=podman ./scripts/e2e.sh tests/e2e/scenarios/test_quick_preview.py -k 'preview_renders_markdown or markdown_equations or rendered_document_word or preview_find_navigates or sandboxed_office_files or space_opens_and_closes' -n 2 --junitxml=target/e2e-1749-directional-callers.xml
# Ignored, one-off diagnostics, not maintained/committed harness additions:
STRATA_CONTAINER_ENGINE=podman ./scripts/e2e.sh 'tests/e2e/scenarios/test_quick_preview.py::test_document_scrollbar_holds_content_still_while_rows_recycle[rendered]' -n 0 -p target.preview_scroll_probe -s --junitxml=target/e2e-1749-mixed-final.xml
python3 target/preview-scroll-profile/run-comparisons.pyProfiling: three alternating before/after runs of the same 100-movement fixture/input sequence, comparing original PR
All six final A/B candidate cases passed the content-direction/release probe. Idle main-thread CPU stayed at 0–0.01 s per three-second sample, and voluntary context switches were comparable (roughly 60–67 per sample, one candidate sample 52). The existing idle activity is not fixed by this change. No real-hardware battery-life improvement is claimed. Provenance, raw samples, logs, and the one-off drivers remain ignored under Scope/omissions: this is a bounded private preview-adapter change with its affected input/selection/find/media callers covered above. Full local Rust/E2E suites were intentionally omitted; CI remains authoritative and required checks must pass before merge. No validation override was used. The PR remains draft. After this push, GitHub metadata checks passed, but the full quality/lint/test jobs were skipped while draft, not passed. They still need to run and pass before merge. |
Ignore hidden prefetched rows during pointer hit testing and reuse GTK item positions for constant-time binding cleanup. Share source display/copy storage and render line-number gutters without retained text layouts. Replace idle table polling with notified fitting and drag-only autoscroll while preserving shared live-theme updates. Keep GTK virtualization and the existing scrollbar adapter. Refs #1749
Follow-up: ordinary scrolling, source RAM, and idle table workThis follow-up addresses confirmed preview-layer issues, not just thumb dragging. The browser and Open/Save picker use the same Architecture / implementation: hidden prefetched rows keep stale allocations, so the shared mapped-row helper excludes them from pointer hit testing. The new smooth-scroll regression checks GTK's actual picked row against the document target, rather than sampling whitespace as though it were text. Removing the mapped-row guards makes this exact regression fail ( No second scroll engine, additional document/pixel/layout cache, new setting/string, dependency/toolkit/runtime patch, build/CI change, or maintained harness change was added. The GtkLabel gutter prototype was rejected because its retained layouts did not consistently improve ordinary multiline memory. Early synchronous table-fitting prototypes were also rejected after manual visual checks; final initial/narrow/restored table views and source gutters at normal/increased/reset text sizes were reviewed on private displays. No capture is committed or uploaded as PR evidence. Final targeted validationScope rationale: bounded virtual-preview and interactive-table behavior, including their selection/copy/find, media, keyboard, theme, and browser/picker callers. No global infrastructure or preference-storage behavior changed. Full local Rust/E2E suites were intentionally omitted; CI remains the authoritative full gate. No owner override was used.
STRATA_CONTAINER_ENGINE=podman ./scripts/quality.sh fmt
STRATA_CONTAINER_ENGINE=podman ./scripts/quality.sh clippy
# Ignored local wrapper: verified pinned Podman base, retained quality-container
# cache, private Xvfb + D-Bus, inherited display/bus cleared, GTK_A11Y=none,
# NO_AT_BRIDGE=1, STRATA_REQUIRE_GTK_TESTS=1; no desktop fallback.
# Runs cargo test --locked --all-targets --all-features with these libtest filters:
bash target/preview-scroll-profile/rust-scoped.sh -- ui::virtual_preview:: ui::table_view:: ui::document_media:: ui::preview::tests::find:: ui::window::tests::keyboard_dispatch::preview_ownership::default_editing_keys_reach_a_focused_preview ui::window::tests::keyboard_dispatch::preview_ownership::tenxer_preview_owns_document_keys_until_returned ui::chooser::tests::filtered_preview::space_toggles_the_selected_search_result_in_open_and_save_choosers
STRATA_CONTAINER_ENGINE=podman ./scripts/e2e.sh tests/e2e/scenarios/test_quick_preview.py -k 'document_scrollbar_holds or preview_renders_markdown or markdown_equations or rendered_document_word or preview_find_navigates or sandboxed_office_files or space_opens_and_closes or large_table_header_sort' -n 2 --junitxml=target/preview-scroll-profile/final-e2e.xmlResource measurements — qualified results, not release/hardware claimsSame verified image RAM: three runs per variant and fixture, each performing three real open/wheel-scroll/close cycles of a 1 MiB source file. Final alternating pairs reported zero swap. Values below are median retained measurements after cycle three (KiB); these are application measurements, not a general leak fix.
That is about 10–11 MiB less RSS and 10–11 MiB less private dirty memory in these fixtures. Incremental private growth above each run's startup baseline fell from 30,420 to 19,940 KiB for ordinary lines, and 49,640 to 38,068 KiB for pathological lines. Retained memory stabilizes across the repeated cycles; this is not a claim that GTK returns all allocated pages on close or that media-runtime/GPU RAM growth is fixed. Idle activity: three alternating baseline/candidate CSV-table runs, with two seconds settling and a three-second idle sample. Median main-thread voluntary context switches fell 561 → 170 (~70%); all three candidate samples were lower. Median sampled main-thread CPU was 0.05 → 0.03 s, but that tiny timing signal is noisy. No real-hardware battery-life gain is claimed. Scrolling/loading: the earlier ~9% CPU improvement did not repeat reliably on final code and is withdrawn. In the final three alternating 300-wheel-event runs, mean application scroll CPU was 7.377 → 7.380 s, effectively unchanged; timings varied across runs. Initial-loading speed also did not consistently improve. GTK/Pango layout and mixed-table construction remain significant costs. The actual wheel probes did not reproduce visible backward movement in the baseline, so they are not evidence that every physical-touchpad jump is resolved; the confirmed new correctness regression is stale-row hit testing. Exact one-off measurement commands (not maintained test/harness additions): python3 target/preview-scroll-profile/run-touchpad-comparison.py /workspace/target/preview-scroll-profile/pr1752-before final-scroll
python3 target/preview-scroll-profile/repeat-idle-comparisons.py
python3 target/preview-scroll-profile/repeat-memory-comparisons.py
# Each invokes ./scripts/e2e.sh -n 0 with an ignored diagnostic plugin and
# writes its exact configuration, raw samples, log, and JUnit report under target/.Some exploratory diagnostics were intentionally discarded: a too-early tool timeout interrupted a profiled run; a mixed Markdown source-offset sampler had too few unique text observations to count as a regression verdict. Neither is reported as passing. Maintained final selections above passed after the final changes. Physical touchpad, release-build FPS, real battery life, and the residual initial-loading delay remain unverified/unresolved. |
Keep scrollbar presentation in visible document coordinates instead of GTK's changing virtual-row pixel estimates. Preserve native pixel-based scrolling and held-thumb behavior, and cancel stale kinetic trajectories when the estimated range changes. Extend the smooth-input regression to verify actual thumb progress in both directions, native momentum, and keyboard endpoints. Document the early-end momentum trade-off. Refs #1749
Correcting the missed touchpad-driven scrollbar bugThe owner confirmed that the previous hit-testing/RAM work did not fix the reported scrollbar jump. The earlier tests checked visible text and held-thumb behavior, not ordinary-scroll indicator progress. That was the wrong completion signal. Reproduced the actual indicator failure: a forward-only content-wheel run showed 96 backward painted-thumb frames out of 724. GTK's frame state—not three separate accessibility property reads—confirmed it. One example moved the indicator from ~66% to ~5% while the visible text continued forward within paragraph 67. A direct GTK controller regression also failed before the fix ( Implementation: the private Important momentum trade-off: GTK's native kinetic trajectory stores an absolute pixel origin. A separate regression reproduced an old trajectory jumping backward after a range re-estimate. The preview now cancels that invalid trajectory via GTK and restores the original kinetic-scrolling setting. It does not disable all momentum or introduce another physics engine. A flick may end early when newly measured rows change the range. The regression verifies that momentum still advances a settled viewport, then checks forward gestures, release/momentum, stopping, and reverse gestures in both Rendered and Source. This behavior is documented in Rejected local prototypes exposed regressions in source/rendered thumb dragging. They were not pushed. The final implementation keeps native pixel-based thumb seeking instead of a two-frame Validation and scopeBounded scope: private virtual-document scrollbar presentation/input, with existing source/rendered selection/copy/find, media, lifecycle, keyboard, and browser/picker callers. Table infrastructure, preferences storage, build/CI, and GTK libraries are unchanged. Full local Rust/E2E suites were intentionally omitted under risk-based validation; CI remains the authoritative full gate. No test-skipping override was requested or used.
Exact local commands (the wrapper and diagnostic plugins remain ignored under bash target/preview-scroll-profile/rust-scoped.sh -- ui::virtual_preview:: ui::document_media:: ui::preview::tests::find:: ui::window::tests::keyboard_dispatch::preview_ownership::default_editing_keys_reach_a_focused_preview ui::window::tests::keyboard_dispatch::preview_ownership::tenxer_preview_owns_document_keys_until_returned ui::chooser::tests::filtered_preview::space_toggles_the_selected_search_result_in_open_and_save_choosers
bash target/preview-scroll-profile/rust-scoped.sh -- ui::virtual_preview::scrollbar:: ui::virtual_preview::tests::smooth_content_scrolling_keeps_thumb_and_hit_testing_in_document_order ui::window::tests::keyboard_dispatch::preview_ownership::default_editing_keys_reach_a_focused_preview ui::window::tests::keyboard_dispatch::preview_ownership::tenxer_preview_owns_document_keys_until_returned
STRATA_CONTAINER_ENGINE=podman ./scripts/e2e.sh tests/e2e/scenarios/test_quick_preview.py -k 'preview_find_navigates' -n 2 --junitxml=target/preview-scroll-profile/touchpad-actual-final-find-e2e.xml
STRATA_CONTAINER_ENGINE=podman ./scripts/e2e.sh tests/e2e/scenarios/test_quick_preview.py -k 'document_scrollbar_holds' -n 2 --junitxml=target/preview-scroll-profile/touchpad-final-edge-drag-e2e.xml
STRATA_CONTAINER_ENGINE=podman ./scripts/quality.sh fmt
STRATA_CONTAINER_ENGINE=podman ./scripts/quality.sh clippyPinned environment: image Desktop launch / remaining verificationThe owner explicitly requested launching the updated app on their desktop, authorizing that launch exception to normal GUI isolation. The launch was not performed: ibara's The candidate binary is available locally at |
|
Owner-requested desktop launch is now running: the updated local binary was started on the existing Wayland display with a new private D-Bus session (no automated desktop input and no interference with existing Strata windows). The application reported window presentation and its first themed frame, and loaded the three-file manual scrolling fixture folder. This is the explicitly requested desktop-launch exception only; automated validation remains pinned/headless and physical-touchpad results are still for the owner to confirm. |
GTK can re-anchor a virtual document's pixel origin without changing its range. Detect layout corrections after native kinetic updates and resynchronize GTK's next input origin when cancelling the stale trajectory. The owner confirmed the real-touchpad jump no longer reproduces. Defer intermediate rendered-row materialization and scope Settings tab label styling to avoid unrelated preview style invalidation. Keep source rows eager for stable thumb seeking. Refs #1749
Preserve both the scrollbar regression's regular-expression import and main's binary-STL fixture import. Retain both preview coverage paths. Refs #1749
|
Pushed the follow-up to this PR:
The owner confirmed that the real-touchpad candidate no longer jumps. That confirmation predates the latest-main merge; the merged runtime has not been manually retested. Temporary production debug logging was removed before committing; diagnostic scripts and captures remain ignored and are not part of the PR. Final pre-push commands, after the merge resolution: STRATA_CONTAINER_ENGINE=podman ./scripts/quality.sh fmt
STRATA_CONTAINER_ENGINE=podman ./scripts/quality.sh clippy
git diff --check origin/main...HEADAll passed. Formatting initially requested one let-else reflow before the merge; it was corrected and the checks rerun on the final merged code. The verified pinned container and existing Cargo caches were reused; no images, runtime inputs, or dependencies were rebuilt or changed for validation. Explicit owner override: after pausing automated tests and manually confirming the touchpad result, the owner answered “push” directly to the question asking whether to push without further tests while retaining formatting/Clippy. Rust and E2E reruns were therefore intentionally omitted for this push, including after the merge. Earlier scoped results are not represented as tests of the final momentum fix. Required GitHub checks still apply. Validation scope: the current follow-up extends the existing GTK kinetic guard and row-materialization paths, with the existing shared browser/picker preview and Settings action-label callers. The merge's only textual conflict was the two independently required imports; no new test behavior was invented in resolution. Remaining limits: re-anchoring can end a flick early; initial-loading speed, battery-life gains, and post-merge runtime behavior are unverified. No physical-device energy or general speedup claim is made. |
|
g2g |
GTK truncates both fractional kinetic positions and restored row anchors to integer pixels. Comparing them exactly cancels valid momentum before the viewport advances. Ignore their combined sub-two-pixel quantization while retaining cancellation for stale pixel-origin jumps. Refs #1749
|
Fixed the shard-2 failure in db64a82. Cause: Scoped validation: this changes only the private virtual-preview momentum guard shared by rendered/source document previews in browsers and pickers. No preferences, dependencies, toolkit patches, or harness/workflow code changed. Existing coverage owns this regression; no parallel smoke test was added. Using the verified pinned Podman base
Full Rust and E2E suites intentionally not rerun for this bounded correction; CI remains authoritative. No desktop/manual touchpad retest performed. No owner override was used for this follow-up. The build/lint job was already green on the previous run; the aggregate failure came from shard 2. |
ReviewMerged Checked
Non-blocking notes
Local verification (scoped,
I didn't run the full local Rust/E2E suites: the merged |
* test!: remove the Python E2E suite and the QA twin metadata QA scenarios are now the only GUI suite. The Python suite under tests/e2e, its runners, diagnostics, sharding and mutation scripts, and the E2E and E2E cache workflows are gone. The QA job in ci.yml runs only when CI is started by hand, and a failing scenario fails that run. - Move the image recipe to tests/container/ and drop the pytest venv; the image key changes, so the base is rebuilt once and republished by the trusted-main publisher. - Move the headless display, environment, process and XTest helpers that test-headless.py and benchmark-scroll.py use to scripts/headless/. - Move baselines, fixtures and mutation patches under tests/qa/, and let STRATA_QA_UPDATE_BASELINES=1 regenerate a baseline. - Drop twin, state_parity_ignore and input_parity_ignore from every scenario and from the runner, drop the test_ prefix from scenario folders, and replace qa-parity with qa-mutation.sh, which checks that each scenario with a mutation passes unmodified and fails under its patch. - $python is now the image's absolute /usr/bin/python3, as a file provider's manifest command must be. - Rename docs/e2e-testing.md to docs/testing.md and update AGENTS.md, the docs and the QA skills. - Drop the held-document-scrollbar E2E test from #1752 and its mutation patch rather than convert it: three GTK tests in src/ui/virtual_preview/scrollbar/tests.rs already fail under that patch. BREAKING CHANGE: scripts/e2e.sh, e2e-native.sh and qa-parity.sh are removed; scenario headers reject twin and the parity ignore keys. * test(qa): prune the lowest-value third of the QA scenarios Remove the 134 scenarios with the lowest quality score per square root of their measured cost, which favours removing long-running, low-scoring scenarios. Scenarios with a mutation patch and the visual baselines were kept. The suite keeps 269 scenarios and 512 runs; a full run drops from about 106 s to 41 s. Quality notes in the remaining headers still describe coverage as it was before this removal. * test(qa): rebuild the 20 highest-scoring pruned scenarios as short runs Each was dropped for its run time, not its value. Rewrite each as one or two runs that keep the behaviour its quality note names: one view where the views share the code path, several cases in one launch instead of a launch per case, fixtures set up before launch, and keyboard or activate steps where the pointer is not under test. Together they took about 645 s of CI time over 172 runs and now take about 55 s over 23 runs. Each rewrite was run at least three times, shown to fail at a broken expected value, and re-rated with the qa-quality rubric; none has a measured cost yet. * test(qa): trace Strata's UI thread through the QA runner #1729 added scripts/trace-main-io.py on top of the Python E2E harness, which this branch removes. With STRATA_QA_MAIN_IO set, the QA runner now starts every Strata launch of a run under strace, tracing only the initial thread: the application, its restarts, the portal backend and the second instances launch steps start. Each launch leaves the trace, its log and the meta.json the script classifies paths by under target/main-io/<run>/<scenario>__<label>/launch-<n>/. Its startup phase ends at the first reply that shows a pane, once the first window or the portal backend's first chooser is up. The runner's own places (the shared shader cache, the launch's logs and the PATH folders) are listed in meta.json and count as toolkit. QA mode's own disk reads, for pref and file predicates, now run on a helper thread, and --qa no longer checks its directory before launch, so an audit sees only calls a release build would make. proc steps now ask about the traced Strata rather than strace. qa.sh forwards STRATA_QA_MAIN_IO and STRATA_UI_STALL_MS, and the runner passes the stall limit to every launch. The script runs qa.sh with its other arguments, and the allowlist moves to tests/qa/. * test(qa): check that a launch leaves the folder it started in #1729 made Strata change its working folder to / once it has read its arguments, so a launch folder on a removable drive or share stays unmountable, and asserted it in the Python startup-argument test. Add a proc app_cwd query and check it at the end of multiple-arguments-non-utf8. * ci: install git for the script tests in the Arch packaging job scripts/test_qa_mutation.py applies its patches with git, which the archlinux:base-devel image lacks. * test(qa): drop the repeat double-clicks from the archive activation scenario archive-double-click-extracts-subfolder was skipped for #1772: a repeat double-click within about a second of an extraction that selects the new folder is lost. That needs input faster than real use produces, and archive-activation-extracts-subfolder already covers repeat extractions into fresh folders through Return and Extract here. Keep the first double-click, which bundles a multi-root zip or tar.gz into a subfolder and selects it in Columns, and run it again. * build!: rename the E2E image tooling for the QA suite The pinned image now serves only the QA scenarios and the Rust quality runs, so its tooling no longer carries the removed suite's name. - Rename scripts/e2e_{bundle,base,images}.py to scripts/image_{inputs,base,registry}.py, e2e-images.yml to test-image.yml, STRATA_E2E_* to STRATA_TEST_*, target/e2e-container to target/qa-container, and the GHCR package, labels, container user and in-image paths to their test-image names. - Stop publishing the runtime image and drop the registry cache discovery; only the removed E2E jobs consumed them. The publisher's anonymous check now verifies the build tag and the base. - Point the links and doc comments that still named docs/e2e-testing.md at docs/testing.md, delete the stale evidence for #928, and drop the pytest ignore and the unused GTK version variable. BREAKING CHANGE: scripts/e2e_base.py, STRATA_E2E_IMAGE and STRATA_E2E_CARGO_CACHE are renamed, and the published base moves to ghcr.io/lgse/strata-test-image, which must be made public after its first publication. * docs(qa): keep one catalogue of the QA protocol docs/testing.md and the qa-scenarios skill's reference.md both listed every step, target and predicate, and the copies had drifted: testing.md said the pane predicate reads the focused pane, and placed the area repainted ignores at the box's centre. Many of its rows also explained behaviour through the removed Python harness. - Make reference.md the only catalogue. Move into it what only testing.md had: input timing, target resolution, share rounding, the labelled-by naming rules, the semantics of repainted, accent_pixels, largest_image, compare and each NAMES key, the snapshot keys, the input log format, and the harness-error rule. - Replace testing.md's tables, snapshot and input-log sections with a short overview that links to the reference, and drop the Python comparisons from the timer-waits list. - Point the qa-scenarios skill, CONTRIBUTING.md and the src/qa doc comments at the reference, and tell runner changes to recheck the main-thread I/O audit. * docs(qa): fix stale suite references and catalogue gaps The pr-review skill merged from main still named the E2E suite and qa-parity; the qa.sh example run label columns-ru does not exist for arrow-keys-move-focus; the qa-scenarios skill named a section that docs/testing.md renamed; and the protocol catalogue lacked the selectable and editable states, the field-within target, and the count spec's rendered and states options. * refactor(scripts): drop the unused sys import from image_registry * test(qa): drop dead header data and name the pin-order scenario after its check Eleven scenarios kept a case variable that only the removed twin ids read, wildcard-filter-patterns remembered a field no step used, and folder-pins-order-and-restart no longer restarts: it verifies the bookmarks file instead. --------- Co-authored-by: Pierre Berube <[email protected]>
* test!: remove the Python E2E suite and the QA twin metadata QA scenarios are now the only GUI suite. The Python suite under tests/e2e, its runners, diagnostics, sharding and mutation scripts, and the E2E and E2E cache workflows are gone. The QA job in ci.yml runs only when CI is started by hand, and a failing scenario fails that run. - Move the image recipe to tests/container/ and drop the pytest venv; the image key changes, so the base is rebuilt once and republished by the trusted-main publisher. - Move the headless display, environment, process and XTest helpers that test-headless.py and benchmark-scroll.py use to scripts/headless/. - Move baselines, fixtures and mutation patches under tests/qa/, and let STRATA_QA_UPDATE_BASELINES=1 regenerate a baseline. - Drop twin, state_parity_ignore and input_parity_ignore from every scenario and from the runner, drop the test_ prefix from scenario folders, and replace qa-parity with qa-mutation.sh, which checks that each scenario with a mutation passes unmodified and fails under its patch. - $python is now the image's absolute /usr/bin/python3, as a file provider's manifest command must be. - Rename docs/e2e-testing.md to docs/testing.md and update AGENTS.md, the docs and the QA skills. - Drop the held-document-scrollbar E2E test from #1752 and its mutation patch rather than convert it: three GTK tests in src/ui/virtual_preview/scrollbar/tests.rs already fail under that patch. BREAKING CHANGE: scripts/e2e.sh, e2e-native.sh and qa-parity.sh are removed; scenario headers reject twin and the parity ignore keys. * test(qa): prune the lowest-value third of the QA scenarios Remove the 134 scenarios with the lowest quality score per square root of their measured cost, which favours removing long-running, low-scoring scenarios. Scenarios with a mutation patch and the visual baselines were kept. The suite keeps 269 scenarios and 512 runs; a full run drops from about 106 s to 41 s. Quality notes in the remaining headers still describe coverage as it was before this removal. * test(qa): rebuild the 20 highest-scoring pruned scenarios as short runs Each was dropped for its run time, not its value. Rewrite each as one or two runs that keep the behaviour its quality note names: one view where the views share the code path, several cases in one launch instead of a launch per case, fixtures set up before launch, and keyboard or activate steps where the pointer is not under test. Together they took about 645 s of CI time over 172 runs and now take about 55 s over 23 runs. Each rewrite was run at least three times, shown to fail at a broken expected value, and re-rated with the qa-quality rubric; none has a measured cost yet. * test(qa): trace Strata's UI thread through the QA runner #1729 added scripts/trace-main-io.py on top of the Python E2E harness, which this branch removes. With STRATA_QA_MAIN_IO set, the QA runner now starts every Strata launch of a run under strace, tracing only the initial thread: the application, its restarts, the portal backend and the second instances launch steps start. Each launch leaves the trace, its log and the meta.json the script classifies paths by under target/main-io/<run>/<scenario>__<label>/launch-<n>/. Its startup phase ends at the first reply that shows a pane, once the first window or the portal backend's first chooser is up. The runner's own places (the shared shader cache, the launch's logs and the PATH folders) are listed in meta.json and count as toolkit. QA mode's own disk reads, for pref and file predicates, now run on a helper thread, and --qa no longer checks its directory before launch, so an audit sees only calls a release build would make. proc steps now ask about the traced Strata rather than strace. qa.sh forwards STRATA_QA_MAIN_IO and STRATA_UI_STALL_MS, and the runner passes the stall limit to every launch. The script runs qa.sh with its other arguments, and the allowlist moves to tests/qa/. * test(qa): check that a launch leaves the folder it started in #1729 made Strata change its working folder to / once it has read its arguments, so a launch folder on a removable drive or share stays unmountable, and asserted it in the Python startup-argument test. Add a proc app_cwd query and check it at the end of multiple-arguments-non-utf8. * ci: install git for the script tests in the Arch packaging job scripts/test_qa_mutation.py applies its patches with git, which the archlinux:base-devel image lacks. * test(qa): drop the repeat double-clicks from the archive activation scenario archive-double-click-extracts-subfolder was skipped for #1772: a repeat double-click within about a second of an extraction that selects the new folder is lost. That needs input faster than real use produces, and archive-activation-extracts-subfolder already covers repeat extractions into fresh folders through Return and Extract here. Keep the first double-click, which bundles a multi-root zip or tar.gz into a subfolder and selects it in Columns, and run it again. * build!: rename the E2E image tooling for the QA suite The pinned image now serves only the QA scenarios and the Rust quality runs, so its tooling no longer carries the removed suite's name. - Rename scripts/e2e_{bundle,base,images}.py to scripts/image_{inputs,base,registry}.py, e2e-images.yml to test-image.yml, STRATA_E2E_* to STRATA_TEST_*, target/e2e-container to target/qa-container, and the GHCR package, labels, container user and in-image paths to their test-image names. - Stop publishing the runtime image and drop the registry cache discovery; only the removed E2E jobs consumed them. The publisher's anonymous check now verifies the build tag and the base. - Point the links and doc comments that still named docs/e2e-testing.md at docs/testing.md, delete the stale evidence for #928, and drop the pytest ignore and the unused GTK version variable. BREAKING CHANGE: scripts/e2e_base.py, STRATA_E2E_IMAGE and STRATA_E2E_CARGO_CACHE are renamed, and the published base moves to ghcr.io/lgse/strata-test-image, which must be made public after its first publication. * docs(qa): keep one catalogue of the QA protocol docs/testing.md and the qa-scenarios skill's reference.md both listed every step, target and predicate, and the copies had drifted: testing.md said the pane predicate reads the focused pane, and placed the area repainted ignores at the box's centre. Many of its rows also explained behaviour through the removed Python harness. - Make reference.md the only catalogue. Move into it what only testing.md had: input timing, target resolution, share rounding, the labelled-by naming rules, the semantics of repainted, accent_pixels, largest_image, compare and each NAMES key, the snapshot keys, the input log format, and the harness-error rule. - Replace testing.md's tables, snapshot and input-log sections with a short overview that links to the reference, and drop the Python comparisons from the timer-waits list. - Point the qa-scenarios skill, CONTRIBUTING.md and the src/qa doc comments at the reference, and tell runner changes to recheck the main-thread I/O audit. * docs(qa): fix stale suite references and catalogue gaps The pr-review skill merged from main still named the E2E suite and qa-parity; the qa.sh example run label columns-ru does not exist for arrow-keys-move-focus; the qa-scenarios skill named a section that docs/testing.md renamed; and the protocol catalogue lacked the selectable and editable states, the field-within target, and the count spec's rendered and states options. * refactor(scripts): drop the unused sys import from image_registry * test(qa): drop dead header data and name the pin-order scenario after its check Eleven scenarios kept a case variable that only the removed twin ids read, wildcard-filter-patterns remembered a field no step used, and folder-pins-order-and-restart no longer restarts: it verifies the bookmarks file instead. --------- Co-authored-by: Pierre Berube <[email protected]>
Sync lgse/strata#1752–#1776: density sliders, preview scrollbar, chooser save names
Description
Fix scrollbar jumps during thumb drags and touchpad/content scrolling while retaining GTK's native input handling and virtualization. The indicator follows document positions rather than changing pixel-height estimates. Cancel stale momentum when GTK changes either the estimated range or the pixel origin, then synchronize GTK's next input origin. A flick may end early when newly measured rows invalidate its trajectory.
Defer intermediate/prefetched rendered-row construction and qualify Settings tab-label CSS to avoid unrelated preview style invalidation. Keep Source binding eager for thumb seeking. Retain the earlier shared hit-testing, source-memory, and event-driven table improvements. Browser and picker document previews share the component; file/folder-list scrolling is unchanged.
Ignore GTK's integer quantization when detecting pixel-origin corrections so valid native momentum remains active. The owner confirmed that the real-touchpad candidate no longer jumped before the latest
mainmerge; the merged result has not been manually retested. Initial-loading speed and actual battery-life improvements remain unverified.Visual evidence
N/A. The thumb no longer jumps to stale positions during touchpad momentum. No intentional content-layout change.
How to test
Expected result: Content and scrollbar follow input direction without stale-momentum jumps; thumb dragging and existing preview actions remain usable.
Related issue
Refs #1749.