Improve error-page recovery navigation to prevent dead ends#1103
Merged
Conversation
Agent-Logs-Url: https://github.com/IntelliTect/EssentialCSharp.Web/sessions/6b13d96a-7257-4f57-984d-9d59b791e7f7 Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/IntelliTect/EssentialCSharp.Web/sessions/6b13d96a-7257-4f57-984d-9d59b791e7f7 Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix sidebar navigation upon error
Improve error-page recovery navigation to prevent dead ends
May 14, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the 404/error-page recovery experience by adding an explicit navigation path back into the book content, and extends functional coverage to prevent regressions (aligns with the “stuck on error page” user report in repo issue #104).
Changes:
- Added a Browse Chapters action on the error page linking to
/hello-worldas a first content entry point. - Extended the existing functional test for non-existing pages to assert that all three recovery actions are rendered.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| EssentialCSharp.Web/Views/Home/Error.cshtml | Adds a “Browse Chapters” button next to existing “Go Home” and “Go Back” recovery actions. |
| EssentialCSharp.Web.Tests/FunctionalTests.cs | Updates the 404 functional test to assert the presence of the three recovery actions in the error response HTML. |
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.
Users hitting invalid URLs could end up on the error page with limited recovery options, making it easy to get stuck unless they manually edited the URL. This update adds a direct path back into book content and locks the behavior with functional coverage.
Error page UX
Views/Home/Error.cshtml./hello-world(first chapter entry point), alongside existing Go Home and Go Back actions.Functional regression coverage
WhenTheApplicationStarts_NonExistingPage_GivesCorrectStatusCodeinEssentialCSharp.Web.Tests/FunctionalTests.csto assert all three recovery actions are present in the rendered error response.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.hcaptcha.com/home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Release/net10.0/EssentialCSharp.Web.Tests /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Release/net10.0/EssentialCSharp.Web.Tests --server dotnettestcli --dotnet-test-pipe /tmp/ea305378337b41c2abd59e9e4dc23d5a(dns block)/home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Release/net10.0/EssentialCSharp.Web.Tests /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Release/net10.0/EssentialCSharp.Web.Tests --server dotnettestcli --dotnet-test-pipe /tmp/84e60f0dcfee4db0ba5c3e0cdabee6fc /var/lib/dpkg/info/php-pear.list /var/lib/dpkg/info/libip4tc2:amd64.list /var/lib/dpkg/info/libnpth0t64:amd64.list /var/lib/dpkg/info/libgcc-12-dev:amd64.list /var/lib/dpkg/info/libxext6:amd64.list /var/lib/dpkg/info/libclang-rt-18-dev:amd64.list /var/lib/dpkg/info/libpopt0:amd64.list(dns block)api.pwnedpasswords.com/home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Release/net10.0/EssentialCSharp.Web.Tests /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Release/net10.0/EssentialCSharp.Web.Tests --server dotnettestcli --dotnet-test-pipe /tmp/ea305378337b41c2abd59e9e4dc23d5a(dns block)/home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Release/net10.0/EssentialCSharp.Web.Tests /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Release/net10.0/EssentialCSharp.Web.Tests --server dotnettestcli --dotnet-test-pipe /tmp/84e60f0dcfee4db0ba5c3e0cdabee6fc /var/lib/dpkg/info/php-pear.list /var/lib/dpkg/info/libip4tc2:amd64.list /var/lib/dpkg/info/libnpth0t64:amd64.list /var/lib/dpkg/info/libgcc-12-dev:amd64.list /var/lib/dpkg/info/libxext6:amd64.list /var/lib/dpkg/info/libclang-rt-18-dev:amd64.list /var/lib/dpkg/info/libpopt0:amd64.list(dns block)cdn.jsdelivr.net/home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1223/chrome-headless-shell-linux64/chrome-headless-shell /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1223/chrome-headless-shell-linux64/chrome-headless-shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-edgeupdater --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Transl(dns block)If you need me to access, download, or install something from one of these locations, you can either: