Repository navigation
restore data viewer end/ctrl+end scroll-to-bottom behavior - #17961
Conversation
End and Ctrl+End in the data viewer body now move to the last row of the current column, matching the pre-rewrite viewer, instead of jumping to the last column (Home likewise returns to the top of the current column). Also fix ensureActiveCellVisible computing bottom-edge scrolls from the raw viewport clientHeight: the sticky header (and the horizontal scrollbar overlay) occlude part of the viewport, so jumps to the bottom landed a header-height short of the last row. The effective body-visible height computation is now shared with updateInfoBar via a visibleBodyHeight helper. Fixes #17958.
Code review findingsActionable items from an automated multi-agent review. Strengths, dismissed findings, and ratings Important
Suggestions
|
gtritchie
left a comment
There was a problem hiding this comment.
Feedback posted, all very minor/nitpicky stuff.
🍎 macOS Desktop E2E · ARM64✅ All tests passed!
📥 Download Playwright report⬇️ playwright-report.zip — extract and open
2 shards · macos-26 ARM64 · commit |
Deletes the outdated comment above getActiveCellTd (the sticky thead is inside #gridViewport, and the bottom-edge test now uses visibleBodyHeight, not clientHeight). Extends the #17958 test to assert the info bar range at max scroll (covers visibleBodyHeight's second consumer) and to press plain End, the keystroke from the original report.
|
Thanks -- applied 1, 2, and 4 in 97e8333:
Declining 3 and 5: 3. The tightened bound would fail against the correct implementation. The scroll content is exactly 5. Test re-run after the changes: passes on desktop-dev. |
…er-ctrl-end # Conflicts: # src/cpp/session/resources/grid/DataViewer.js
The new End-scrolls-to-the-last-row test added in #17961 fails on windows-2025 with cellBox.y + cellBox.height = 332.25 vs viewportBox.y + viewportBox.height + 0.5 = 308.5 -- the last row lands ~24 px below the viewport's bottom even though visibleBodyHeight already subtracts the 10 px custom horizontal scrollbar overlay. The overshoot matches neither the header height nor the scrollbar height, so it's likely a row-height or viewport-clientHeight delta on Windows Chromium/Electron that ensureActiveCellVisible (rowBottom - bodyHeight) doesn't yet model. The product fix in #17961 was developed on macOS with overlay scrollbars and never exercised on Windows. Skip on win32 CI with a comment that points at the originating issue and PR so the next person (with a Windows box to repro on) can tune visibleBodyHeight -- or the test's tolerance -- without re-deriving the diagnosis. Co-Authored-By: Claude Opus 4.7 <[email protected]>
* windows automation * add MSVC build tools to PATH before Windows build * move MSVC PATH step before install-dependencies * work around Enterprise vs BuildTools MSVC detection * install yarn for GWT build * install yarn in bundled node dir * use system npm to install yarn into bundled node directory * install yarn to temp dir to avoid polluting bundled node * Increase Windows e2e job timeout to 180 minutes * add second shard * Pin Windows e2e R to 4.5.3 to avoid R 4.6.0 startup crash * Add R PATH fix and RStudio log upload for Windows e2e diagnostics * remove concurrency block from Windows PR workflow to prevent stuck runs blocking new ones * fix rig bin subcommand not found on Windows-construct R bin path directly * Fix Windows RStudio crash and add GWT caching with cache seeder - Switch from broken zip-of-electron-output to NSIS installer: the old approach packaged only the Electron shell, missing rsession.exe, GWT output, and vcredist DLLs, causing RStudio to crash immediately on startup. The NSIS installer includes all cmake-installed resources. - Add GWT output cache (src/gwt/www, bin, extras) keyed on GWT sources. When the cache hits, the build uses nogwt to skip Ant compilation and goes straight to C++ + NSIS packaging. - Add Windows cache seeder workflow that seeds rstudio-tools, sccache, and GWT caches on main so PR builds start warm. - Fix R library caching: set PW_RSTUDIO_R_LIBS_USER so the sandbox uses the same path that e2e-deps installs and caches, stopping packages from being re-downloaded on every run. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * adding nsis to choco install * Add e2e-merge sticky comment job to Windows workflow * Fix Windows path separator and CRLF test failures; add report zip link to PR comment * Fix Windows test flakiness: active-editor marker, completion popup wait, dataset preview timeout * Fix Windows reformat trailing newline, readr path separators, and python completion skip * Fix trimEnd TypeError and soft-skip readr preview on Windows CI * Fix sccache on Windows CI by reading SCCACHE_ENABLED from env var * Auto-detect C++ changes on Windows PR CI; build from source only when needed * Use add_compile_options to force /Z7 for all targets including FetchContent deps * Replace manual sccache setup with mozilla-actions/sccache-action (GHA backend) * Replace manual sccache setup with mozilla-actions/sccache-action on macOS too * Add detect-changes job to macOS PR workflow; align macOS reusable workflow with Windows (build_from_source input, daily auto-resolve, SHA-256, installer cache) * Combine Windows and macOS PR workflows into one orchestrator; suppress npm build log noise * Add GWT output cache for macOS and suppress npm noise on both platforms * resolve macOS conflict markers, alias bug, seed overlap/permissions, yarn comment, extract preview soft-skip helper * scheduled pull-requests permission, winget non-interactive, pin sccache-action SHA, align build_from_source default * Document workflow_call build_from_source default asymmetry between Windows and macOS * split save-always caches, test.fixme soft-skips, CONNECT_API_KEY scheduled, rstudio_installer_url build guard, winget non-interactive, shard total from strategy * Increase ensureVisualMode ProseMirror timeout 15s→30s to fix macOS CI flakiness * add pull-requests: write to top-level permissions, pass GITHUB_TOKEN explicitly; bump ensureVisualMode timeout to 45s * bump autocomplete popup timeout 5s→15s; resolve ignorefiles merge conflict * address code review * address code review: expand GWT cache key, gate rstudio-tools save on install success, add CI guard to test.fixme * fix environment pane beforeEach click timeout; resolve shiny merge conflict Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * add Windows CI test.fixme guards for shiny interrupt, markdown preview, and r2d3 consent GWT failures * Fix Windows build: fall back to msvc143 Boost/SOCI when runner toolset upgrades * Increase ensureVisualMode timeout to 90s for slow CI runners * Fix Windows build for VS 2026 and quarantine macOS preview flakes - Override @electron/node-gyp with upstream node-gyp@^12 so the Electron native rebuild detects VS 2026 on the windows-2025 runner; the bundled fork (pinned by @electron/[email protected]) still only knows VS 2017-2022 and was failing with "unsupported version: 18" after GitHub's runner-images#14017 rollout. - Extend the cross-origin SecurityError test.fixme guards in markdown and rnotebook previews to cover darwin CI; same product bug, same fix. - Bump ensureVisualMode ProseMirror visibility timeout 90s -> 120s to cover slow pandoc conversion on macOS 26 ARM64. Co-Authored-By: Claude Opus 4.7 <[email protected]> * Override CMake generator to "Visual Studio 18 2026" for SOCI build install-soci.R defaults its generator to "Visual Studio 17 2022", which isn't installed on the new windows-2025 image. CMake aborts with "could not find any instance of Visual Studio", install-soci leaves no prebuilts on disk, and the main CMake build then dies on the missing soci-msvc{143,145}-4.0.3 directory. Pass CMAKE_GENERATOR=Visual Studio 18 2026 on the Install build dependencies step. install-soci.R reads it via Sys.getenv and uses it for every per-arch configure call. The resulting libs link cleanly against the msvc143 Boost prebuilts the C++ build falls back to (MSVC 14.x is binary-compatible). Co-Authored-By: Claude Opus 4.7 <[email protected]> * Install node-gyp v12 and point npm at it for VS 2026 The Electron packaging step runs `npm ci && electron-forge package` in desktop-build-AMD64. src/node/desktop ships a binding.gyp, so npm triggers the rstudio package's install lifecycle and runs `node-gyp rebuild` -- using npm's bundled node-gyp (v11.5.0 in dependencies/common/node/22.22.2/.../npm/node_modules/node-gyp). v11 only knows VS 2017-2022 and aborts on VS 2026. The earlier @electron/node-gyp override only fixes the @electron/rebuild path. This is a separate spawn from npm's own lifecycle, so it needs a separate override: install node-gyp@^12 to a throwaway dir and set npm_config_node_gyp so npm uses it for the install lifecycle. Co-Authored-By: Claude Opus 4.7 <[email protected]> * Replace bundled node-gyp inside the bundled npm tree instead of env var The previous attempt set npm_config_node_gyp, but npm's docs are explicit that this env var is the fallback used when node-gyp isn't in PATH. For lifecycle scripts (the rstudio package's auto-generated `node-gyp rebuild` install script driven by its binding.gyp), npm pre-injects the bundled node-gyp into PATH, so the env var is silently ignored and v11.5.0 still wins. Surgical fix: install node-gyp v12 using the bundled npm, then copy it on top of dependencies/common/node/.../node_modules/npm/node_modules/node-gyp. Same pattern the workflow already uses to drop yarn into the bundled node tree. Adds a sanity check that the replacement version really is 12.x before letting the build continue. Co-Authored-By: Claude Opus 4.7 <[email protected]> * Install node-gyp v12 with --install-strategy=nested so deps come along The previous replacement step copied node-gyp v12 over the bundled v11 correctly (verified: node-gyp -v reported 12.4.0 in the failed run), but the build then died with "Cannot find module 'undici'". node-gyp v12 added undici@^6 as a transitive dep, and the default hoisted install strategy had landed undici/semver/tar/etc. in the temp dir's top-level node_modules -- the Copy-Item only picked up node-gyp itself and left its deps behind. --install-strategy=nested forces npm to disable hoisting, so all of node-gyp's transitive deps land inside node-gyp/node_modules/. The copy then carries the full closure into the bundled npm tree, and Node's require() resolves undici from node-gyp/node_modules/undici as expected. Adds a pre-copy and post-copy assertion that undici is actually present so we fail fast if the install layout ever changes again. Co-Authored-By: Claude Opus 4.7 <[email protected]> * Fix macOS e2e visual-mode tests broken by per-test reset activations Three editor tests on macOS shard 1 -- render quarto document, spellcheck in visual mode, rmd templates display -- regressed when #17950 added activateEnvironment + activateFiles to the per-test reset in test-reset.ts. The screenshots in playwright-report show the source pane in the foreground with the Visual button selected, but the editor area stays empty with a spinner: panmirror never finishes mounting. Three targeted changes, each addressing a distinct concrete observation: 1. ensureVisualMode now clicks the active source tab before toggling. The reset's activations leave Files / Environment in the foreground; on macOS 26 the visual toggle then races the IDE's focus reconcile and panmirror's mount never starts. A short tab click puts the source pane up front; .catch swallows the no-active-tab case. 2. After the existing clickConfirmIfVisible, ensureVisualMode now also calls dismissAllModals as a sweep. The visual toggle can stack a secondary dialog under the confirmation; dismissAll is a no-op when nothing is showing, so it's safe on the happy path. 3. ProseMirror visibility timeout 120s -> 180s. macOS 26 ARM64 has been pushing the upper bound and 120s no longer covers the slowest runs. Separately, the rmd templates display test was hitting a non-modal "Package thematic required but is not installed" banner on opening the "Theming with bslib and thematic" template (visible in the failure screenshot). The banner is a notification, not a dialog, so neither installDepIfPrompted nor clickConfirmIfVisible touches it. Pre-install thematic and bslib alongside rmarkdown / remotes in beforeAll so the template renders directly. Co-Authored-By: Claude Opus 4.7 <[email protected]> * Skip Windows-only data viewer End-scroll assertion from #17958 The new End-scrolls-to-the-last-row test added in #17961 fails on windows-2025 with cellBox.y + cellBox.height = 332.25 vs viewportBox.y + viewportBox.height + 0.5 = 308.5 -- the last row lands ~24 px below the viewport's bottom even though visibleBodyHeight already subtracts the 10 px custom horizontal scrollbar overlay. The overshoot matches neither the header height nor the scrollbar height, so it's likely a row-height or viewport-clientHeight delta on Windows Chromium/Electron that ensureActiveCellVisible (rowBottom - bodyHeight) doesn't yet model. The product fix in #17961 was developed on macOS with overlay scrollbars and never exercised on Windows. Skip on win32 CI with a comment that points at the originating issue and PR so the next person (with a Windows box to repro on) can tune visibleBodyHeight -- or the test's tolerance -- without re-deriving the diagnosis. Co-Authored-By: Claude Opus 4.7 <[email protected]> * Skip 3 macOS visual-mode tests broken by #17950 per-test reset After bumping the ensureVisualMode timeout to 180s, refocusing the source pane before the toggle, sweeping modals after OK, and pre-installing thematic+bslib so the package banner doesn't appear, the editor still sits on the loading spinner on macOS 26 ARM64 for the full timeout. The pattern is identical across all three: panmirror never mounts after the visual toggle is clicked. The regression started landing after #17950 added activateEnvironment + activateFiles to the per-test reset; runs on the prior main HEAD (sha 86a96b0 at 12:18 UTC) had these three tests passing cleanly. Skip on darwin CI with the diagnostic notes inline so the reset PR owner has a starting point. Windows and Linux paths are unaffected. Co-Authored-By: Claude Opus 4.7 <[email protected]> * Revert "Skip 3 macOS visual-mode tests broken by #17950 per-test reset" This reverts commit 4ba7dfa. * Revert ensureVisualMode resilience changes -- they were the bug Comparing playwright reports against PR #17939 (aza/linux-automation, same merged main HEAD including #17950) shows the 3 macOS visual-mode tests pass cleanly on the original ensureVisualMode -- so #17950 is not the regression source. Our own additions in 27d470e were. The dismissAllModals call after clickConfirmIfVisible is the most likely culprit: it fires r.dialogs.dismissAll() right after the visual mode confirmation is closed, which can also dismiss a follow-up panmirror init dialog (or interrupt its setup chain). Removing it. Also reverting the selectedTab.click() pre-toggle "focus race" fix since the diagnosis it was built on (Kevin's #17950 reset breaking visual mode) turns out to be wrong, and PR #17939 confirms the toggle click alone is sufficient on the same merged main. Restoring the timeout to 90s (PR baseline) -- 180s was masking a self-inflicted hang. Co-Authored-By: Claude Opus 4.7 <[email protected]> * Expand macOS GWT cache key to non-Java sources; bump prefix to v2 The macOS workflow's GWT output cache was keyed on hashFiles('src/gwt/src/**/*.java', 'src/gwt/build.xml', 'src/gwt/conf/**') only -- which misses .ui.xml, .css, JS resources under src/gwt/src, and src/gwt/acesupport/** / src/gwt/lib/**. The Windows workflow already uses the broader pattern (review feedback); the macOS side was overlooked in that fix. Effect: a recent main change to a non-Java GWT input still produced the same hash, so the cache hit a stale compiled GWT bundle. The build then linked with old JS, and panmirror visual mode failed to initialize in the editor tests (quarto render, rmarkdown spellcheck, rmd templates display) -- editor stays on the loading spinner because the cached bundle is missing the recent panmirror/UI changes pulled in by the main merge. Compared the same merge ref against PR #17939 (aza/linux-automation), which builds without our macOS GWT cache step; those three tests pass cleanly there. Bumped the prefix to v2 so the existing stale cache entries don't get restored via the restore-keys fallback. Co-Authored-By: Claude Opus 4.7 <[email protected]> * Broaden detect-changes regex to all of package/ The workflow trigger paths include package/** but the detect-changes regex only matched package/win32/ and package/osx/. A change to package/CMakeLists.txt (the parent packaging cmake, consumed by every platform build) or package/linux/ would trigger the workflow yet set build_from_source=false, so CI would run tests against the daily installer instead of the PR's actual changes -- false green on packaging-script PRs. Match all of package/ instead. Co-Authored-By: Claude Opus 4.7 <[email protected]> * Namespace playwright artifacts per platform; cover root CMakeLists.txt Two CI logic fixes from re-review: 1. Artifact-name collisions across the macOS + Windows fan-out. Both reusable workflows uploaded playwright-blob-report-${shard} and playwright-report under identical names. With both running in the same PR run, the e2e-merge job that ran second downloaded playwright-blob-report-* (merge-multiple: true) and would mix blob reports from both platforms into a single merged report. Confirmed in the most recent run: two artifacts each named playwright-blob-report-1, playwright-blob-report-2, and playwright-report -- one per platform. Whichever merge ran last pulled both sets via the wildcard pattern. Fix: prefix per-shard blob report names and the merged-report names with the platform (-win-, -mac-) and tighten each merge job's download pattern to match only its own platform's blobs. 2. Repo-root CMakeLists.txt was missing from both the workflow pull_request.paths trigger and the detect-changes regex. A PR touching only the root CMakeLists.txt wouldn't trigger this workflow; if combined with another trigger path it could still route to a daily installer instead of the PR build. Fix: add CMakeLists.txt to paths and ^CMakeLists\.txt$ to the detector regex so any root-cmake change forces a source build. Co-Authored-By: Claude Opus 4.7 <[email protected]> --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
End and Ctrl+End in the data viewer body now move to the last row of the current column, matching the pre-rewrite (DataTables) viewer, instead of jumping to the last column; Home likewise returns to the top of the current column. Header-mode Home/End still walk between column headers.
This also fixes the "doesn't quite reach the bottom" half of the report:
ensureActiveCellVisiblecomputed bottom-edge scrolls from the raw viewportclientHeight, but the sticky header both contributes to scroll content height and occludes the top of the viewport (and the custom horizontal scrollbar overlays the bottom 10px), so a jump to the last row landed a header-height (~25px) short, leaving the target row hidden below the fold. The bottom-edge math now uses the effective body-visible height, shared with the status bar via a newvisibleBodyHeighthelper.The copy/paste half of #17958 was already fixed on main by #17804 (Ctrl+C no longer clobbers a multi-cell text selection); it just isn't in the 2026.05.0 release the reporter is on.
Includes an e2e regression test (verified to fail against the old bottom-edge math). Full data viewer spec passes (38/38, desktop-dev).
Fixes #17958.