I think I found a bug.
Steps to reproduce:
- Create page with eager-loaded frame
- Create link with redirect on this page (HTTP code not important)
- Click on link for get redirect
- Watch browser network tab (or sever logs)
Example requests for turbo_frame with id: src_content:
Chrome:

Firefox:

All my 'eager-loaded frames' were loaded twice. You can look part of my source code for ruby 3.1.0, rails 7.0.1, turbo-rails 1.0.1 here: https://gist.github.com/blrB/1b0e1d44f31df1d1c9932985471ec3b3
I think, that root case can be in line https://github.com/hotwired/turbo/blame/main/src/core/drive/visit.ts#L274 (commit 38b8f13). Now redirect responses use visit action replace. This visit create next trace start -> ... -> loadResponse -> render -> ... -> replaceBody -> sourceURLChanged -> loadSourceURL -> fetch request for frame. But fetch request already was created and rendered, before replace action had been created. I think we shouldn't render this action twice, so we can just create this action with prams willRender: false. I tested this code, and I think it works like I expected. You can look source code here: #516
I think I found a bug.
Steps to reproduce:
Example requests for turbo_frame with id: src_content:


Chrome:
Firefox:
All my 'eager-loaded frames' were loaded twice. You can look part of my source code for ruby 3.1.0, rails 7.0.1, turbo-rails 1.0.1 here: https://gist.github.com/blrB/1b0e1d44f31df1d1c9932985471ec3b3
I think, that root case can be in line https://github.com/hotwired/turbo/blame/main/src/core/drive/visit.ts#L274 (commit 38b8f13). Now redirect responses use visit action
replace. This visit create next tracestart-> ... ->loadResponse->render-> ... ->replaceBody->sourceURLChanged->loadSourceURL-> fetch request for frame. But fetch request already was created and rendered, beforereplaceaction had been created. I think we shouldn't render this action twice, so we can just create this action with pramswillRender: false. I tested this code, and I think it works like I expected. You can look source code here: #516