UNIT TEST TRANSCRIPT — mobile file-link crash takeover #24620 Final head: 797798df38cd2180d0cf93c498982ed625243407 Worktree: /home/ubuntu/wt/pr-24620 Command (apps/mobile): vp test run src/features/files/source-file-scroll.test.ts --reporter=verbose Scope and interpretation: The wrapped-file scenario targets line 900 (zero-based index 899) of 1,203 lines. The mock models VirtualizedList measurement failures and averaged estimates. The final test verifies no invariant throw, an initial estimated jump near the unmeasured target, then the correct offset after target rows measure. Recovery is bounded: the never-measured target test drains timers and checks a bounded call count. Other tests cover measured lines, out-of-range lines, shrinking content, cancellation, and dragging before the first frame. Historical evidence (supplied transcripts, not rerun during this capture): - Bare-main scrollToIndex stub: 4 failed / 1 passed. An earlier attempt in the same original transcript failed to import the absent helper and ran no tests; it is retained verbatim and is separate from the 4/1 behavioral result. - Old rebuild helper bb41f2e4aa against final tests: 2 failed / 4 passed; incorrect wrapped target offset and uncancelled initial-frame jump. - Final head, fresh focused run: 6 passed / 0 failed, exit 0. The earlier check:changed success is reported only by the supplied historical transcript; this evidence capture reran the focused suite only. Limitations: These are unit tests with a mocked list and fake timers, not actual device UI. Mobile UI on device remains UNVERIFIED because the allowed transcript fallback avoids tools tied to live userdata. No browser, device panel, agent-device, or adb was used. No ~/.t3/userdata reads, copies, or writes were performed. No code mutations, commits, forge writes, PR creation, or subdelegation occurred. Privacy review: all included transcripts were read and inspected. Content is limited to test output, public source identifiers, and workspace paths; no credentials, secrets, customer data, or private conversation data were found. === ev-24620-tests-before.txt (full original content) === note: You are running `vp test` as a Vite+ built-in command. If you meant to run the test npm script, use `vpr test` instead. RUN v5.0.5 /home/ubuntu/wt/pr-24620/apps/mobile ❯ |unit| src/features/files/source-file-scroll.test.ts (0 test) ⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯ FAIL |unit| src/features/files/source-file-scroll.test.ts [ src/features/files/source-file-scroll.test.ts ] Error: Cannot find module './source-file-scroll' imported from /home/ubuntu/wt/pr-24620/apps/mobile/src/features/files/source-file-scroll.test.ts ❯ reviveInvokeError ../../node_modules/.pnpm/@voidzero-dev+vite-plus-core@1.4.0_@tsc-rs+typescript@0.8.0_@types+node@24.12.4_@volar+_3d720056de102039ed5ab677ff8164f8/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/module-runner.js:546:14 ❯ Object.invoke ../../node_modules/.pnpm/@voidzero-dev+vite-plus-core@1.4.0_@tsc-rs+typescript@0.8.0_@types+node@24.12.4_@volar+_3d720056de102039ed5ab677ff8164f8/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/module-runner.js:562:33 ❯ VitestModuleRunner.getModuleInformation ../../node_modules/.pnpm/@voidzero-dev+vite-plus-core@1.4.0_@tsc-rs+typescript@0.8.0_@types+node@24.12.4_@volar+_3d720056de102039ed5ab677ff8164f8/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/module-runner.js:1202:7 ❯ request ../../node_modules/.pnpm/@voidzero-dev+vite-plus-core@1.4.0_@tsc-rs+typescript@0.8.0_@types+node@24.12.4_@volar+_3d720056de102039ed5ab677ff8164f8/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/module-runner.js:1219:83 ❯ src/features/files/source-file-scroll.test.ts:3:1 1| import { expect, it, vi } from "vite-plus/test"; 2| 3| import { createSourceLineScroll } from "./source-file-scroll"; | ^ 4| 5| const ROW_HEIGHT = 24; ❯ VitestModuleRunner.directRequest ../../node_modules/.pnpm/@voidzero-dev+vite-plus-core@1.4.0_@tsc-rs+typescript@0.8.0_@types+node@24.12.4_@volar+_3d720056de102039ed5ab677ff8164f8/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/module-runner.js:1262:59 ❯ VitestModuleRunner.cachedRequest ../../node_modules/.pnpm/@voidzero-dev+vite-plus-core@1.4.0_@tsc-rs+typescript@0.8.0_@types+node@24.12.4_@volar+_3d720056de102039ed5ab677ff8164f8/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/module-runner.js:1169:73 ❯ VitestModuleRunner.import ../../node_modules/.pnpm/@voidzero-dev+vite-plus-core@1.4.0_@tsc-rs+typescript@0.8.0_@types+node@24.12.4_@volar+_3d720056de102039ed5ab677ff8164f8/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/module-runner.js:1124:10 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯ Test Files 1 failed (1) Tests no tests Start at 23:50:50 Duration 286ms (setup 61%, transform 36%, worker 3%) exit=1 === Run 2: stub mirroring main's bare scrollToIndex (no recovery) === × jumps near an unmeasured wrapped line, then lands on it once rows measure 6ms × stops retrying when the target never measures 2ms × ignores a line outside the document 1ms × drops a pending retry when the document shrinks or the jump is cancelled 1ms ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 4 ⎯⎯⎯⎯⎯⎯⎯ FAIL |unit| src/features/files/source-file-scroll.test.ts > jumps near an unmeasured wrapped line, then lands on it once rows measure AssertionError: expected [Function] to not throw an error but 'Error: scrollToIndex should be used i…' was thrown "Error: scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed" FAIL |unit| src/features/files/source-file-scroll.test.ts > stops retrying when the target never measures Error: scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed FAIL |unit| src/features/files/source-file-scroll.test.ts > ignores a line outside the document AssertionError: expected [Function] to not throw an error but 'Error: scrollToIndex out of range: re…' was thrown "Error: scrollToIndex out of range: requested index 899" FAIL |unit| src/features/files/source-file-scroll.test.ts > drops a pending retry when the document shrinks or the jump is cancelled Error: scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed Tests 4 failed | 1 passed (5) exit=1 === ev-24620-review-fix.txt (full original content) === === BEFORE FIX: final tests vs bb41f2e4aa helper === × jumps near an unmeasured wrapped line, then lands on it once rows measure 9ms × a drag before the first frame cancels the jump 3ms ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 2 ⎯⎯⎯⎯⎯⎯⎯ AssertionError: expected 43152 to be 60888 // Object.is equality AssertionError: expected "vi.fn()" to not be called at all, but actually been called 1 times Tests 2 failed | 4 passed (6) === AFTER FIX === ✓ |unit| src/features/files/source-file-scroll.test.ts > lands on an already measured line 7ms ✓ |unit| src/features/files/source-file-scroll.test.ts > jumps near an unmeasured wrapped line, then lands on it once rows measure 4ms ✓ |unit| src/features/files/source-file-scroll.test.ts > stops retrying when the target never measures 1ms ✓ |unit| src/features/files/source-file-scroll.test.ts > ignores a line outside the document 1ms ✓ |unit| src/features/files/source-file-scroll.test.ts > drops a pending jump when the document shrinks or the jump is cancelled 2ms ✓ |unit| src/features/files/source-file-scroll.test.ts > a drag before the first frame cancels the jump 1ms Tests 6 passed (6) === vp run check:changed: format/lint/knip/typecheck/test all pass === === final-focused-tests.txt (full original content) === note: You are running `vp test` as a Vite+ built-in command. If you meant to run the test npm script, use `vpr test` instead. RUN v5.0.5 /home/ubuntu/wt/pr-24620/apps/mobile ✓ |unit| src/features/files/source-file-scroll.test.ts > lands on an already measured line 8ms ✓ |unit| src/features/files/source-file-scroll.test.ts > jumps near an unmeasured wrapped line, then lands on it once rows measure 4ms ✓ |unit| src/features/files/source-file-scroll.test.ts > stops retrying when the target never measures 1ms ✓ |unit| src/features/files/source-file-scroll.test.ts > ignores a line outside the document 1ms ✓ |unit| src/features/files/source-file-scroll.test.ts > drops a pending jump when the document shrinks or the jump is cancelled 2ms ✓ |unit| src/features/files/source-file-scroll.test.ts > a drag before the first frame cancels the jump 1ms Test Files 1 passed (1) Tests 6 passed (6) Start at 00:05:59 Duration 289ms (setup 68%, tests 13%, transform 9%, import 6%, worker 4%) exit=0