Fix dashboard links not working when there is a trailing slash in the URL#2499
Merged
emmadesilva merged 2 commits intoJul 4, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2499 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 1615 1615
===========================================
Files 169 169
Lines 4074 4074
===========================================
Hits 4074 4074 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes broken links in the Realtime Compiler dashboard when the dashboard is accessed with a trailing slash (e.g. /dashboard/), by ensuring preview links resolve from the site root instead of relative to the dashboard path.
Changes:
- Added
DashboardControllerhelpers to generate root-relative preview links for pages and media assets. - Updated the dashboard Blade template to use the new helpers for page “View” links and media preview/fullscreen URLs.
- Added a regression test that renders the dashboard under
/dashboard/and asserts generated links are root-relative.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/realtime-compiler/tests/RealtimeCompilerTest.php | Adds a regression test validating dashboard links remain root-relative when accessed via /dashboard/. |
| packages/realtime-compiler/src/Http/DashboardController.php | Introduces link-normalization helpers to generate root-relative preview URLs. |
| packages/realtime-compiler/resources/dashboard.blade.php | Switches page/media preview URLs to use controller helpers instead of relative paths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Fixes hydephp/realtime-compiler#31. Tested it fixes the issue and that it handles both standard and pretty URLs.