Fix session renaming - add ondblclick handler and guard#1465
Conversation
|
Thanks for the PR, but I think this overlaps with code that already exists, and the guard logic looks inverted. Worth a look before this gets merged. 1. Manual double-tap detection already exists
// Use pointerup + manual double-tap detection instead of onclick/ondblclick.
// onclick/ondblclick are unreliable on touch devices (iPad Safari especially):
// hover-triggered layout shifts, ghost clicks, and 300ms delay all break
// single-tap navigation. pointerup fires immediately on both mouse & touch.That handler calls What specific failure mode were you seeing where the existing pointerup-based double-tap was not opening the rename UI? On which platform/browser? If the existing handler is broken on some path, fixing that handler is probably better than layering a second handler on top. 2. The if (_loadingSessionId && _loadingSessionId !== s.session_id) return;This blocks rename when I think the intent was the opposite: prevent renaming a session whose load is still in progress, while letting the user rename other sidebar items freely. That would be: if (_loadingSessionId === s.session_id) return;Is the inverted form intentional? The PR description says "prevent renaming loading sessions" which matches what I'd expect, but the code does the opposite. 3. Test coverage This touches the rename gating logic which is exercised by I'd hold off on merging until (1) is clarified — if the existing pointerup detection is indeed broken on some platform, the right fix is probably patching that handler, not adding a parallel |
5650d11
…w-up - CHANGELOG.md: v0.50.267 entry detailing nesquena#1454/nesquena#1474/nesquena#1461/nesquena#1465/nesquena#1467/nesquena#1460/nesquena#1473 + Opus advisor SHOULD-FIX trailing-empty guard for _norm_model_id - ROADMAP.md: bump to v0.50.267, 3776 tests collected - TESTING.md: bump header + total to 3776 - api/config.py: trailing-empty fallback in _norm_model_id (parts[-1] or s) - static/ui.js: mirror trailing-empty fallback in _normalizeConfiguredModelKey - tests/test_norm_model_id_trailing_empty_guard.py: 5 regression tests
Fix session renaming functionality
Problem
Rename session interface wouldn't open due to issues.
Changes
ondblclickhandler for reliable double-click detectionAI
Generated with AI assistance.