Skip to content

Feature: text-range grab + accumulate multiple grabs into one list #317

@JohnnyBonk

Description

@JohnnyBonk

react-grab's element-level grab is great for "this component is broken, fix it." But review sessions often have several smaller asks across the same view — copy fixes, prose polish, accessibility flags — and the current single-grab → single-paste flow forces a context switch on every item. Two additions would close the gap.

1. Text-range grab

The current grab targets the nearest element. Often what's wanted is a span of text inside a paragraph rather than the whole element — "this sentence is awkward" instead of "this <p> is awkward." When a non-collapsed text selection exists, ⌘C could output:

"the selected passage"
in BlogPost at app/blog/[slug]/page.tsx:42

— the text, the file, the line range from the source map, ready to paste.

2. Accumulate-as-list

Instead of clipboard-replacing on each grab, optionally collect them into a list visible in a small floating panel. Each grab adds a row; clicking Copy list at the end produces one structured block:

## Items

1. <Button> in LoginForm:46 — label is misleading
2. "this sentence is awkward" in BlogPost:42
3. <h1> in Header:12 — needs better margin

One focused paste instead of several context-switches per session. Optional categorisation by colour or tag if you want to lean into the review-session metaphor.

Reference

A recent PR on GRVYDEV/marky implements this exact pattern (selection → colour → accumulated list → copy as agent-ready block) for a markdown viewer: GRVYDEV/marky#9. The shape — text-range anchoring, multi-item buffer, per-list export — translates cleanly to react-grab's surface (live browser DOM rather than static markdown).

Together, (1) and (2) turn react-grab from "tag one thing for the agent" into "do a 5-minute review pass and send the whole list in one paste."

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