-
Notifications
You must be signed in to change notification settings - Fork 73
[Performance] Use full path for render calls #12227
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
base: main
Are you sure you want to change the base?
Conversation
|
Claude finished @Luke-Oldenburg's task —— View job Code Review
SummaryThis PR systematically converts relative partial paths to full paths across 100+ view files. The changes are consistent, correct, and will improve Rails rendering performance by eliminating the path search overhead. What ChangedThe PR converts all relative partial render calls to use full paths: Before: <%= render "callout", type: "warning" %>
<%= render partial: "form", locals: { ... } %>After: <%= render "ach_transfers/callout", type: "warning" %>
<%= render partial: "ach_transfers/form", locals: { ... } %>Review Findings✅ Strengths
📋 Observations
🔍 Potential ConcernsNone identified. The changes are:
💡 Recommendations
VerdictLGTM! 🎉 This is a well-executed performance improvement. The changes are systematic, correct, and will reduce Rails template resolution overhead without any functional impact. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR aims to improve Rails performance by using full paths in render calls to reduce file search time. However, the implementation contains critical bugs that will cause rendering errors across the application.
Key Issues:
- 36+ instances where
render "callout"was changed to controller-specific paths (e.g.,"events/callout","users/callout") but those partials don't exist—they should use"application/callout" - Directory name mismatches:
reimbursements(plural) used instead ofreimbursement(singular) - Wrong paths for nested directories:
organizer_position_invite/forminstead oforganizer_position_invite/links/form - Incorrect donation header/footer paths pointing to non-existent
donations/partials instead ofevents/landing/
Summary: While the performance optimization approach is sound, the execution has introduced systematic errors that will break the application. All callout references and several other paths need correction before this can be merged.
Reviewed changes
Copilot reviewed 103 out of 103 changed files in this pull request and generated 43 comments.
Show a summary per file
| File | Description |
|---|---|
| app/views/wise_transfers/new.html.erb | Updates render paths for callout and partials |
| app/views/wires/*.html.erb | Updates render paths for requirements, recipient_details, etc. |
| app/views/users/*.html.erb | Updates render paths for settings navigation and forms |
| app/views/stripe_cards/*.html.erb | Converts model rendering to explicit partial paths |
| app/views/reimbursement/reports/*.html.erb | BUG: Uses incorrect plural "reimbursements" |
| app/views/logins/*.html.erb | Updates header, badge, footer partial paths |
| app/views/invoices/*.html.erb | BUG: References non-existent invoices/callout |
| app/views/events/*.html.erb | BUG: References non-existent events/callout |
| app/views/donations/*.html.erb | BUG: References non-existent donations/header and footer |
| app/views/card_grants/*.html.erb | BUG: References non-existent card_grants/callout |
| All other files | Mix of correct path updates and callout-related bugs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <%= render partial: "balance", locals: { card_grant: @card_grant } %> | ||
| <%= render partial: "canceled_warning", locals: { card_grant: @card_grant } %> | ||
| <%= render partial: "actions", locals: { card_grant: @card_grant } %> | ||
| <%= render "stripe_cards/stripe_card", stripe_card: @card_grant.stripe_card, headless: true %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is changing this necessary? If you call render on a model is there more than one place it could live?
| <% no_app_shell %> | ||
|
|
||
| <%= render "header" %> | ||
| <%= render "events/landing/header" %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the correct partial but I don't understand how it was getting inferred before. From my understanding, events/landing would not have been on the path and it would have rendered from application.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 103 out of 103 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 103 out of 103 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sampoder
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving but I think we should wait until we have Slack back before merging this
Agreed |
This reduces the amount of time rails is searching for files to render.