Fix workspace tree double-click rename#1702
Merged
1 commit merged intoMay 5, 2026
Merged
Conversation
4daa238
Michaelyklam
pushed a commit
to Michaelyklam/hermes-webui
that referenced
this pull request
May 5, 2026
Michaelyklam
added a commit
to Michaelyklam/hermes-webui
that referenced
this pull request
May 5, 2026
10 PRs (3 surfaces additions, 7 fixes): - nesquena#1644 model picker chip + group count (@bergeouss, closes nesquena#1425) - nesquena#1684 update network failures UX (@Michaelyklam, closes nesquena#1321) - nesquena#1685 Codex spark models (@Michaelyklam, closes nesquena#1680) - nesquena#1689 normalize profile base homes (@Michaelyklam, refs nesquena#749) - nesquena#1693 adaptive title refresh deadlock (@ai-ag2026) - nesquena#1701 normalize update banner URL (@Michaelyklam, closes nesquena#1691) - nesquena#1702 workspace double-click rename (@Michaelyklam, closes nesquena#1698) - nesquena#1703 cache invalidation on auth-store drift (@Michaelyklam, closes nesquena#1699) - nesquena#1704 markdown fence lengths (@Michaelyklam, closes nesquena#1696) - nesquena#1706 multi-image paste fix (@Michaelyklam, closes nesquena#1697) Tests: 4477 → 4503 (+26). Opus: SHIP, 7/7 verification clean. Co-authored-by: Michael Lam <Michaelyklam1@gmail.com> Co-authored-by: ai-ag2026 <noreply@github.com> Co-authored-by: bergeouss <noreply@github.com>
Collaborator
|
Closed by the v0.51.4 release in PR #1707 (merged at 4daa238, deployed to production). Live on production: https://github.com/nesquena/hermes-webui/releases/tag/v0.51.4 🚀 |
wwg135
pushed a commit
to wwg135/hermes-webui
that referenced
this pull request
May 5, 2026
…ilename (nesquena#1707) Closes nesquena#1707 — single-click on a workspace tree filename did nothing. nesquena#1698 was a regression where the filename's dblclick rename handler was unreachable because the row's el.onclick (openFile) fired synchronously on the first click. The fix in nesquena#1702 stopped click propagation on nameEl — but that broke single-click activation entirely (nesquena#1707): clicking the filename now did nothing, you had to click the icon or row whitespace to open the file. Restored fix preserves both intents via a 300ms debounced delegator: let _nameClickTimer = null; nameEl.onclick = (e) => { e.stopPropagation(); if (_nameClickTimer) { clearTimeout(_nameClickTimer); _nameClickTimer = null; } _nameClickTimer = setTimeout(() => { _nameClickTimer = null; if (typeof el.onclick === 'function') el.onclick(e); }, 300); }; nameEl.ondblclick = (e) => { e.stopPropagation(); if (_nameClickTimer) { clearTimeout(_nameClickTimer); _nameClickTimer = null; } // ... existing rename body }; Single-click on nameEl schedules a setTimeout that calls el.onclick(e) after the dblclick threshold passes (300ms — matches the OS dblclick threshold on most platforms). Double-click cancels the pending timer and triggers the existing rename input. Cost: 300ms latency on file-open clicks. Acceptable trade for keeping rename reachable on single-click. Also updated tests/test_workspace_tree_rename.py to accept both the pre-nesquena#1707 (pure stopPropagation) and post-nesquena#1707 (debounced delegator) shapes — the original assertion was too narrow and would have rejected the correct fix. 9 new regression tests in tests/test_1707_workspace_filename_click.py: - 6 source-level static-analysis checks on the patched handler shape - 3 behavioral tests via Node VM (synthesize click → 300ms delay, click → dblclick within tick → assert rename mounts + openFile is not called). 7 of 9 tests fail on master pre-fix (verified); all 9 pass after.
githb-ac
pushed a commit
to githb-ac-org/hermes-webui
that referenced
this pull request
May 5, 2026
…quena#1710) The file-tree row tooltip says 'Double-click to rename' on every entry, but folders don't actually rename on double-click — they navigate via loadDir(). The tooltip is therefore misleading on directory rows. Reported by @Deor in the WebUI Discord testers thread (May 5 2026): 'Ah that works yeah. May want to change the popup text as it also says double click at the moment.' Fix: gate the tooltip on item.type !== 'dir' so it only attaches to file rows, where double-click does what the hint advertises. Folder rename still reachable via the right-click context menu (unchanged). Companion to nesquena#1698/nesquena#1702/nesquena#1707 — completes the rename-affordance triage: - nesquena#1698 fixed: dblclick rename was unreachable on files (preview hijacked) - nesquena#1707 fixed: single-click on filename did nothing (over-aggressive guard) - nesquena#1710 (this PR): tooltip claimed dblclick-rename on folders too Closes nesquena#1710 Tests: 4 source-level regression tests in tests/test_1710_folder_tooltip.py guard the gate, the unchanged dir-dblclick navigate behaviour, the i18n key, and that files still receive the tooltip. All 13 file-tree handler tests (4 new + 9 from nesquena#1707) pass.
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.
Thinking Path
What Changed
nameEl.onclickpropagation guard before the existingnameEl.ondblclickrename handler instatic/ui.js.Why It Matters
Evidence / UI media
Browser validation: in an isolated temp WebUI instance, a synthetic workspace row was rendered, click + double-click were dispatched against the file name,
openFile()remained at 0 calls, and the focused inline rename input contained selected textrename-me.md.Verification
tests/test_workspace_tree_rename.pyinitially failed before the fix (1 failed, 1 passed)./home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/test_workspace_tree_rename.py -q→2 passed in 1.34senv -u HERMES_CONFIG_PATH /home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/ -q→4479 passed, 2 skipped, 3 xpassed, 1 warning, 8 subtests passed in 407.16sgit diff --check→ passed200 image/pngRisks / Follow-ups
loadDir().Model Used
gpt-5.5via Hermes Agent CLI.Closes #1698