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 d924355..308f19e 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 58fa5d5..d6b1369 100644 --- a/webui/backend/tests/golden/test_ui_smoke_golden.py +++ b/webui/backend/tests/golden/test_ui_smoke_golden.py @@ -46,6 +46,8 @@ class UiSmokeGoldenTest(unittest.TestCase): self.assertIn('id="right-pane"', body) self.assertIn('id="left-items"', body) self.assertIn('id="right-items"', body) + self.assertIn('id="left-focus-line"', body) + self.assertIn('id="right-focus-line"', body) self.assertIn('id="function-bar"', body) self.assertIn('id="settings-btn"', body) self.assertIn('id="rename-btn"', body) diff --git a/webui/html/app.js b/webui/html/app.js index 8e1ac4a..6d9e6be 100644 --- a/webui/html/app.js +++ b/webui/html/app.js @@ -910,6 +910,24 @@ function scrollCurrentRowIntoView(pane) { } } +function updatePaneFocusLine(pane) { + const model = paneState(pane); + const focusLine = document.getElementById(`${pane}-focus-line`); + if (!focusLine) { + return; + } + if (!Array.isArray(model.visibleItems) || model.currentRowIndex < 0 || model.currentRowIndex >= model.visibleItems.length) { + focusLine.textContent = "—"; + return; + } + const item = model.visibleItems[model.currentRowIndex]; + if (!item) { + focusLine.textContent = "—"; + return; + } + focusLine.textContent = item.isParent ? "../" : (item.name || "—"); +} + function renderPaneItems(pane) { const model = paneState(pane); const items = document.getElementById(`${pane}-items`); @@ -917,6 +935,7 @@ function renderPaneItems(pane) { if (!Array.isArray(model.visibleItems) || model.visibleItems.length === 0) { model.currentRowIndex = -1; + updatePaneFocusLine(pane); updateActionButtons(); return; } @@ -1039,6 +1058,7 @@ function renderPaneItems(pane) { } items.append(row); }); + updatePaneFocusLine(pane); updateActionButtons(); } diff --git a/webui/html/base.css b/webui/html/base.css index b35ea41..c115314 100644 --- a/webui/html/base.css +++ b/webui/html/base.css @@ -112,6 +112,20 @@ h1 { background: var(--color-surface); } +.pane-focus-line { + flex: 0 0 auto; + min-height: 24px; + padding: 5px 8px 3px 8px; + border-top: 1px solid var(--color-border); + background: var(--color-surface-elevated); + color: var(--color-text-muted); + font-size: 12px; + line-height: 1.25; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + .toolbar { display: flex; flex-wrap: wrap; diff --git a/webui/html/index.html b/webui/html/index.html index b507507..bbb7d91 100644 --- a/webui/html/index.html +++ b/webui/html/index.html @@ -45,6 +45,7 @@ +
@@ -64,6 +65,7 @@ +