Skip to content

Feature Request: Include Source File Path in Annotation Output #54

@lvboda

Description

@lvboda

The annotation output shows DOM paths but not source code file paths, making it harder for AI to locate the exact component to modify.

Current output:

### 1. paragraph: "Point at problems, not code"
**Location:** .main-content > .article > header > .tagline
**Feedback:** Change this text to red

We know the DOM location, but not which React component file to edit.

Proposed Solution

Add source file path:

### 1. paragraph: "Point at problems, not code"
**Source:** src/app/page.tsx:42
**Location:** .main-content > .article > header > .tagline
**Feedback:** Change this text to red

Now AI knows exactly where to look: src/app/page.tsx line 42.

Benefits

  • Faster AI responses - No need to search the codebase
  • More accurate changes - AI edits the right component
  • Better for large projects - DOM paths can be ambiguous

Interesting: The code already exists in src/utils/source-location.ts but isn't being used. Not sure why? Happy to submit a PR to integrate it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions