mirror of
https://github.com/The-Low-Code-Foundation/OpenNoodl.git
synced 2026-03-07 17:43:28 +01:00
Phase 5 - BYOB Backend (TASK-007A/B): - LocalSQL Adapter with full CloudStore API compatibility - QueryBuilder translates Parse-style queries to SQL - SchemaManager with PostgreSQL/Supabase export - LocalBackendServer with REST endpoints - BackendManager with IPC handlers for Electron - In-memory fallback when better-sqlite3 unavailable Phase 3 - GitHub Panel (GIT-004): - Issues tab with list/detail views - Pull Requests tab with list/detail views - GitHub API client with OAuth support - Repository info hook integration Phase 3 - Editor UX Bugfixes (TASK-013): - Legacy runtime detection banners - Read-only enforcement for legacy projects - Code editor modal close improvements - Property panel stuck state fix - Blockly node deletion and UI polish Phase 11 - Cloud Functions Planning: - Architecture documentation for workflow automation - Execution history storage schema design - Canvas overlay concept for debugging Docs: Updated LEARNINGS.md and COMMON-ISSUES.md
5.5 KiB
5.5 KiB
BUG-4: Double-Click Label Opens Comment Modal
Priority: P1 - Breaks expected behavior
Status: 🔴 Research
Introduced in: Related to Phase 2 Task 8 (Property panel changes)
Symptoms
- Select a node in canvas ✅
- Property panel opens showing node properties ✅
- Double-click the node label at the top of the property panel ❌
- WRONG: Comment modal opens instead of inline rename ❌
- EXPECTED: Should enter inline edit mode to rename the node ✅
User Impact
- Severity: High - Breaks expected rename interaction
- Frequency: Every time you try to rename via double-click
- Frustration: High - confusing that comment modal opens instead
- Workaround: Use right-click menu or other rename method
Expected Behavior
Double-clicking a node label should:
- Enter inline edit mode
- Show text input with current label
- Allow typing new label
- Save on Enter or blur
- Cancel on Escape
Like this:
Before: MyNodeName
Click: [MyNodeName____] ← Editable input, cursor at end
Type: [UpdatedName___]
Enter: UpdatedName ← Saved
Initial Analysis
Likely Related to BUG-1
This bug probably shares the same root cause as BUG-1 (Property Panel Stuck). The property panel event handling was changed in Phase 2 Task 8, and now events are being routed incorrectly.
Suspected Root Cause
The double-click event on the label is likely being:
- Intercepted by a new comment system handler
- Or bubbling up to a parent component that opens comments
- Or the label click handler was removed/broken during refactoring
Event Flow to Investigate
User Double-Click on Label
↓
Label element receives event
↓
??? Event handler (should be rename)
↓
❌ Instead: Comment modal opens
Investigation Tasks
- Find property panel label element in code
- Check what event handlers are attached to label
- Trace double-click event propagation
- Verify if rename functionality still exists
- Check if comment modal handler is on parent element
- Compare with pre-Phase-2-Task-8 behavior
Files to Investigate
-
Property Panel Label Component
- Find where node label is rendered in property panel
- Check for
onDoubleClickordblclickhandlers - Verify rename functionality exists
-
Property Panel Container
- Check if parent has comment event handlers
- Look for event bubbling that might intercept double-click
-
Node Model
- Verify
rename()method still exists - Check if it's being called from anywhere
- Verify
-
Comment System
- Find comment modal trigger code
- Check what events trigger it
- See if it's catching events meant for label
Proposed Solutions
Solution A: Fix Event Handler Priority
Ensure label double-click handler stops propagation:
const handleLabelDoubleClick = (e: React.MouseEvent) => {
e.stopPropagation(); // Don't let comment handler see this
e.preventDefault();
enterRenameMode();
};
Solution B: Restore Missing Rename Handler
If handler was removed, add it back:
<div
className="node-label"
onDoubleClick={handleRename}
>
{node.name}
</div>
// When in edit mode:
<input
value={editedName}
onChange={(e) => setEditedName(e.target.value)}
onKeyDown={handleKeyDown}
onBlur={handleSave}
autoFocus
/>
Solution C: Remove Comment Handler from Panel
If comment handler is on property panel container, either:
- Remove it (use BUG-3's solution of button in header instead)
- Make it more specific (only certain elements trigger it)
- Check target element before opening modal
Implementation Plan
- Locate the label element in property panel code
- Add/fix double-click handler for rename
- Ensure event doesn't bubble to comment handler
- Implement inline edit mode:
- Replace label with input
- Focus input, select all text
- Save on Enter or blur
- Cancel on Escape
- Test thoroughly to ensure:
- Double-click renames
- Comment modal doesn't open
- Other interactions still work
User Experience
Current (Broken)
- Double-click label
- Comment modal opens unexpectedly
- Have to close modal
- Have to find another way to rename
- Confused and frustrated
Fixed
- Double-click label
- Label becomes editable input
- Type new name
- Press Enter
- Node renamed ✅
Testing Plan
Basic Rename
- Double-click label opens inline edit
- Can type new name
- Enter key saves new name
- Escape key cancels edit
- Click outside (blur) saves new name
Edge Cases
- Empty name rejected or reverted
- Very long names handled appropriately
- Special characters handled correctly
- Duplicate names (if validation exists)
No Regressions
- Comment modal doesn't open on label double-click
- Other double-click behaviors still work
- Single click on label doesn't trigger rename
- Right-click context menu still accessible
Success Criteria
- Double-clicking node label enters rename mode
- Can successfully rename node inline
- Comment modal does NOT open when double-clicking label
- Rename interaction feels natural and responsive
- All edge cases handled gracefully
- No regressions in other property panel interactions
Related Issues
- BUG-1: Property panel stuck (likely same root cause - event handling)
- BUG-3: Comment system UX (removing comment handlers might fix this too)
Last Updated: January 13, 2026