Skip to content

fix(workspace): hide 'Double-click to rename' tooltip on folders (closes #1710)#1711

Merged
1 commit merged intomasterfrom
fix/1701-folder-tooltip
May 5, 2026
Merged

fix(workspace): hide 'Double-click to rename' tooltip on folders (closes #1710)#1711
1 commit merged intomasterfrom
fix/1701-folder-tooltip

Conversation

@nesquena-hermes
Copy link
Copy Markdown
Collaborator

Closes #1710

Summary

The workspace file-tree row tooltip says "Double-click to rename" on every entry — including folders. But double-clicking a folder navigates into it (loadDir()); rename for folders lives only in the right-click context menu. The tooltip is therefore misleading on directory rows.

Reported by @Deor in the WebUI Discord testers thread (May 5 2026), responding to the #1698 fix:

Ah that works yeah. May want to change the popup text as it also says double click at the moment.

Fix

static/ui.js _renderTreeItems — gate the nameEl.title assignment on item.type !== 'dir'. Files keep the existing hint that matches their dblclick behaviour. Folders get no tooltip (rename still reachable via the right-click → Rename context menu, which is unchanged). 4 lines of code change.

-    nameEl.className='file-name';nameEl.textContent=item.name;nameEl.title=t('double_click_rename');
+    nameEl.className='file-name';nameEl.textContent=item.name;
+    // Tooltip only on FILES — dblclick renames them. On directories, dblclick
+    // navigates into the folder; rename lives in the right-click context menu
+    // (the "Double-click to rename" hint here would be misleading). #1710.
+    if(item.type!=='dir')nameEl.title=t('double_click_rename');

Why not remove the tooltip entirely

@AvidFuturist asked whether to drop it on files too. Keeping it on files is reasonable — dblclick-to-rename is non-obvious on a chat app's workspace pane (vs. a native file manager), and the tooltip is the primary discoverability path. Removing it on folders alone fixes the misleading affordance without losing useful discoverability for files.

Companion to the rename-affordance triage

After this lands, the file-tree click affordances are consistent with what each click actually does.

Tests

4 new source-level regression tests in tests/test_1710_folder_tooltip.py:

  • test_tooltip_assignment_is_guarded_by_item_type — locks the if(item.type!=='dir') guard around the nameEl.title assignment so a future refactor can't reintroduce the unconditional tooltip.
  • test_dir_dblclick_still_navigates_not_renames — sanity: directory dblclick still calls loadDir(item.path), the navigate-not-rename contract this PR depends on.
  • test_files_still_get_tooltip — locks that files retain the i18n-keyed tooltip.
  • test_i18n_key_still_defined_in_all_locales — the double_click_rename key must remain defined in ≥5 locale blocks of static/i18n.js.

Result: 4 new + 9 existing #1707 tests = 13 passing for the file-tree handler block. Targeted suite (tests/test_1710*.py tests/test_1707*.py) passes locally; broader workspace/rename pattern (264 tests) also passes.

Reporter

@Deor via WebUI Discord testers thread (May 5 2026 09:34 UTC).

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 #1698/#1702/#1707 — completes the rename-affordance triage:
- #1698 fixed: dblclick rename was unreachable on files (preview hijacked)
- #1707 fixed: single-click on filename did nothing (over-aggressive guard)
- #1710 (this PR): tooltip claimed dblclick-rename on folders too

Closes #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 #1707) pass.
@nesquena-hermes nesquena-hermes closed this pull request by merging all changes into master in 0ea3dfb May 5, 2026
@nesquena-hermes
Copy link
Copy Markdown
Collaborator Author

Closed by the v0.51.5 release in PR #1713 (merged at 0ea3dfb, deployed to production). Thanks!

Live on production: https://github.com/nesquena/hermes-webui/releases/tag/v0.51.5

🚀

githb-ac pushed a commit to githb-ac-org/hermes-webui that referenced this pull request May 5, 2026
githb-ac pushed a commit to githb-ac-org/hermes-webui that referenced this pull request May 5, 2026
4 PRs (1 surface addition, 3 fixes):
- nesquena#1688 VPS resource health Insights panel (@Michaelyklam, closes nesquena#693)
- nesquena#1709 preserve scroll on stream completion (@Michaelyklam, closes nesquena#1690)
- nesquena#1711 hide rename tooltip on folders (@nesquena-hermes, closes nesquena#1710)
- nesquena#1712 guard localStorage.setItem against QuotaExceededError (@24601)

Tests: 4504 → 4527 (+23). Opus: SHIP, 6/6 verification clean.

Held back: nesquena#1686 (Docker enhance) — Opus flagged sibling-repo dep that
breaks standalone clones. Left open for follow-up.

Co-authored-by: Michael Lam <[email protected]>
Co-authored-by: 24601 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(workspace): 'Double-click to rename' tooltip shows on folders too — but dblclick on a folder navigates, doesn't rename

1 participant