Skip to content

fix: prefetch table windows and reuse result projections - #122

Merged
tiensonqin merged 5 commits into
mainfrom
devin/1793512726-table-scroll-prefetch
Nov 1, 2026
Merged

tiensonqin merged 5 commits into
mainfrom
devin/1793512726-table-scroll-prefetch

Conversation

@tiensonqin

@tiensonqin tiensonqin commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Keep scrolling ahead of deferred result rendering: prefetch up to 64 rows while retaining the 12-row initial snapshot. Mount only the native viewport plus two rows on either side, independently of the cached data window. Display an in-flight reply when it improves current viewport coverage, even if the exact prefetch key moved; preserve graph/generation/input/revision isolation. Experimental whole-viewport column overscan was withdrawn after real iOS recordings exposed excess remount work.

Reuse scope, filtering/sorting and column projections in a bounded session-local cache. Invalidate by immutable database identity and local journal day: independent graph projections may share a transaction number, and relative-date queries can change overnight without graph edits. Window reads still encode only requested rows.

Validation:

  • Core gate: dune build @shared/native/runtest — 1250 tests passed. Focused paging/result-view tests, Android JNI/packaging checks, and Android unit/lint checks passed. The overlapping-response regression fails before the fix and passes afterward.
  • CI follow-up changes only the existing iOS capture flow's drawer-closing action to its visible sidebar toggle. All draft/send/edit assertions remain intact; production sources are unchanged after 12307830.
  • Real iOS Release baseline: 1000-row Table, identical fast inputs, 1.84–1.89s full-body blanking during inertia. This is not an independently established one-second post-stop timer.
  • Current 12307830 Android profile/x86_64: unchanged 302×9 Table, original viewport and 180ms inputs; no full-body scrolling blank, missing-row region, or newly blank whole column observed. Installed APK/core hashes match the build. Separate cold-open residual: the bottom visible row appears after 7 raw frames, approximately 117ms; horizontal updates remain discrete.
  • Current 12307830 iOS Release: three vertical/horizontal pairs and a separate historical R2 replay with the pre-input Row965/Field5–7 viewport matched within 1px. Raw-sample review reported no full-body blank or contiguous missing-row band. Final horizontal smoothness is not established: desktop capture has 150–183ms sampling gaps around H1; these must not be counted as confirmed app stalls or a pass. The approximately matched 300-row case is not a pixel-identical historical replay.

Current Android Table after consecutive fast flings

Remaining limitations: simulator/emulator evidence, no physical-device claim, no exhaustive row/column boundary coverage, and no independent touch-release/post-stop timing measurement.

CI follow-up

At a448f3bd, Vendor duniverse, ocaml-core, and WIP passed. Both E2E jobs failed before running the smoke flow:

  • Android: installing the API 34 emulator system image exhausted the runner disk (No space left on device).
  • iOS: the cold native build could not read _build/install/mobile_host/lib/ppxlib/ast/ast.ml.

The iOS selector follow-up has therefore not yet been exercised by CI. These latest failures have not been dismissed as flaky or pre-existing. Re-running the failed jobs was rejected with Resource not accessible by integration; rerun and further investigation remain outstanding.

Link to Devin session: https://app.devin.ai/sessions/f2fb979c38d945a9a836b086a5132f95
Open in Devin Desktop: https://app.devin.ai/desktop/session/f2fb979c38d945a9a836b086a5132f95?variant=devin
Requested by: @tiensonqin


Devin Review

@devin-ai-integration

Copy link
Copy Markdown

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin resolved the finding on a448f3b

Fixed by Devin (1)

  • Date-relative query windows stay stale overnight

View all findings in Devin Review

Devin Review

@tiensonqin
tiensonqin merged commit 8828707 into main Nov 1, 2026
3 of 5 checks passed
@tiensonqin
tiensonqin deleted the devin/1793512726-table-scroll-prefetch branch November 3, 2026 08:24
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