feat(pages): Redesign the error pages (backport #581) - #584
Merged
Conversation
Replace the logo header and shadowed card with a centred icon, heading, error line, optional docs button and an owner footer. Every page shares one stylesheet; nginx serves them as flat files, so a shared css file is not reachable from the 500 page's iframe. Text links carry the plain-html visited purple. The rule is scoped with :not(.button), because a bare a:visited outranks the button's own colour and repaints its white label purple. Drop the Google Fonts link the earlier attempt carried. An external font request would hang on the very networks these pages appear on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> (cherry picked from commit e421d72) # Conflicts: # agent/pages/deactivated.html # agent/pages/exceeded.html # agent/pages/suspended.html
The traceback for a 500 lands in the bench's web.error.log, so link straight to it instead of the site's dashboard root. One static page is shared by every bench on the server, so the page ships __BENCH_NAME__ and the per-bench nginx config substitutes it. That also drops the hostname script from this page, which means it is the one error page immune to the custom domain problem: window.location.hostname is not the site's name once a custom domain is in front of it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> (cherry picked from commit 8166147)
Contributor
Author
|
Cherry-pick of e421d72 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Contributor
Author
|
Tick the box to add this pull request to the merge queue (same as
|
Mergify left the conflict markers in the branch. Each conflict is the same dashboard-link script; keep the redesigned version from #581. Co-Authored-By: Claude Opus 5 <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
Redesigns all eight error pages and points the 500 page at the bench's
web.error.log.Before, each page was a logo header over a shadowed card, with the docs link styled as an inline
📄pseudo-button. Now every page is one shared layout: icon, heading, error line, optional docs button, owner footer.bad_gateway.htmlgateway_timeout.htmlinternal_server_error.htmlexceeded.htmlsuspended.html/suspended_saas.htmldeactivated.htmlhome.htmlVisited links
Text links carry the plain-html visited purple. The rule is scoped
a:not(.button):visiteddeliberately: a barea:visitedhas specificity (0,1,1) and outranks.button's owncolor: #fffat (0,1,0), which repaints the button's white label purple. The button itself has no visited state —:visitedreaches only a few colour properties, never a button's label, and Chrome has partitioned it per top-level site and frame origin since 136.The 500 page
The traceback for a 500 lands in the bench's
web.error.log, so the footer now links straight to/dashboard/benches/<bench>/logs/web.error.loginstead of the site's dashboard root.One static page is shared by every bench on the server, so the page ships
__BENCH_NAME__and the per-bench nginx config substitutes it:This works because the 500 interception injects
<iframe src="/internal_server_error.html">— a relative URL — so the iframe request carries the failing site'sHostand resolves through its own bench's server block.A side effect worth having: this page no longer needs the
window.location.hostnamescript, making it the one error page immune to the custom-domain problem, wherehostnameis not the site's name once a custom domain is in front of it. The other pages still have that pre-existing issue.Also drops the Google Fonts
<link>an earlier attempt carried — an external font request would hang on the very networks these pages appear on.Testing
Verified end to end against a local Frappe Cloud install with a real bench on
f1.local.frappe.dev:bench-0004-000023-f1andbench-0004-000022-f1respectivelypress.api.bench.logreturned{'web.error.log': ...}through the full path: permission check, release-group check, circuit breaker, live agent callLogPage.vuederives the release group asbench-${name.split('-')[1]}; confirmed against real records (bench-0004-000023-f1→bench-0004)sub_filtercorrectlyagent/tests/test_pages.pycovers the invariants that would silently break a page: no external resources, the scoped visited rule, dashboard links paired with their rewrite script, and every__BENCH_NAME__matched by asub_filterin each of its nginx location blocks.🤖 Generated with Claude Code
This is an automatic backport of pull request #581 done by Mergify.