fix(admin/view): wrap plugin history URL with basePath (#9341)

Plugin tabs/sub-tabs use history.pushState/replaceState to keep the
URL bar in sync with the active view, but updateURL fed it the raw
output of buildPluginURL ("/plugin/lanes/<lane>/..."). Under a
urlPrefix deployment that strips the prefix, so reloading the page
hit /plugin/... directly and 404'd at the proxy.

Wrap with basePath() so the rewritten URL keeps the deployment
prefix.

Reported at #9240.
This commit is contained in:
Chris Lu
2026-05-06 15:25:06 -07:00
committed by GitHub
parent 1c0e24f06a
commit 7b0b64db65
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -758,7 +758,7 @@ templ Plugin(page string, initialJob string, lane string) {
}
function updateURL(replace) {
var url = buildPluginURL(state.activeTopTab, state.activeSubTab, state.selectedJobType);
var url = basePath(buildPluginURL(state.activeTopTab, state.activeSubTab, state.selectedJobType));
if (replace) {
history.replaceState({ pluginTopTab: state.activeTopTab, pluginSubTab: state.activeSubTab, pluginJob: state.selectedJobType }, '', url);
} else {
File diff suppressed because one or more lines are too long