diff --git a/webui/backend/tests/golden/__pycache__/test_ui_smoke_golden.cpython-313.pyc b/webui/backend/tests/golden/__pycache__/test_ui_smoke_golden.cpython-313.pyc index 6a7803b..8836536 100644 Binary files a/webui/backend/tests/golden/__pycache__/test_ui_smoke_golden.cpython-313.pyc and b/webui/backend/tests/golden/__pycache__/test_ui_smoke_golden.cpython-313.pyc differ diff --git a/webui/backend/tests/golden/test_ui_smoke_golden.py b/webui/backend/tests/golden/test_ui_smoke_golden.py index b91f29d..397bb2f 100644 --- a/webui/backend/tests/golden/test_ui_smoke_golden.py +++ b/webui/backend/tests/golden/test_ui_smoke_golden.py @@ -30,6 +30,8 @@ class UiSmokeGoldenTest(unittest.TestCase): self.assertIn('id="footer-bar"', body) self.assertIn('id="left-pane"', body) self.assertIn('id="right-pane"', body) + self.assertIn('id="left-breadcrumbs"', body) + self.assertIn('id="right-breadcrumbs"', body) self.assertNotIn('id="bookmarks-panel"', body) self.assertNotIn('id="tasks-panel"', body) diff --git a/webui/html/app.js b/webui/html/app.js index 273df3b..33b2eb7 100644 --- a/webui/html/app.js +++ b/webui/html/app.js @@ -130,16 +130,19 @@ function renderBreadcrumbs(pane, path) { let aggregate = ""; for (let i = 0; i < parts.length; i += 1) { aggregate = i === 0 ? parts[i] : `${aggregate}/${parts[i]}`; + const crumbPath = aggregate; const crumb = createButton(parts[i], () => { setActivePane(pane); - navigateTo(pane, aggregate); + console.debug("[breadcrumbs] click", { pane, crumbPath }); + navigateTo(pane, crumbPath); }); crumb.type = "button"; crumb.onclick = (ev) => { ev.preventDefault(); ev.stopPropagation(); setActivePane(pane); - navigateTo(pane, aggregate); + console.debug("[breadcrumbs] click", { pane, crumbPath }); + navigateTo(pane, crumbPath); }; nav.append(crumb); if (i < parts.length - 1) { @@ -236,6 +239,11 @@ async function loadBrowsePane(pane) { path: model.currentPath, show_hidden: String(model.showHidden), }); + console.debug("[browse] request", { + pane, + path: model.currentPath, + show_hidden: model.showHidden, + }); const data = await apiRequest("GET", `/api/browse?${query.toString()}`); model.currentPath = data.path; document.getElementById(`${pane}-current-path`).textContent = data.path; @@ -291,6 +299,7 @@ async function loadBrowsePane(pane) { } function navigateTo(pane, path) { + console.debug("[navigate] pane-path", { pane, path }); paneState(pane).currentPath = path; setSelectedItem(pane, null); loadBrowsePane(pane);