Skip to content

Prove bound Excalidraw labels render fully on first paint #279

Description

@anandpant

Goal

Prove in a real Chromium-rendered Excalidraw surface that bound labels are fully visible on first paint, and fix the owning renderer/adapter layer if they are not.

Current baseline

  • packages/diagram/renderer/src/scene.ts wraps labels by character count and estimates dimensions with fixed factors.
  • packages/diagram/excalidraw/src/lib/diagram-excalidraw.ts independently estimates bound-text geometry and emits autoResize: true.
  • Existing validation compares precomputed geometry; it does not measure the restored browser font.
  • apps/excalidraw already has Playwright-backed Vitest browser infrastructure, but no bound-label first-paint regression.

Scope

  • Add a browser fixture covering rectangle, diamond, ellipse, and arrow-bound labels.
  • Cover wrapped/unwrapped text, punctuation, long words, CJK, and emoji where supported.
  • Inspect initial paint before interaction, then confirm selection without changing text does not reveal clipping or alter wrapping.
  • If reproduced, fix diagram-renderer or diagram-excalidraw; do not add route-level compensation.
  • If not reproduced, retain the browser regression proof and close the issue with that evidence.

Acceptance criteria

  • A real-browser test proves representative bound labels are fully visible on initial paint.
  • Selection without content changes does not cause visible reflow or reveal clipped characters.
  • Any reproduced defect is fixed at the renderer or Excalidraw adapter boundary.
  • Deterministic renderer and Excalidraw validation tests remain green.

Current touchpoints

  • packages/diagram/renderer/src/scene.ts
  • packages/diagram/excalidraw/src/lib/diagram-excalidraw.ts
  • packages/diagram/excalidraw/src/lib/diagram-excalidraw.test.ts
  • apps/excalidraw/src/components/excalidraw-workspace/
  • apps/excalidraw/vitest.browser.config.mts

This replaces #70 against the current nested package layout and browser-test surface. Until the browser fixture reproduces it, treat clipping as an unverified regression risk rather than a confirmed active defect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions