mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-05-25 19:20:16 +00:00
d625bac6d4
* fix(projects): opaque context menu + auto-sizing rename/create input Two project chip UI bugs reported in project-ui-bugs.md: 1. Right-click context menu was transparent and the session list bled through it. Root cause: _showProjectContextMenu set background: var(--panel), but --panel is not defined anywhere in style.css, so the menu fell back to transparent. Fix: use var(--surface) -- the same opaque variable used by .session-action-menu and other floating popovers. 2. The rename and new-project input field was hard-coded to 100px regardless of the project name being edited (a 3-letter name got the same field size as a 20-letter name). Fix: drop width:100px from .project-create-input, replace with min-width:40px / max-width:180px / width:auto. Add a _resizeProjectInput() helper that measures the current value with a hidden span and sets pixel width inside those bounds. Wired into both _startProjectRename (called once on focus, again on every input event) and _startProjectCreate (same pattern). Tests: 9 new static-source tests in tests/test_project_chip_ui.py that pin (a) var(--panel) is undefined in style.css so the fallback trap doesn't return; (b) menu uses var(--surface); (c) the fixed width:100px is gone and min/max bounds are present; (d) the _resizeProjectInput helper is defined and called from both flows. Full suite: 2419 passed, 47 skipped, 0 PR-related failures. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(projects): use getComputedStyle in _resizeProjectInput sizer span Switch the hidden sizer span from hardcoded font-size:10px / font-family:inherit to reading the live values from getComputedStyle(inp). This keeps the sizer calibrated if the CSS rule ever changes, rather than silently drifting. Also update test_resize_helper_uses_hidden_span to assert getComputedStyle is used rather than the old literal font-size check. Suggested by Opus independent review of #1086. * docs: v0.50.219 release notes, test count 2467, roadmap update --------- Co-authored-by: Nathan Esquenazi <nesquena@gmail.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: nesquena-hermes <nesquena-hermes@users.noreply.github.com>