Skip to content

chore(webui): Migrate from JS to CSS for eval results scroll effects #4995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jul 21, 2025

Conversation

will-holley
Copy link
Contributor

@will-holley will-holley commented Jul 18, 2025

JS-based scrolling contains a broken edge case where shifting the scroll container height (by resizing the header) results in the scroll handler being called recursively until the user changes the scroll y position.

This PR migrates to CSS-based scrolling effects using a scroll timeline. Scroll timelines are a new-ish CSS feature, with availability in Chrome and Edge, beta support in Safari, and feature-flagged support in Firefox, so this PR includes the polyfill recommended by Chrome for Developers.

Unfortunately I was not able to get scroll animations working on ancestor (of the scrollable element) components in Firefox and Safari, and thus have disabled hiding the eval header on scroll, which I believe is preferable to have behavior differ by browser. This should be considered a temporary regression as the header requires an informatic-heirarchy update and is likely to soon change regardless.

@will-holley will-holley self-assigned this Jul 18, 2025
@will-holley will-holley marked this pull request as ready for review July 21, 2025 14:28
Copy link
Contributor

gru-agent bot commented Jul 21, 2025

TestGru Assignment

Summary

Link CommitId Status Reason
Detail 96c807d ✅ Finished

History Assignment

Files

File Pull Request
src/app/public/scripts/polyfills/scroll-timeline.js ❌ Failed (All Jest unit tests passed successfully. The only failure is from ESLint, which is due to a missing ESLint configuration file (eslint.config.js) as required by ESLint v9+. This is an environment/configuration issue, not a source code or test bug. The TypeScript compiler also passed. No source code bug is detected.)

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

@will-holley will-holley merged commit fd7335a into main Jul 21, 2025
38 of 39 checks passed
@will-holley will-holley deleted the will/css-scroll-transitions branch July 21, 2025 14:28
Copy link
Contributor

coderabbitai bot commented Jul 21, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The changes introduce a polyfill for the CSS Scroll Timeline and View Timeline APIs by adding a new JavaScript file and loading it in the main HTML file. The polyfill enables scroll-driven animations in browsers without native support. CSS in the results table and view components is refactored to use scroll timelines and CSS custom properties for animating header collapse, replacing previous manual class toggling and scroll event handling. Corresponding TypeScript components have scroll-related props, state, and event handlers removed, shifting all header collapse logic to CSS and scroll timelines. The configuration file is updated to exclude the polyfill script directory from certain processing.

Estimated code review effort

4 (~90 minutes)


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 990ff70 and 96c807d.

📒 Files selected for processing (7)
  • biome.json (1 hunks)
  • src/app/index.html (1 hunks)
  • src/app/public/scripts/polyfills/scroll-timeline.js (1 hunks)
  • src/app/src/pages/eval/components/ResultsTable.css (5 hunks)
  • src/app/src/pages/eval/components/ResultsTable.tsx (5 hunks)
  • src/app/src/pages/eval/components/ResultsView.css (1 hunks)
  • src/app/src/pages/eval/components/ResultsView.tsx (2 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

use-tusk bot commented Jul 21, 2025

✅ Generated 7 tests - 7 passed (96c807d) View tests ↗

View output in GitHub ↗

Test Summary

  • ResultsView - 7 ✅

Results

All Tusk tests are passing for the CSS scroll-timeline migration. The tests verify that the new implementation correctly renders the required DOM elements (results-view-container and eval-header) needed for the CSS-based scroll effects. Tests confirm the component works in Firefox and Safari despite the temporary regression where header collapse animation is disabled in those browsers. The removal of JS scroll handlers is validated by ensuring the previously used scroll props are no longer passed to child components.

Key points:

  • Tests confirm the core structure needed for scroll-timeline CSS is properly rendered
  • Verified cross-browser compatibility despite animation limitations in Firefox/Safari
  • Checked that the component handles edge cases like very long config descriptions
  • Validated that header collapse animation initializes correctly when container height changes
  • Confirmed removal of JS-based scroll props that were causing recursive handler calls
View check history

Commit Status Output Created (UTC)
3b6fdf6 ⏩ No tests generated Output Jul 18, 2025 10:57PM
2267538 ⏩ Skipped due to new commit on branch Output Jul 18, 2025 11:10PM
b5c2dc0 ✅ Generated 11 tests - 11 passed Tests Jul 18, 2025 11:12PM
572b6fd ✅ Generated 10 tests - 10 passed Tests Jul 20, 2025 3:53PM
3c8830b ⏩ Skipped due to new commit on branch Output Jul 20, 2025 4:18PM
d644920 ⏩ Skipped due to new commit on branch Output Jul 20, 2025 4:25PM
d433f4e ⏩ Skipped due to new commit on branch Output Jul 20, 2025 4:25PM
fe0c6df ✅ Generated 7 tests - 7 passed Tests Jul 20, 2025 4:32PM
96c807d ✅ Generated 7 tests - 7 passed Tests Jul 21, 2025 2:01PM

Was Tusk helpful? Give feedback by reacting with 👍 or 👎

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