Skip to content

Implement ruler bounds visualization for the AABB of selected layers#4090

Merged
Keavon merged 2 commits intomasterfrom
layer-bounds-in-rulers
May 2, 2026
Merged

Implement ruler bounds visualization for the AABB of selected layers#4090
Keavon merged 2 commits intomasterfrom
layer-bounds-in-rulers

Conversation

@Keavon
Copy link
Copy Markdown
Member

@Keavon Keavon commented May 2, 2026

Partly closes #1969.

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 implements selection indicators on the document rulers, allowing users to see the extent of selected nodes directly on the ruler axes. The backend now calculates the selection's bounding box and transmits it to the frontend, which renders a line and endpoints on the RulerInput components. My feedback focuses on cleaning up a redundant CSS variable definition and correcting a CSS selector change that appears to break the layout of the top ruler.

Comment thread frontend/src/components/Editor.svelte Outdated
Comment thread frontend/src/components/panels/Document.svelte Outdated
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.

2 issues found across 5 files

Confidence score: 4/5

  • This PR is likely safe to merge, with only minor UI/CSS issues and no indication of functional breakage or data risk.
  • Most severe issue: in frontend/src/components/panels/Document.svelte, .top-ruler .ruler-wrapper no longer matches RulerInput’s .ruler-input DOM, so top-ruler spacing styling may regress visually.
  • In frontend/src/components/Editor.svelte, the duplicate color variable (#00a8ff vs rgb(0, 168, 255)) is dead code and mainly a maintainability cleanup rather than a runtime risk.
  • Pay close attention to frontend/src/components/panels/Document.svelte, frontend/src/components/Editor.svelte - fix the selector mismatch causing ruler spacing regression and remove redundant CSS variable declarations.
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:895">
P2: The new `.top-ruler .ruler-wrapper` selector does not match `RulerInput`’s DOM (`.ruler-input`), so the top ruler spacing rule is no longer applied.</violation>
</file>

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

<violation number="1" location="frontend/src/components/Editor.svelte:147">
P3: Duplicate CSS variable definition — `#00a8ff` and `rgb(0, 168, 255)` are the same color. The second declaration always overrides the first, making the first line dead code. Remove the redundant line.</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 Outdated
Comment thread frontend/src/components/Editor.svelte Outdated
@Keavon Keavon merged commit 42f4c13 into master May 2, 2026
10 checks passed
@Keavon Keavon deleted the layer-bounds-in-rulers branch May 2, 2026 01:23
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.

Show selection bounding box width/height in the X/Y rulers

1 participant