Fix system notifications showing Oopsie error#1488
Merged
Conversation
The notifications index rendered data inline inside a turbo frame while also setting a src attribute to re-fetch the same data. If the redundant request failed, the turbo:frame-missing handler replaced the content with an error message. Aligns with the lazy-load pattern used by other controllers (stories, people, etc.) — skeleton on initial load, data fetched via turbo frame request. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
maebeale
commented
Apr 17, 2026
| authorize! | ||
| per_page = params[:number_of_items_per_page].presence || 25 | ||
| base_scope = authorized_scope(Notification.includes(:noticeable)) | ||
| filtered = base_scope.search_by_params(params.to_unsafe_h) |
Collaborator
Author
There was a problem hiding this comment.
Adopted the same lazy-load pattern as StoriesController, PeopleController, etc. — only load data for turbo frame requests, render a skeleton for the initial page load.
Links inside the notifications_results turbo frame were being intercepted by Turbo, which tried to load the target page inside the frame. The show page and polymorphic record pages don't contain a matching turbo frame, triggering the turbo:frame-missing handler and showing the "Oopsie!" error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jmilljr24
approved these changes
Apr 17, 2026
jmilljr24
pushed a commit
that referenced
this pull request
May 20, 2026
* Fix system notifications showing "Oopsie!" by adopting lazy-load pattern The notifications index rendered data inline inside a turbo frame while also setting a src attribute to re-fetch the same data. If the redundant request failed, the turbo:frame-missing handler replaced the content with an error message. Aligns with the lazy-load pattern used by other controllers (stories, people, etc.) — skeleton on initial load, data fetched via turbo frame request. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add turbo_frame: _top to links inside notifications turbo frame Links inside the notifications_results turbo frame were being intercepted by Turbo, which tried to load the target page inside the frame. The show page and polymorphic record pages don't contain a matching turbo frame, triggering the turbo:frame-missing handler and showing the "Oopsie!" error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the goal of this PR and why is this important?
src— if that request failed, the content was replaced with the error, and (2) links inside the turbo frame (View, Record) were intercepted by Turbo, which tried to load the target page inside the frame — those pages don't have a matching frame, triggering the errorHow did you approach the change?
data: { turbo_frame: "_top" }to View and Record links so they navigate the full page instead of targeting the frame_notifications_results.html.erbpartial (referenced a non-existent_notifications_countpartial and was never used)UI Testing Checklist
/notificationsas admin — should show skeleton briefly then load notifications tableAnything else to add?
notifications_resultsturbo frame were intercepted by Turbo. Turbo tried to load the linked pages inside the frame, but those pages don't contain a matching<turbo-frame id="notifications_results">, soturbo:frame-missingfired and the handler replaced the frame content with "Oopsie!"🤖 Generated with Claude Code