feat(ui): Route the bench logs dialog so the 500 page can link to it - #7257
Conversation
Benches now live under their group, so the bench detail page is off the sidebar and LogPage.vue was reachable only by typing a URL. The 500 error page links straight there. Open the existing BenchLogsDialog from a query on the group's Sites tab (?bench=&log=), and redirect the old /benches/<bench>/logs/<log> route to it, so links already baked into served nginx configs keep working without an agent-side change. The dialog derives the group from the bench name itself, so the deep link needs the bench name only. Note: biome rewrote the touched files. biome.json sets semicolons "asNeeded" but these files predate it, so the hook reformats on contact. The logic is in ReleaseGroupBenchSites.vue (mounted + showBenchLogs), BenchLogsDialog.vue (initialLog prop) and objects/bench.ts (redirect). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The 500 page's link now lands in this dialog rather than LogPage, so the scroll-to-bottom behaviour has to live here too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Confidence Score: 5/5The PR appears safe to merge with no actionable defects identified. The generated router preserves the redirect, hard-loaded deep links mount the target component, and backend authorization scopes log retrieval to the selected team-owned release group and bench. Reviews (1): Last reviewed commit: "Merge branch 'develop' into route-bench-..." | Re-trigger Greptile |
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (70.96%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #7257 +/- ##
============================================
+ Coverage 58.71% 87.30% +28.58%
============================================
Files 1024 126 -898
Lines 94135 22968 -71167
Branches 1216 1218 +2
============================================
- Hits 55273 20052 -35221
+ Misses 38839 2893 -35946
Partials 23 23
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
feat(ui): Route the bench logs dialog so the 500 page can link to it (backport #7257)
Problem
The sidebar's Benches entry points at
/groups, and itsisActiveset contains onlyRelease Group *routes./benches/:name(Bench Detail, which hostsLogPage.vue) is reachable only by clicking a bench row inside a group — nothing in the nav goes there.That matters because the new 500 error page in frappe/agent#581 links a broken site's owner straight to that bench's
web.error.log. The link pointed at a page users can't otherwise reach.Change
The logs dialog on the group's Sites tab is the maintained log viewer, so route to that instead.
ReleaseGroupBenchSites.vue—mounted()opens the dialog from?bench=&log=. The dialog-opening code moved intoshowBenchLogs(), which the existing View Logs row action now calls too.BenchLogsDialog.vue— newinitialLogprop opens that log directly instead of showing the list first. Also scrolls to the newest entries on load, since these files run to megabytes.objects/bench.ts— theBench Logroute is now a redirect rather than a component.objects/common/types.ts—RouteDetail.componentis optional,redirectadded.Resulting URL:
No agent-side change needed
/dashboard/benches/<bench>/logs/<log>now redirects into the dialog, so agent#581 needs no edit and every nginx config already serving that link keeps working.The redirect derives the group with
bench-${name.split('-')[1]}— the same derivationLogPage.vueandBenchLogsDialog.vuealready rely on, not a new assumption.Notes for review
Formatting churn.
biome.jsonsetssemicolons: "asNeeded", but these files were written with semicolons, so the pre-commit hook rewrote all four on contact. The first commit is therefore ~390 lines for ~45 lines of logic. Reviewing commit-by-commit, or with-w, will not help — it is a semicolon and import-order rewrite. Happy to rebase onto pristine files if you would rather take the logic alone.Supersedes #7235, which added scroll-to-bottom to
LogPage.vue. That page is no longer where the bench link lands, so the behaviour moved into the dialog.LogPage.vueis still the viewer for site logs and no longer scrolls to the bottom for them; say if that should be restored separately.Testing
vue-tscreports no errors in any of the four changed files (the codebase has many pre-existing ones elsewhere), andvite buildpasses. Not click-tested in a browser — worth confirmingmountedfires with the query on a hard page load, since that is the deep-link path.🤖 Generated with Claude Code