Skip to content

fix(annotate): arrow geometry, label placement, initial pointer visibility - #2554

Merged
chubes4 merged 1 commit into
mainfrom
fix/issue-2553-wp-codebox
Oct 2, 2026
Merged

chubes4 merged 1 commit into
mainfrom
fix/issue-2553-wp-codebox

Conversation

@chubes4

@chubes4 chubes4 commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Fixes #2553.

  • Arrow: computes a vector from direction and ends at the target's nearest edge (or corner for diagonal directions). The start sits 56px off that edge on the direction side, and the shaft and head are drawn along the vector. This replaces the fixed curve plus coarse CSS rotation, which landed beside the target and pointed the wrong way for left/right.
  • Label: offset from the target by a 12px gap. It flips to the opposite side when the preferred side lacks room, and is clamped inside the viewport, so it no longer sits flush on top of the neighbouring element.
  • Pointer: starts visibility: hidden and appears on the first mousemove, so it no longer sits at (0,0) before the first interaction.

Tests

npm run build clean.

  • browser-annotations.browser.test.ts 3/3: new assertions that the arrow tip lands at the target edge for a direction, and that a label doesn't intersect the target's sibling when there's room
  • browser-actions-presentation.browser.test.ts 1/1: the pointer is hidden before the first move
  • presentation validation 2/2, test:browser-video-capture 4/4, browser-preview-routing 16/16

Drafted by a Homeboy cook (cook-detached-29911708). Its gates passed, but publication stalled (promotion_operation: operation_in_progress). With Chris's authorization, it was re-verified and published outside Homeboy.

AI-assisted: drafted by an OpenCode agent, reviewed and finalized by Extra Chill Bot.

@chubes4
chubes4 merged commit 1bbf423 into main Oct 2, 2026
5 checks passed
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.

annotate: arrow ignores direction/target geometry, and label placement overlaps neighbouring elements

1 participant