Canvas UX: shape text editing, eraser fix, session-per-tab, message spacing#2
Merged
dreamteam-mobile merged 10 commits intomainfrom Feb 19, 2026
Merged
Conversation
- Add gap: 8px to .message-header so sender name and timestamp don't run together - Always show the name-entry modal on each new tab instead of auto-restoring from localStorage, so each tab acts as a unique participant - Modal still pre-fills the name from localStorage for convenience
Pen eraser now checks point-to-segment distance between consecutive points instead of just individual point proximity. This ensures the entire pen stroke is removed when the eraser crosses any part of it. On eraser mouseUp, call redrawAll() instead of saveToBuffer() so the white eraser trail is cleanly removed from the canvas.
Shape text editing: double-clicking a rect/circle now shows a borderless transparent textarea with the shape's selection dashed border visible instead of the text input border. Added shapeEditing prop to TextInputOverlay, shape-editing CSS class, and selection highlight management in DiagramCanvas. Includes 13 new tests for shape text editing and pen eraser segment hit-testing.
- Skip degenerate zero-size strokes on mouseUp (prevents double-click from creating invisible strokes that hijack hit-testing) - Position text overlay at shape bounds (top-left + width/height) instead of center point, so textarea spans the full shape area - Add flexbox centering to shape-editing overlay for vertically and horizontally centered text input
When double-clicking a shape to edit its text, the canvas-rendered text is now suppressed so it doesn't show through underneath the textarea overlay. The renderStrokes function accepts an editingShapeIndex param and skips text rendering for that shape during editing.
- Shape text textarea now constrained to shape bounds with overflow hidden and word-wrap, preventing text from spilling outside - Canvas rendering splits shape text by newlines and renders each line centered vertically within the shape (both rectangles and circles)
Changed shape-editing overlay and textarea from overflow:hidden to overflow:visible so text is never cut off by the shape bounding box while the user is typing.
e8f854e to
c25c605
Compare
…ests Enable textarea auto-resize for shape editing mode (was previously skipped), add max-width:none to override base 300px limit, and expand test coverage to 15 tests covering multi-line input, auto-resize, commit/dismiss shortcuts, overlay dimensions, and pre-filled multi-line text.
When opening a shape for editing with existing multi-line text, the textarea now auto-resizes to fit all lines immediately on mount instead of staying at rows=1 height showing only the first line.
Show semi-transparent grey circles along the eraser path while dragging, with a cursor outline at the current position. The trail fades from transparent (oldest) to visible (newest) and disappears cleanly on mouse release via redrawAll().
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.
Summary
Test plan
🤖 Generated with Claude Code