Skip to content

Canvas UX: shape text editing, eraser fix, session-per-tab, message spacing#2

Merged
dreamteam-mobile merged 10 commits intomainfrom
dev/canvas-ux-enhancements
Feb 19, 2026
Merged

Canvas UX: shape text editing, eraser fix, session-per-tab, message spacing#2
dreamteam-mobile merged 10 commits intomainfrom
dev/canvas-ux-enhancements

Conversation

@dreamteam-mobile
Copy link
Collaborator

Summary

  • Shape text editing: Double-clicking a rect/circle now shows a borderless transparent textarea with the shape's selection dashed border visible instead of a bordered text input
  • Pen eraser fix: Eraser now checks line segments between consecutive pen stroke points (not just individual points), and eraser trail disappears cleanly on mouse-up
  • Session per tab: Each browser tab always shows the join modal — no more auto-restoring a shared name from localStorage across tabs
  • Message header spacing: Added gap between sender name and timestamp in chat bubbles

Test plan

  • All 1203 unit tests pass locally
  • TypeScript typecheck clean
  • Manual Chrome validation: rectangle drawing, double-click shape text entry (borderless), selection tool, eraser on curved lines, code editor auto-indent
  • CI green

🤖 Generated with Claude Code

- 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.
@dreamteam-mobile dreamteam-mobile force-pushed the dev/canvas-ux-enhancements branch from e8f854e to c25c605 Compare February 19, 2026 03:51
…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().
@dreamteam-mobile dreamteam-mobile merged commit 3d8625b into main Feb 19, 2026
2 checks passed
@dreamteam-mobile dreamteam-mobile deleted the dev/canvas-ux-enhancements branch February 19, 2026 04:37
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.

1 participant