Skip to content
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

Badge no longer displays after Turbo Drive page load w/ Turbo 8 (even w/ enable_hotwire_turbo_drive_support = true) #612

Open
charlesobrien opened this issue Apr 27, 2024 · 2 comments

Comments

@charlesobrien
Copy link

Issue: After upgrading to Turbo 8 the Rack Mini Profiler badge no longer displays after a Turbo Drive action with Rack::MiniProfiler.config.enable_hotwire_turbo_drive_support = true. If I revert back to Turbo 7 / Turbo Rails 1.5 the behavior works as expected.

Expected Behavior: When a page loads with Turbo Drive the Rack Mini Profiler badge displays.

Actual Behavior: When a page loads with Turbo Drive the Rack Mini Profiler badge does not display.

@joshuay03
Copy link

joshuay03 commented Apr 28, 2024

I dug into this a bit cause it's affecting our app as well.

From what I can tell, Turbo 8 references and uses the native window.fetch function for its requests (added in hotwired/turbo#1019). As a result, this override is never utilised by Turbo Drive because the Turbo scripts are preloaded before the profiler script is executed:

Screenshot 2024-04-28 at 9 51 55 PM Screenshot 2024-04-28 at 9 48 32 PM

@charlesobrien
Copy link
Author

@joshuay03 Thanks for sharing! My spelunking was leaving me stumped.

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

No branches or pull requests

2 participants