Skip to content

Include computed styles and DOM subtree in annotation output #21

Description

@BraedenBDev

PointDev captures computed styles and DOM subtree on element selection, but not on annotation events. An AI agent reviewing the output asked for both:

"Computed styles on annotated elements. Not just the class name .pb-20, but the actual box model: padding-bottom: 80px, width: 1400px, margin-left: 138px."

"DOM subtree snippet. A minimal HTML tree around each annotation (3-4 levels deep). Selectors can be ambiguous; the tree structure is not."

When a user draws a circle or arrow, PointDev already resolves the nearest element via findNearestElement. The fix is to also run extractElementData on that element and attach the computed styles and a truncated DOM subtree to the annotation data.

This makes each annotation a self-contained context unit: selector + styles + DOM tree + coordinates + timestamp + voice transcript at that moment.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions