Skip to content

Add a pointer hover marker line to the rulers#4088

Merged
Keavon merged 5 commits intomasterfrom
rulers-pointer-hover
May 1, 2026
Merged

Add a pointer hover marker line to the rulers#4088
Keavon merged 5 commits intomasterfrom
rulers-pointer-hover

Conversation

@Keavon
Copy link
Copy Markdown
Member

@Keavon Keavon commented May 1, 2026

Closes #1482.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a flip state for document rulers and a cursor position indicator that tracks the mouse on the ruler bars. The changes involve updating the frontend message protocol, managing cursor state in the document panel, and refactoring the ruler widget to handle flipped orientations and dynamic indicator rendering. Feedback was provided regarding a performance bottleneck caused by calling getBoundingClientRect() on every pointer move, suggesting that the bounding rectangle should be cached to avoid layout thrashing.

Comment thread frontend/src/components/panels/Document.svelte
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="frontend/src/components/panels/Document.svelte">

<violation number="1" location="frontend/src/components/panels/Document.svelte:304">
P2: Using cached `viewportBounds` for pointer math can produce incorrect ruler hover coordinates when the viewport moves without a resize. Compute the rect at pointer time (or refresh bounds on every position change) to keep the marker aligned.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread frontend/src/components/panels/Document.svelte
@Keavon Keavon merged commit 0acfd3e into master May 1, 2026
10 checks passed
@Keavon Keavon deleted the rulers-pointer-hover branch May 1, 2026 22:18
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.

Stretch and tilt ruler increments when canvas is tilted

1 participant