Files slow second click does not enter rename in production e2e #961

Open
opened 2026-10-02 23:28:39 +00:00 by kayg · 1 comment
Owner

Merge-round-7a (#427), round 4 focused repeat: initial uploads and text-card/PDF WebP readiness passed. Desktop Mac keyboard flow, pin/reorder/unpin and breadcrumb navigation/drop checks also passed. Files then stopped at checkListingGetCoalescing: a slow second click on alpha.txt did not show the Rename alpha.txt textbox within the unchanged 30-second wait (files.mjs:1453). The complete flow did not reach its committed rename and Recent assertions.

The log includes database checkout waits up to 20.452636918 seconds and CSP REPORTS files: 0 across 15 pages. This timeout has not been isolated enough to call it only host load. Keep the existing slow-click expectation and request-count assertion. Diagnose selection/click state on a real production build and retain a focused regression for any fix. A separate focused upload -> committed rename -> Recent mode will establish that requested flow independently; it must not be represented as a full Files e2e pass.

Merge-round-7a (#427), round 4 focused repeat: initial uploads and text-card/PDF WebP readiness passed. Desktop Mac keyboard flow, pin/reorder/unpin and breadcrumb navigation/drop checks also passed. Files then stopped at checkListingGetCoalescing: a slow second click on alpha.txt did not show the Rename alpha.txt textbox within the unchanged 30-second wait (files.mjs:1453). The complete flow did not reach its committed rename and Recent assertions. The log includes database checkout waits up to 20.452636918 seconds and `CSP REPORTS files: 0 across 15 pages`. This timeout has not been isolated enough to call it only host load. Keep the existing slow-click expectation and request-count assertion. Diagnose selection/click state on a real production build and retain a focused regression for any fix. A separate focused upload -> committed rename -> Recent mode will establish that requested flow independently; it must not be represented as a full Files e2e pass.
Author
Owner

Fix: 7ba6773c6 on job/fix-7a-product. Not merged, not pushed.

Root cause: FileCollection.svelte accepted the slow second click only within 250–1500 ms of the first, measured with event timestamps. The e2e waits 1100 ms and then lets Playwright click, which runs actionability checks first. On the loaded host the gap went past 1500 ms. The click was then treated as a new first click, and rename never started. Finder and Explorer (the #466 reference) have no upper limit for a slow click on the name of a selected item.

Fix (shared Files row component, packages/ui): removed the upper limit. To keep a later double-click on the open path, the rename now starts after a 500 ms settle time. A further click (detail 2), a double-click/open, or a selection change cancels it. The timer is cleared on destroy. Keyboard rename (F2/Enter) does not change.

Tests:

  • Vitest apps/web/src/lib/files/FileCollection.svelte.test.ts: "starts rename after a slow second name click, however long the gap" (4 s gap; fails on the old component) and "keeps a later double-click on the open path".
  • e2e files.mjs checkListingGetCoalescing: the last gap before the slow click is now 2500 ms (past the old window). The expectation and the request-count assertion are unchanged.

Results: bun run check → 0 ERRORS 0 WARNINGS; focused Vitest 7 passed; bun apps/web/e2e/files.mjs --requests-only (rebuilt server, production SPA) → FILES REQUEST COALESCING E2E PASSED. The full files.mjs passed every step through PASS keyboard selection and Quick Look, PASS rename and PASS keyboard copy, paste and move. It then stopped at the Recent type-to-select assertion (files.mjs:1799). That is not related to click handling and is filed as #964. No full Files e2e pass is claimed.

Fix: 7ba6773c6 on `job/fix-7a-product`. Not merged, not pushed. Root cause: `FileCollection.svelte` accepted the slow second click only within 250–1500 ms of the first, measured with event timestamps. The e2e waits 1100 ms and then lets Playwright click, which runs actionability checks first. On the loaded host the gap went past 1500 ms. The click was then treated as a new first click, and rename never started. Finder and Explorer (the #466 reference) have no upper limit for a slow click on the name of a selected item. Fix (shared Files row component, packages/ui): removed the upper limit. To keep a later double-click on the open path, the rename now starts after a 500 ms settle time. A further click (detail 2), a double-click/open, or a selection change cancels it. The timer is cleared on destroy. Keyboard rename (F2/Enter) does not change. Tests: - Vitest `apps/web/src/lib/files/FileCollection.svelte.test.ts`: "starts rename after a slow second name click, however long the gap" (4 s gap; fails on the old component) and "keeps a later double-click on the open path". - e2e `files.mjs` checkListingGetCoalescing: the last gap before the slow click is now 2500 ms (past the old window). The expectation and the request-count assertion are unchanged. Results: `bun run check` → `0 ERRORS 0 WARNINGS`; focused Vitest `7 passed`; `bun apps/web/e2e/files.mjs --requests-only` (rebuilt server, production SPA) → `FILES REQUEST COALESCING E2E PASSED`. The full `files.mjs` passed every step through `PASS keyboard selection and Quick Look`, `PASS rename` and `PASS keyboard copy, paste and move`. It then stopped at the Recent type-to-select assertion (files.mjs:1799). That is not related to click handling and is filed as #964. No full Files e2e pass is claimed.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#961
No description provided.